Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Commit
•
742d895
1
Parent(s):
f8507a8
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from diffusers import
|
2 |
from diffusers import UniPCMultistepScheduler
|
3 |
import gradio as gr
|
4 |
import torch
|
@@ -19,7 +19,7 @@ auth_token=os.environ["ACCESS_TOKEN"]
|
|
19 |
|
20 |
scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler",use_auth_token=auth_token)
|
21 |
|
22 |
-
pipe =
|
23 |
model_id,
|
24 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
25 |
scheduler=scheduler,
|
|
|
1 |
+
from diffusers import AutoPipelineForText2Image, EulerAncestralDiscreteScheduler
|
2 |
from diffusers import UniPCMultistepScheduler
|
3 |
import gradio as gr
|
4 |
import torch
|
|
|
19 |
|
20 |
scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler",use_auth_token=auth_token)
|
21 |
|
22 |
+
pipe = AutoPipelineForText2Image.from_pretrained(
|
23 |
model_id,
|
24 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
25 |
scheduler=scheduler,
|