anzorq commited on
Commit
74a64f7
1 Parent(s): 1b4dcc5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -62,10 +62,12 @@ else: # download all models
62
  vae = AutoencoderKL.from_pretrained(current_model.path, subfolder="vae", torch_dtype=torch.float16)
63
  for model in models:
64
  try:
 
65
  unet = UNet2DConditionModel.from_pretrained(model.path, subfolder="unet", torch_dtype=torch.float16)
66
  model.pipe_t2i = StableDiffusionPipeline.from_pretrained(model.path, unet=unet, vae=vae, torch_dtype=torch.float16, scheduler=scheduler)
67
  model.pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(model.path, unet=unet, vae=vae, torch_dtype=torch.float16, scheduler=scheduler)
68
- except:
 
69
  models.remove(model)
70
  pipe = models[0].pipe_t2i
71
 
 
62
  vae = AutoencoderKL.from_pretrained(current_model.path, subfolder="vae", torch_dtype=torch.float16)
63
  for model in models:
64
  try:
65
+ print(f"Downloading {model.name} model...")
66
  unet = UNet2DConditionModel.from_pretrained(model.path, subfolder="unet", torch_dtype=torch.float16)
67
  model.pipe_t2i = StableDiffusionPipeline.from_pretrained(model.path, unet=unet, vae=vae, torch_dtype=torch.float16, scheduler=scheduler)
68
  model.pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(model.path, unet=unet, vae=vae, torch_dtype=torch.float16, scheduler=scheduler)
69
+ except Exception as e:
70
+ print("Failed to load model " + model.name + ": " + str(e))
71
  models.remove(model)
72
  pipe = models[0].pipe_t2i
73