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