Small double tap of detach on qwen just for good measure

This commit is contained in:
Jaret Burkett
2025-09-18 08:22:04 -06:00
parent 390e21bec6
commit 20dfe1b4d5

View File

@@ -284,11 +284,11 @@ class QwenImageModel(BaseModel):
txt_seq_lens = prompt_embeds_mask.sum(dim=1).tolist() txt_seq_lens = prompt_embeds_mask.sum(dim=1).tolist()
noise_pred = self.transformer( noise_pred = self.transformer(
hidden_states=latent_model_input.to(self.device_torch, self.torch_dtype), hidden_states=latent_model_input.to(self.device_torch, self.torch_dtype).detach(),
timestep=timestep / 1000, timestep=(timestep / 1000).detach(),
guidance=None, guidance=None,
encoder_hidden_states=enc_hs, encoder_hidden_states=enc_hs.detach(),
encoder_hidden_states_mask=prompt_embeds_mask, encoder_hidden_states_mask=prompt_embeds_mask.detach(),
img_shapes=img_shapes, img_shapes=img_shapes,
txt_seq_lens=txt_seq_lens, txt_seq_lens=txt_seq_lens,
return_dict=False, return_dict=False,