Spaces:
Runtime error
Runtime error
Ketengan-Diffusion
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,12 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
9 |
num_images_per_prompt = 1
|
10 |
print(f"Running on: {device}")
|
11 |
|
12 |
-
|
13 |
-
prior = StableCascadePriorPipeline.from_pretrained("
|
|
|
|
|
|
|
|
|
14 |
decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", torch_dtype=torch.float16).to(device)
|
15 |
|
16 |
deafult_negative = "lowres"
|
|
|
9 |
num_images_per_prompt = 1
|
10 |
print(f"Running on: {device}")
|
11 |
|
12 |
+
try:
|
13 |
+
prior = StableCascadePriorPipeline.from_pretrained("Ketengan-Diffusion/SomniumSC-v1.1", torch_dtype=torch.bfloat16).to(device)
|
14 |
+
except OSError:
|
15 |
+
print("Failed to load model from Hugging Face Model Hub. Loading from local path instead.")
|
16 |
+
prior = StableCascadePriorPipeline.from_pretrained("./SomniumSC-v1.1", torch_dtype=torch.bfloat16).to(device)
|
17 |
+
|
18 |
decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", torch_dtype=torch.float16).to(device)
|
19 |
|
20 |
deafult_negative = "lowres"
|