This commit fixes a RuntimeError that occurs when using Fun-Control
reference images: "Input type (float) and bias type (c10::Half)
should be the same"
Root cause:
- Commit 1ba1a16 changed the dtype handling strategy to convert
the main latent `x` to `base_dtype` instead of converting
embeddings to match `x.dtype`
- This caused `fun_ref` input to be in a different dtype than
the `ref_conv` layer's weights and bias
- Line 2324 already handles this correctly for `attn_cond` by
converting to `self.attn_conv_in.weight.dtype`
Solution:
- Convert `fun_ref` to match `self.ref_conv.weight.dtype` before
passing through the convolution layer
- This follows the same pattern used for `attn_cond` on line 2324
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>