Ensure colormatch is on cpu

This commit is contained in:
Kijai 2023-12-20 15:47:45 +02:00
parent a77d73ca8a
commit 1448402b83

View File

@ -1152,8 +1152,8 @@ class ColorMatch:
images_target = image_target.squeeze()
images_ref = image_ref.squeeze()
image_ref_np = images_ref.numpy()
images_target_np = images_target.numpy()
image_ref_np = images_ref.cpu().numpy()
images_target_np = images_target.cpu().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.")