From a6f8170a6e871543c9f8e04e127046af8b15e991 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 22 Jul 2026 16:47:10 +0300 Subject: [PATCH] Cast dtype too --- comfy_extras/nodes_looping.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/comfy_extras/nodes_looping.py b/comfy_extras/nodes_looping.py index 5cc661a0a..76dea3afe 100644 --- a/comfy_extras/nodes_looping.py +++ b/comfy_extras/nodes_looping.py @@ -524,14 +524,14 @@ def _blend_overlap(items, overlap_frames, mode): if _is_nested(ps): blended_tensors = [] for pt, ch in zip(ps.tensors, cs.tensors): - w = t.to(pt.device).reshape([1] * dim + [overlap_frames] + [1] * (pt.ndim - dim - 1)) + w = t.to(pt).reshape([1] * dim + [overlap_frames] + [1] * (pt.ndim - dim - 1)) blended_tensors.append(pt * (1 - w) + ch * w) blended["samples"] = NestedTensor(blended_tensors) else: - w = t.to(ps.device).reshape([1] * dim + [overlap_frames] + [1] * (ps.ndim - dim - 1)) + w = t.to(ps).reshape([1] * dim + [overlap_frames] + [1] * (ps.ndim - dim - 1)) blended["samples"] = ps * (1 - w) + cs * w else: - w = t.to(prev_tail.device).reshape([1] * dim + [overlap_frames] + [1] * (prev_tail.ndim - dim - 1)) + w = t.to(prev_tail).reshape([1] * dim + [overlap_frames] + [1] * (prev_tail.ndim - dim - 1)) blended = prev_tail * (1 - w) + curr_head * w result = _concat_tensor(_concat_tensor(result_base, blended, dim), curr_rest, dim)