Support context window for PiD and fix lq_latent rounding#14136
Conversation
how did you get here...
not worth it
|
Caution Review failedAn error occurred during the review process. Please try again later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
What is the latent_retain_index_list setting in the context window manual node? |
That's only relevant to I2V video models, since each window is it's own model pass, that setting allows applying image conditioning to each window that would otherwise just default to T2V generation. The downside in that case is that each window can basically "reset" to the start image instead of continued motion, so in practice it's only useful when the model treats the image as reference rather than start frame. |





Context windows are a way to handle the aspect ratio limitations of the model, also noticed mismatch with some dimensions due to rounding differences, so two fixes:
Context window slicing needed to account for the lq_latent scaling
PiD upscaling failed with a tensor size mismatch when the output width or height wasn't a multiple of 16. The two halves of the model rounded the size differently, so they ended up one row/column apart and couldn't be combined.
Also in this situation almost halves peak VRAM use:
Context window settings (easier to use node specific to this model can be added later):