Spaces:
Runtime error
Runtime error
Robin Singh
commited on
Commit
·
9a8a502
1
Parent(s):
481dc4f
fixed typo
Browse files
app.py
CHANGED
@@ -32,8 +32,8 @@ scheduler_types={
|
|
32 |
# Creating Simple Customized pipeline
|
33 |
pipe = StableDiffusionPipeline.from_pretrained(
|
34 |
model_id,
|
35 |
-
revision="fp16",
|
36 |
-
torch_dtype=torch.float16,
|
37 |
scheduler=DPMS
|
38 |
).to("cuda")
|
39 |
pipe.enable_attention_slicing()
|
@@ -56,6 +56,8 @@ modes = {
|
|
56 |
}
|
57 |
|
58 |
|
|
|
|
|
59 |
###############################################################################
|
60 |
current_mode = modes['txt2img']
|
61 |
def error_str(error, title="Error"):
|
|
|
32 |
# Creating Simple Customized pipeline
|
33 |
pipe = StableDiffusionPipeline.from_pretrained(
|
34 |
model_id,
|
35 |
+
revision="fp16" if torch.cuda.is_available() else "fp32",
|
36 |
+
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
37 |
scheduler=DPMS
|
38 |
).to("cuda")
|
39 |
pipe.enable_attention_slicing()
|
|
|
56 |
}
|
57 |
|
58 |
|
59 |
+
|
60 |
+
|
61 |
###############################################################################
|
62 |
current_mode = modes['txt2img']
|
63 |
def error_str(error, title="Error"):
|