Fix XYZ KSampler losing noise_mask during inpainting
Preserve all latent dict keys (including noise_mask) when splitting batches, instead of only copying the samples tensor. This fixes inpainting not working when using InpaintModelConditioning upstream. Fixes #84 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
5f51c8252f
commit
49be8e96f9
@@ -119,7 +119,12 @@ class FL_KSamplerXYZPlot:
|
||||
if input_type == "latent":
|
||||
if latent_image is None:
|
||||
raise ValueError("Latent input is selected, but no latent image is provided.")
|
||||
input_list = [{"samples": latent_image["samples"][i:i+1]} for i in range(latent_image["samples"].shape[0])]
|
||||
input_list = []
|
||||
for i in range(latent_image["samples"].shape[0]):
|
||||
item = {}
|
||||
for k, v in latent_image.items():
|
||||
item[k] = v[i:i+1] if isinstance(v, torch.Tensor) else v
|
||||
input_list.append(item)
|
||||
elif input_type == "image":
|
||||
if image is None:
|
||||
raise ValueError("Image input is selected, but no image is provided.")
|
||||
|
||||
Reference in New Issue
Block a user