AlekseyCalvin commited on
Commit
f65c4a1
·
verified ·
1 Parent(s): 3e60389

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -180,10 +180,10 @@ def infer_with_lora_wrapper(input_image, prompt, selected_index, custom_lora, se
180
  @spaces.GPU
181
  @torch.no_grad()
182
  def infer_with_lora(input_image, prompt, selected_index, custom_lora, seed=42, randomize_seed=False, steps=28, guidance_scale=2.5, lora_scale=1.0, width=960, height=1280, flux_loras=None, progress=gr.Progress(track_tqdm=True)):
183
- pipe.to("cuda")
184
- generator = torch.Generator(device="cuda").manual_seed(seed)
185
  """Generate image with selected LoRA"""
186
  global current_lora, pipe
 
 
187
 
188
  if randomize_seed:
189
  seed = random.randint(0, MAX_SEED)
 
180
  @spaces.GPU
181
  @torch.no_grad()
182
  def infer_with_lora(input_image, prompt, selected_index, custom_lora, seed=42, randomize_seed=False, steps=28, guidance_scale=2.5, lora_scale=1.0, width=960, height=1280, flux_loras=None, progress=gr.Progress(track_tqdm=True)):
 
 
183
  """Generate image with selected LoRA"""
184
  global current_lora, pipe
185
+ pipe.to("cuda")
186
+ generator = torch.Generator(device="cuda").manual_seed(seed)
187
 
188
  if randomize_seed:
189
  seed = random.randint(0, MAX_SEED)