mirror of https://github.com/skygpu/skynet.git
Upscaler fix & frontend model selection naming chanes
parent
bbc5751837
commit
aa41c08d2f
|
@ -144,7 +144,7 @@ class SkynetMM:
|
||||||
|
|
||||||
if upscaler == 'x4':
|
if upscaler == 'x4':
|
||||||
input_img = image.convert('RGB')
|
input_img = image.convert('RGB')
|
||||||
up_img, _ = upscaler.enhance(
|
up_img, _ = self.upscaler.enhance(
|
||||||
convert_from_image_to_cv2(input_img), outscale=4)
|
convert_from_image_to_cv2(input_img), outscale=4)
|
||||||
|
|
||||||
image = convert_from_cv2_to_image(up_img)
|
image = convert_from_cv2_to_image(up_img)
|
||||||
|
|
|
@ -32,9 +32,12 @@ def validate_user_config_request(req: str):
|
||||||
match attr:
|
match attr:
|
||||||
case 'algo':
|
case 'algo':
|
||||||
val = params[2]
|
val = params[2]
|
||||||
if val not in ALGOS:
|
shorts = [model_info['short'] for model_info in MODELS.values()]
|
||||||
|
if val not in shorts:
|
||||||
raise ConfigUnknownAlgorithm(f'no algo named {val}')
|
raise ConfigUnknownAlgorithm(f'no algo named {val}')
|
||||||
|
|
||||||
|
val = get_model_by_shortname(val)
|
||||||
|
|
||||||
case 'step':
|
case 'step':
|
||||||
val = int(params[2])
|
val = int(params[2])
|
||||||
val = max(min(val, MAX_STEP), MIN_STEP)
|
val = max(min(val, MAX_STEP), MIN_STEP)
|
||||||
|
|
Loading…
Reference in New Issue