You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bugfix]: route Wan negative prompt encoding through TextEncoderLoader
Addresses review feedback on #1178: the previous fix loaded the negative
prompt encoder via transformers' T5EncoderModel, but Wan's text_encoder
is UMT5 (per-layer relative position bias, not shared). Loading UMT5
weights into a T5 architecture silently produces wrong embeddings for
the negative prompt and diverges the training-time CFG from inference.
Switch to TextEncoderLoader so the encoder class is resolved from
pipeline_config (UMT5EncoderModel for Wan) and the postprocess_text
function is reused instead of imported by name. This keeps the
fix to the original SP deadlock (every rank encodes independently;
no full WanPipeline construction, no NCCL collectives) while staying
inside the existing prompt-encoding abstraction.
text_encoder_cpu_offload is forced off for this short-lived load to
avoid initializing an FSDP device mesh, which would re-introduce
collectives.
0 commit comments