Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def ia_imagenes(modelo, prompt, prompt_negativo, uploaded_file, my_strength, my_
|
|
42 |
|
43 |
pipe = StableDiffusionPipeline.from_pretrained(
|
44 |
model_id,
|
45 |
-
revision="fp16" if torch.cuda.is_available() else "fp32",
|
46 |
-
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
47 |
requires_safety_checker = False
|
48 |
).to("cuda")
|
49 |
|
@@ -65,8 +65,8 @@ def ia_imagenes(modelo, prompt, prompt_negativo, uploaded_file, my_strength, my_
|
|
65 |
|
66 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
67 |
model_id,
|
68 |
-
revision="fp16" if torch.cuda.is_available() else "fp32",
|
69 |
-
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
70 |
requires_safety_checker = False
|
71 |
).to("cuda")
|
72 |
|
|
|
42 |
|
43 |
pipe = StableDiffusionPipeline.from_pretrained(
|
44 |
model_id,
|
45 |
+
revision="fp16" not if torch.cuda.is_available() else "fp32",
|
46 |
+
torch_dtype=torch.float16 if not torch.cuda.is_available() else torch.float32,
|
47 |
requires_safety_checker = False
|
48 |
).to("cuda")
|
49 |
|
|
|
65 |
|
66 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
67 |
model_id,
|
68 |
+
revision="fp16" if not torch.cuda.is_available() else "fp32",
|
69 |
+
torch_dtype=torch.float16 if not torch.cuda.is_available() else torch.float32,
|
70 |
requires_safety_checker = False
|
71 |
).to("cuda")
|
72 |
|