Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,10 +35,16 @@ if mps_available:
|
|
35 |
torch_dtype = torch.float32
|
36 |
|
37 |
if SAFETY_CHECKER == "True":
|
38 |
-
pipe = DiffusionPipeline.from_pretrained(
|
|
|
|
|
|
|
39 |
else:
|
40 |
pipe = DiffusionPipeline.from_pretrained(
|
41 |
-
"stabilityai/sdxl-turbo",
|
|
|
|
|
|
|
42 |
)
|
43 |
|
44 |
|
@@ -116,7 +122,7 @@ with gr.Blocks(css=css) as demo:
|
|
116 |
from diffusers import DiffusionPipeline
|
117 |
|
118 |
pipe = DiffusionPipeline.from_pretrained(
|
119 |
-
"stabilityai/sdxl-turbo",
|
120 |
).to("cuda")
|
121 |
results = pipe(
|
122 |
prompt="A cinematic shot of a baby racoon wearing an intricate italian priest robe",
|
|
|
35 |
torch_dtype = torch.float32
|
36 |
|
37 |
if SAFETY_CHECKER == "True":
|
38 |
+
pipe = DiffusionPipeline.from_pretrained(
|
39 |
+
"stabilityai/sdxl-turbo",
|
40 |
+
torch_dtype=torch_dtype,
|
41 |
+
variant="fp16" if torch_dtype == torch.float16 else "fp32")
|
42 |
else:
|
43 |
pipe = DiffusionPipeline.from_pretrained(
|
44 |
+
"stabilityai/sdxl-turbo",
|
45 |
+
safety_checker=None,
|
46 |
+
torch_dtype=torch_dtype,
|
47 |
+
variant="fp16" if torch_dtype == torch.float16 else "fp32",
|
48 |
)
|
49 |
|
50 |
|
|
|
122 |
from diffusers import DiffusionPipeline
|
123 |
|
124 |
pipe = DiffusionPipeline.from_pretrained(
|
125 |
+
"stabilityai/sdxl-turbo", variant="fp16", torch_dtype=torch.float16
|
126 |
).to("cuda")
|
127 |
results = pipe(
|
128 |
prompt="A cinematic shot of a baby racoon wearing an intricate italian priest robe",
|