From d5fc43e11ff27138bb5d3cea7cc5ac8949c089f0 Mon Sep 17 00:00:00 2001 From: yolain Date: Sun, 31 Mar 2024 11:31:39 +0800 Subject: [PATCH] fix:unable load batch_size value in easy pipeIn when link the image and pipe is None --- py/easyNodes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/py/easyNodes.py b/py/easyNodes.py index 030902b..625dfa2 100644 --- a/py/easyNodes.py +++ b/py/easyNodes.py @@ -4883,14 +4883,17 @@ class pipeIn: if image is None: image = pipe.get("images") if pipe is not None else None else: - batch_size = pipe["loader_settings"]["batch_size"] if "batch_size" in pipe["loader_settings"] else 1 + if pipe is None: + batch_size = 1 + else: + batch_size = pipe["loader_settings"]["batch_size"] if "batch_size" in pipe["loader_settings"] else 1 samples = {"samples": vae.encode(image[:, :, :, :3])} samples = RepeatLatentBatch().repeat(samples, batch_size)[0] if pipe is None: pipe = {"loader_settings": {"positive": "", "negative": "", "xyplot": None}} - xyplot = xyplot if xyplot is not None else pipe['loader_settings']['xyplot'] if xyplot in pipe['loader_settings'] else None + xyplot = xyplot if xyplot is not None else pipe['loader_settings']['xyplot'] if xyplot in pipe['loader_settings'] else None new_pipe = { **pipe,