mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-05-01 03:31:35 +00:00
Fixed issue where the control images would sometimes be ignored on qwen_image_edit_2511
This commit is contained in:
@@ -237,14 +237,16 @@ class QwenImageEditPlusModel(QwenImageModel):
|
|||||||
# split the latents into batch items so we can concat the controls
|
# split the latents into batch items so we can concat the controls
|
||||||
packed_latents_list = torch.chunk(latent_model_input, batch_size, dim=0)
|
packed_latents_list = torch.chunk(latent_model_input, batch_size, dim=0)
|
||||||
packed_latents_with_controls_list = []
|
packed_latents_with_controls_list = []
|
||||||
|
|
||||||
|
batch_control_tensor_list = batch.control_tensor_list
|
||||||
|
if batch_control_tensor_list is None and batch.control_tensor is not None:
|
||||||
|
batch_control_tensor_list = []
|
||||||
|
for b in range(batch_size):
|
||||||
|
batch_control_tensor_list.append(batch.control_tensor[b : b + 1])
|
||||||
|
|
||||||
if batch.control_tensor_list is not None:
|
if batch_control_tensor_list is not None:
|
||||||
if len(batch.control_tensor_list) != batch_size:
|
|
||||||
raise ValueError(
|
|
||||||
"Control tensor list length does not match batch size"
|
|
||||||
)
|
|
||||||
b = 0
|
b = 0
|
||||||
for control_tensor_list in batch.control_tensor_list:
|
for control_tensor_list in batch_control_tensor_list:
|
||||||
# control tensor list is a list of tensors for this batch item
|
# control tensor list is a list of tensors for this batch item
|
||||||
controls = []
|
controls = []
|
||||||
# pack control
|
# pack control
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
VERSION = "0.7.13"
|
VERSION = "0.7.14"
|
||||||
|
|||||||
Reference in New Issue
Block a user