Spaces:
Sleeping
Sleeping
Aditya Patkar
commited on
Commit
•
a338de2
1
Parent(s):
2edc2b1
Init
Browse files- text_to_image.py +1 -1
text_to_image.py
CHANGED
@@ -20,7 +20,7 @@ def generate_image(prompt: str) -> torch.Tensor:
|
|
20 |
"""
|
21 |
# load model
|
22 |
|
23 |
-
pipe = StableDiffusionPipeline.from_pretrained(MODEL_ID
|
24 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
25 |
if torch.cuda.is_available():
|
26 |
pipe = pipe.to("cuda") # move model to GPU if available
|
|
|
20 |
"""
|
21 |
# load model
|
22 |
|
23 |
+
pipe = StableDiffusionPipeline.from_pretrained(MODEL_ID) #torch_dtype=torch.float16
|
24 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
25 |
if torch.cuda.is_available():
|
26 |
pipe = pipe.to("cuda") # move model to GPU if available
|