mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-26 07:35:44 -03:00
fix: improve image handling logic to ensure input is always a list or array, see #346
This commit is contained in:
@@ -418,6 +418,10 @@ class SaveImage:
|
|||||||
# Make sure the output directory exists
|
# Make sure the output directory exists
|
||||||
os.makedirs(self.output_dir, exist_ok=True)
|
os.makedirs(self.output_dir, exist_ok=True)
|
||||||
|
|
||||||
|
# If images is already a list or array of images, do nothing; otherwise, convert to list
|
||||||
|
if isinstance(images, (list, np.ndarray)):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
# Ensure images is always a list of images
|
# Ensure images is always a list of images
|
||||||
if len(images.shape) == 3: # Single image (height, width, channels)
|
if len(images.shape) == 3: # Single image (height, width, channels)
|
||||||
images = [images]
|
images = [images]
|
||||||
|
|||||||
Reference in New Issue
Block a user