Support v3 schema update of upscale models (#167)
This commit is contained in:
+5
-1
@@ -14,7 +14,11 @@ class Upscaler:
|
||||
return img
|
||||
if (shared.actual_upscaler is None):
|
||||
return img.resize((img.width * scale, img.height * scale), Image.Resampling.LANCZOS)
|
||||
(upscaled,) = ImageUpscaleWithModel().upscale(shared.actual_upscaler, shared.batch_as_tensor)
|
||||
if "execute" in dir(ImageUpscaleWithModel):
|
||||
# V3 schema: https://github.com/comfyanonymous/ComfyUI/pull/10149
|
||||
(upscaled,) = ImageUpscaleWithModel.execute(shared.actual_upscaler, shared.batch_as_tensor)
|
||||
else:
|
||||
(upscaled,) = ImageUpscaleWithModel().upscale(shared.actual_upscaler, shared.batch_as_tensor)
|
||||
shared.batch = [tensor_to_pil(upscaled, i) for i in range(len(upscaled))]
|
||||
return shared.batch[0]
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui_ultimatesdupscale"
|
||||
description = "ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A."
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
license = { file = "LICENSE" }
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user