From 14903ee59992fa5c1ee121c4ddec6b7d3bd9a9f5 Mon Sep 17 00:00:00 2001 From: davidb Date: Thu, 9 Oct 2025 16:27:09 +0000 Subject: [PATCH] remove autocast for text encoder forwad --- src/diffusers/pipelines/photon/pipeline_photon.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/diffusers/pipelines/photon/pipeline_photon.py b/src/diffusers/pipelines/photon/pipeline_photon.py index b30da7d627..11d4fd0f06 100644 --- a/src/diffusers/pipelines/photon/pipeline_photon.py +++ b/src/diffusers/pipelines/photon/pipeline_photon.py @@ -381,12 +381,11 @@ class PhotonPipeline( attention_mask = tokens["attention_mask"].bool().to(device) with torch.no_grad(): - with torch.autocast("cuda", enabled=False): - emb = self.text_encoder( - input_ids=input_ids, - attention_mask=attention_mask, - output_hidden_states=True, - ) + emb = self.text_encoder( + input_ids=input_ids, + attention_mask=attention_mask, + output_hidden_states=True, + ) all_embeddings = emb["last_hidden_state"]