mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-04-12 02:37:00 +08:00
Update nodes.py
This commit is contained in:
parent
1448402b83
commit
a8c1a707a9
6
nodes.py
6
nodes.py
@ -1147,13 +1147,15 @@ class ColorMatch:
|
||||
|
||||
def colormatch(self, image_ref, image_target, method):
|
||||
cm = ColorMatcher()
|
||||
image_ref = image_ref.cpu()
|
||||
image_target = image_target.cpu()
|
||||
batch_size = image_target.size(0)
|
||||
out = []
|
||||
images_target = image_target.squeeze()
|
||||
images_ref = image_ref.squeeze()
|
||||
|
||||
image_ref_np = images_ref.cpu().numpy()
|
||||
images_target_np = images_target.cpu().numpy()
|
||||
image_ref_np = images_ref.numpy()
|
||||
images_target_np = images_target.numpy()
|
||||
|
||||
if image_ref.size(0) > 1 and image_ref.size(0) != batch_size:
|
||||
raise ValueError("ColorMatch: Use either single reference image or a matching batch of reference images.")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user