fix: compatibility patch with recent ComfyUI.
https://github.com/ltdrdata/ComfyUI/commit/3b2e579926d5cf8231de0e68e79096d1ee8091f2
This commit is contained in:
@@ -7,6 +7,7 @@ This custom node helps to conveniently enhance images through Detector, Detailer
|
||||
|
||||
|
||||
## NOTICE
|
||||
* V4.77: Compatibility patch applied. Requires ComfyUI version (Oct. 8th) or later.
|
||||
* V4.73.3: ControlNetApply (SEGS) supports AnimateDiff
|
||||
* V4.20.1: Due to the feature update in `RegionalSampler`, the parameter order has changed, causing malfunctions in previously created `RegionalSamplers`. Please adjust the parameters accordingly.
|
||||
* V4.12: `MASKS` is changed to `MASK`.
|
||||
|
||||
@@ -2,7 +2,7 @@ import configparser
|
||||
import os
|
||||
|
||||
|
||||
version_code = [4, 76, 1]
|
||||
version_code = [4, 77]
|
||||
version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
||||
|
||||
dependency_version = 20
|
||||
|
||||
+10
-3
@@ -495,9 +495,16 @@ def to_latent_image(pixels, vae):
|
||||
y = pixels.shape[2]
|
||||
if pixels.shape[1] != x or pixels.shape[2] != y:
|
||||
pixels = pixels[:, :x, :y, :]
|
||||
pixels = nodes.VAEEncode.vae_encode_crop_pixels(pixels)
|
||||
t = vae.encode(pixels[:, :, :, :3])
|
||||
return {"samples": t}
|
||||
|
||||
vae_encode = nodes.VAEEncode()
|
||||
if hasattr(nodes.VAEEncode, "vae_encode_crop_pixels"):
|
||||
# backward compatibility
|
||||
print(f"[Impact Pack] ComfyUI is outdated.")
|
||||
pixels = nodes.VAEEncode.vae_encode_crop_pixels(pixels)
|
||||
t = vae.encode(pixels[:, :, :, :3])
|
||||
return {"samples": t}
|
||||
|
||||
return vae_encode.encode(vae, pixels)[0]
|
||||
|
||||
|
||||
def empty_pil_tensor(w=64, h=64):
|
||||
|
||||
Reference in New Issue
Block a user