Repository navigation
Conversation
Continuing from latents with add_noise=false and no denoise mask leaves noise as None, but _run_diffusion still packed it and crashed in einops. Fixes invoke-ai#9790 Signed-off-by: GokayAI <60583610+gokay-ai@users.noreply.github.com>
|
Verified on GPU (RTX 4090, FLUX.1 dev): on main, a two-stage chain (stage 1 up to 0.6, stage 2 continuing from its latents with No changes requested, looks good to me. |
|
Heads-up on merge order: this PR and #9837 both change the same import line in |
Summary
Chaining two FLUX Denoise nodes where the second one continues from the first one's latents with
add_noise=false(and no mask) crashed withTensor type unknown to einops <class 'NoneType'>._run_diffusionalready setsnoise = Nonein that case, but still calledpack(noise). It now skips the pack when there is no noise, same asinit_latents/inpaint_maskright above it and the FLUX.2 node.Related Issues / Discussions
Fixes #9790
QA Instructions
Added
test_flux_add_noise_false_denoises_incoming_latents_without_noiseintests/app/invocations/test_denoise_noise_inputs.py. It runs_run_diffusionwith incoming latents,add_noise=Falseand a schedule with more than one step, with the model, LoRA patching anddenoisemocked. The existingadd_noise=Falsetest returns early on the single-step short-circuit, so it never got to the pack.pytest tests/app/invocations/test_denoise_noise_inputs.py tests/app/invocations/test_flux_denoise.pygives 47 passed, 5 xfailed, andpytest tests/app/invocations -k fluxgives 330 passed, 4 skipped, 1 xfailed.ruff check/ruff format --checkpass on both files.CPU and mocks only. I didn't run the real two-stage FLUX workflow on a GPU.
Checklist
What's Newcopy (if doing a release after this PR)Need help on this PR? Tag
@codesmith-botwith what you need.