Replaced ndim check with shape[0] check

This doesn't appear to change any functionality, but I think it's a more correct way of checking for the number of images
This commit is contained in:
HermitCrabe
2023-08-17 19:11:17 -05:00
parent bf7af541fc
commit 1a6aa4fab6
+1 -1
View File
@@ -11067,7 +11067,7 @@ class WAS_Bounded_Image_Blend:
# Convert PyTorch tensors to PIL images
target_pil = Image.fromarray((target.squeeze(0).cpu().numpy() * 255).clip(0, 255).astype(np.uint8))
source_pils = []
if source.ndim > 3:
if source.shape[0] > 1:
for source_img in source:
source_pils.append(Image.fromarray((source_img.squeeze(0).cpu().numpy() * 255).astype(np.uint8)))
else: