ComfyUI/comfy/ldm/joyimage
huangfeice 0eafd9cf0b fix: Clean up JoyImage model dead code and redundant casts
Some cleanup of the JoyImage transformer:

- FP32LayerNorm/JoyImageModulate: drop constructor params that were never
  used (dtype/device on the param-free FP32LayerNorm, operations on
  JoyImageModulate).
- modulate_table: init with torch.empty instead of torch.zeros since it is
  loaded from the state dict, and cast at use with comfy.ops.cast_to_input.
- Replace the FeedForward nn.Dropout(0.0) no-op with nn.Identity, keeping the
  ModuleList slot so state-dict keys are unchanged.
- Drop the always-true vec.shape guard (time_proj_dim is always hidden_size*6).
- Remove the redundant per-reference .to(device,dtype) in JoyImage._apply_model;
  the extra_conds cast loop already moves ref_latents to the compute dtype/device.
- Drop the redundant .to(xq.device) in the RoPE apply; the freqs are built on
  the latent device.
2026-07-06 17:43:24 +08:00
..
model.py fix: Clean up JoyImage model dead code and redundant casts 2026-07-06 17:43:24 +08:00