multimodalart HF staff commited on
Commit
ec4e998
1 Parent(s): 4a78495

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -155,11 +155,10 @@ getimagesizeandcount = NODE_CLASS_MAPPINGS["GetImageSizeAndCount"]()
155
  depthanything_v2 = NODE_CLASS_MAPPINGS["DepthAnything_V2"]()
156
  imageresize = NODE_CLASS_MAPPINGS["ImageResize+"]()
157
 
 
 
158
  model_management.load_models_gpu([
159
- CLIP_MODEL[0].patcher,
160
- VAE_MODEL[0].patcher,
161
- UNET_MODEL[0],
162
- CLIP_VISION_MODEL[0].patcher,
163
  ])
164
 
165
  @spaces.GPU
 
155
  depthanything_v2 = NODE_CLASS_MAPPINGS["DepthAnything_V2"]()
156
  imageresize = NODE_CLASS_MAPPINGS["ImageResize+"]()
157
 
158
+ model_loaders = [CLIP_MODEL, VAE_MODEL, UNET_MODEL, CLIP_VISION_MODEL, DEPTH_MODEL, STYLE_MODEL]
159
+
160
  model_management.load_models_gpu([
161
+ loader[0].patcher if hasattr(loader[0], 'patcher') else loader[0] for loader in model_loaders
 
 
 
162
  ])
163
 
164
  @spaces.GPU