cocktailpeanut commited on
Commit
06991ed
·
1 Parent(s): 239830d
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -188,12 +188,12 @@ def generate(
188
  model.to(device)
189
  if device == "cuda":
190
  with torch.no_grad(), autocast("cuda"), model.ema_scope():
191
- return run(model, input_image, input_image_copy, width, height, instruction, steps)
192
  else:
193
- return run(model, input_image, input_image_copy, width, height, instruction, steps)
194
 
195
 
196
- def run(model, input_image, input_image_copy, width, height, instruction, steps):
197
  cond = {}
198
  cond["c_crossattn"] = [model.get_learned_conditioning([instruction]).to(model.device)]
199
  input_image = 2 * torch.tensor(np.array(input_image)).float() / 255 - 1
 
188
  model.to(device)
189
  if device == "cuda":
190
  with torch.no_grad(), autocast("cuda"), model.ema_scope():
191
+ return run(model, input_image, input_image_copy, width, height, instruction, steps, seed)
192
  else:
193
+ return run(model, input_image, input_image_copy, width, height, instruction, steps, seed)
194
 
195
 
196
+ def run(model, input_image, input_image_copy, width, height, instruction, steps, seed):
197
  cond = {}
198
  cond["c_crossattn"] = [model.get_learned_conditioning([instruction]).to(model.device)]
199
  input_image = 2 * torch.tensor(np.array(input_image)).float() / 255 - 1