Ketengan-Diffusion commited on
Commit
037ee32
Β·
verified Β·
1 Parent(s): 9bc49f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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
- # Assuming you've corrected the model paths as per previous discussions
13
- prior = StableCascadePriorPipeline.from_pretrained("./SomniumSC-v1.1", torch_dtype=torch.bfloat16).to(device)
 
 
 
 
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"