fffiloni commited on
Commit
43f7a39
1 Parent(s): e6fed3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -351,10 +351,8 @@ def infer_compo(style_description, ref_style_file, caption, ref_sub_file):
351
 
352
  if low_vram:
353
  models_to(models_rbm, device="cpu", excepts=["generator", "previewer"])
354
- if hasattr(sam_model, 'sam'):
355
- sam_model.sam.to("cpu")
356
- if hasattr(sam_model, 'text_encoder'):
357
- sam_model.text_encoder.to("cpu")
358
 
359
  # Stage C reverse process.
360
  sampling_c = extras.gdf.sample(
 
351
 
352
  if low_vram:
353
  models_to(models_rbm, device="cpu", excepts=["generator", "previewer"])
354
+ models_to(sam_model, device)
355
+ models_to(sam_model.sam, device)
 
 
356
 
357
  # Stage C reverse process.
358
  sampling_c = extras.gdf.sample(