ComfyUI/comfy/ldm
bigjimmy f5bf7ed4d3 fix: pad reference latents to patch size in embed_all
When a reference image is passed via TextEncodeZImageOmni, its VAE-encoded
latent may have odd height or width (e.g. from auto_resize rounding to
multiples of 8 pixels). The embed_all() function in the Lumina model tries
to reshape the latent as view(B, C, H//2, 2, W//2, 2) for patch embedding,
which fails when H or W is not divisible by the patch size (2).

Add pad_to_patch_size() before the reshape, matching what the main forward
pass already does for the primary latent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 22:44:47 +08:00
..
ace Make ace step 1.5 base model work properly with default workflow. (#12337) 2026-02-06 19:14:56 -05:00
anima Fix anima LLM adapter forward when manual cast (#12504) 2026-02-17 07:56:44 -08:00
audio Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
aura Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
cascade Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
chroma Implement NAG on all the models based on the Flux code. (#12500) 2026-02-16 23:30:34 -05:00
chroma_radiance Use torch RMSNorm for flux models and refactor hunyuan video code. (#12432) 2026-02-13 15:35:13 -05:00
cosmos Some fixes to previous pr. (#12339) 2026-02-06 20:14:52 -05:00
flux Implement NAG on all the models based on the Flux code. (#12500) 2026-02-16 23:30:34 -05:00
genmo Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
hidream Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
hunyuan3d Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
hunyuan3dv2_1 Fix issue on old torch. (#9791) 2025-09-10 00:23:47 -04:00
hunyuan_video Implement NAG on all the models based on the Flux code. (#12500) 2026-02-16 23:30:34 -05:00
hydit Change cosmos and hydit models to use the native RMSNorm. (#7934) 2025-05-04 06:26:20 -04:00
kandinsky5 Fix qwen scaled fp8 not working with kandinsky. Make basic t2i wf work. (#11162) 2025-12-06 17:50:10 -08:00
lightricks feat: per-guide attention strength control in self-attention (#12518) 2026-02-26 01:25:23 -05:00
lumina fix: pad reference latents to patch size in embed_all 2026-03-01 22:44:47 +08:00
mmaudio/vae Implement the mmaudio VAE. (#10300) 2025-10-11 22:57:23 -04:00
models Flux 2 (#10879) 2025-11-25 10:50:19 -05:00
modules feat: Support SDPose-OOD (#12661) 2026-02-26 19:59:05 -05:00
omnigen Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
pixart Remove windows line endings. (#8866) 2025-07-11 02:37:51 -04:00
qwen_image Add working Qwen 2512 ControlNet (Fun ControlNet) support (#12359) 2026-02-13 22:23:52 -05:00
wan feat: Support SCAIL WanVideo model (#12614) 2026-02-28 16:49:12 -05:00
common_dit.py add RMSNorm to comfy.ops 2025-04-14 18:00:33 -04:00
util.py New Year ruff cleanup. (#11595) 2026-01-01 22:06:14 -05:00