fffiloni commited on
Commit
cf2d0d0
·
verified ·
1 Parent(s): 647628f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -153,7 +153,7 @@ def reset_inference_state():
153
 
154
  # Move necessary models back to the correct device
155
  if low_vram:
156
- models_to(models_rbm, device=device, excepts=["generator", "previewer"])
157
  models_rbm.generator.to(device)
158
  models_rbm.previewer.to(device)
159
  else:
@@ -174,10 +174,9 @@ def reset_inference_state():
174
  torch.cuda.empty_cache()
175
  gc.collect()
176
 
177
- def infer(ref_style_file, style_description, caption):
178
  global models_rbm, models_b
179
  try:
180
- caption = f"{caption} in {style_description}"
181
  height=1024
182
  width=1024
183
  batch_size=1
 
153
 
154
  # Move necessary models back to the correct device
155
  if low_vram:
156
+ models_to(models_rbm, device="cpu", excepts=["generator", "previewer"])
157
  models_rbm.generator.to(device)
158
  models_rbm.previewer.to(device)
159
  else:
 
174
  torch.cuda.empty_cache()
175
  gc.collect()
176
 
177
+ def infer(style_description, ref_style_file, caption):
178
  global models_rbm, models_b
179
  try:
 
180
  height=1024
181
  width=1024
182
  batch_size=1