Skip to content

Commit f877fbd

Browse files
committed
try with lower diffusers patch
1 parent da5a587 commit f877fbd

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
extras = {}
3333

3434
extras["st"] = ["sentence_transformers==3.4.1"]
35-
extras["diffusers"] = ["diffusers==0.32.2", "accelerate==1.4.0"]
35+
extras["diffusers"] = ["diffusers==0.32.1", "accelerate==1.4.0"]
3636
# Includes `peft` as PEFT requires `torch` so having `peft` as a core dependency
3737
# means that `torch` will be installed even if the `torch` extra is not specified.
3838
extras["torch"] = ["torch==2.3.1", "torchvision", "torchaudio", "peft==0.14.0"]

src/huggingface_inference_toolkit/diffusers_utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ def __call__(
7373
logger.warning("The `output_type` cannot be modified, and PIL will be used by default instead.")
7474

7575
# Call pipeline with parameters
76-
if self.pipeline.device.type == "cuda":
77-
with torch.autocast("cuda", dtype=torch.bfloat16):
78-
out = self.pipeline(prompt, num_images_per_prompt=1, **kwargs)
79-
else:
80-
out = self.pipeline(prompt, num_images_per_prompt=1, **kwargs)
76+
out = self.pipeline(prompt, num_images_per_prompt=1, **kwargs)
8177

8278
return out.images[0]
8379

0 commit comments

Comments
 (0)