From 1f04c502352461460d4dec191fcede03ccc91ffa Mon Sep 17 00:00:00 2001 From: Silver <65376327+silveroxides@users.noreply.github.com> Date: Mon, 13 Jul 2026 19:20:51 +0200 Subject: [PATCH] Copy tensor slice in _flatten_images function Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- comfy_extras/nodes_qwen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy_extras/nodes_qwen.py b/comfy_extras/nodes_qwen.py index 4e8ac97b2..280eedfe7 100644 --- a/comfy_extras/nodes_qwen.py +++ b/comfy_extras/nodes_qwen.py @@ -77,7 +77,7 @@ def _flatten_images(images): continue if image.ndim == 3: image = image.unsqueeze(0) - sources.extend(image[i:i + 1] for i in range(image.shape[0])) + sources.extend(image[i:i + 1].clone() for i in range(image.shape[0])) return sources