fix: Fix dtype error with NAG.

This commit is contained in:
Clybius
2025-06-16 16:14:12 -05:00
parent b038659889
commit 7401dc49e2
+1 -1
View File
@@ -213,7 +213,7 @@ class ChromaNAG:
model_clone = model.clone()
diffusion_model = model_clone.get_model_object("diffusion_model")
diffusion_model.txt_in.to(device)
txt = diffusion_model.txt_in(nag_context.to(device, diffusion_model.txt_in.dtype))
txt = diffusion_model.txt_in(nag_context.to(device, mm.text_encoder_dtype()))
# Chroma models have `double_blocks` where image and text tokens interact.
# This is the equivalent of a cross-attention stage in other models.