Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,13 @@ import torch
|
|
6 |
def load_image_generator():
|
7 |
try:
|
8 |
model = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
9 |
-
"stabilityai/stable-diffusion-
|
10 |
torch_dtype=torch.float16,
|
11 |
variant="fp16",
|
12 |
use_safetensors=True
|
13 |
)
|
14 |
# Ensure it runs on CPU
|
15 |
-
model = model.to("cpu")
|
16 |
return model
|
17 |
except Exception as e:
|
18 |
print(f"Error loading model: {e}")
|
|
|
6 |
def load_image_generator():
|
7 |
try:
|
8 |
model = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
9 |
+
"stabilityai/stable-diffusion-2-1",
|
10 |
torch_dtype=torch.float16,
|
11 |
variant="fp16",
|
12 |
use_safetensors=True
|
13 |
)
|
14 |
# Ensure it runs on CPU
|
15 |
+
#model = model.to("cpu")
|
16 |
return model
|
17 |
except Exception as e:
|
18 |
print(f"Error loading model: {e}")
|