Skip to content

Commit 5b1c134

Browse files
committed
Fix issue with already used variable
1 parent aff0d86 commit 5b1c134

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diffusers/pipelines/qwenimage/pipeline_qwenimage_edit_controlnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,11 +973,11 @@ def __call__(
973973

974974
if image_latents is not None:
975975
padding_size = image_latents.shape[1]
976-
for i, sample in enumerate(controlnet_block_samples):
976+
for sample_index, sample in enumerate(controlnet_block_samples):
977977
# Pad right with padding_size zeros at dimension 1 of each sample
978978
pad_tuple = [0] * (2 * sample.dim())
979979
pad_tuple[-3] = padding_size
980-
controlnet_block_samples[i] = F.pad(sample, pad_tuple, mode="constant", value=0)
980+
controlnet_block_samples[sample_index] = F.pad(sample, pad_tuple, mode="constant", value=0)
981981

982982
with self.transformer.cache_context("cond"):
983983
noise_pred = self.transformer(

0 commit comments

Comments
 (0)