1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

Revert "Fix mixed precision issue by wrapping the offending code with the torch.autocast context manager."

This reverts commit 1a58958ab4.
This commit is contained in:
Daniel Gu
2023-05-11 08:07:54 -07:00
parent 1a58958ab4
commit f36df41999

View File

@@ -1246,8 +1246,7 @@ class UniDiffuserPipeline(DiffusionPipeline):
)
if reduce_text_emb_dim:
with torch.autocast(device_type=device.type):
prompt_embeds = self.text_decoder.encode_prefix(prompt_embeds)
prompt_embeds = self.text_decoder.encode_prefix(prompt_embeds)
# 4. Encode image, if available; otherwise prepare image latents
if mode in ["img2text"]: