ameerazam08 commited on
Commit
f6b0224
·
verified ·
1 Parent(s): 0da3709

added spaces

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -14,6 +14,7 @@ import requests
14
  from PIL import Image
15
  import io
16
  import json
 
17
 
18
  from PIL import Image
19
  import gradio as gr
@@ -342,7 +343,7 @@ def update_selection_sticker(evt: gr.SelectData, width, height):
342
  height,
343
  )
344
 
345
- # @spaces.GPU(duration=100)
346
  def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress):
347
  pipe.to("cuda")
348
  generator = torch.Generator(device="cuda").manual_seed(seed)
@@ -365,7 +366,7 @@ def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scal
365
 
366
 
367
 
368
- # @spaces.GPU(duration=100)
369
  def run_lora_logo(prompt, image_strength, cfg_scale, steps, selected_index, randomize_seed, seed, width, height, lora_scale, progress=gr.Progress(track_tqdm=True)):
370
  if selected_index is None:
371
  raise gr.Error("You must select a Logo Image before proceeding.🧨")
@@ -388,7 +389,7 @@ def run_lora_logo(prompt, image_strength, cfg_scale, steps, selected_index, rand
388
  yield image, seed, gr.update(value=progress_bar, visible=True)
389
 
390
 
391
- # @spaces.GPU(duration=100)
392
  def run_lora_sticker(prompt, image_strength, cfg_scale, steps, selected_index, randomize_seed, seed, width, height, lora_scale, progress=gr.Progress(track_tqdm=True)):
393
  if selected_index is None:
394
  raise gr.Error("You must select a Sticker Image before proceeding.🧨")
 
14
  from PIL import Image
15
  import io
16
  import json
17
+ import spaces
18
 
19
  from PIL import Image
20
  import gradio as gr
 
343
  height,
344
  )
345
 
346
+ @spaces.GPU(duration=100)
347
  def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress):
348
  pipe.to("cuda")
349
  generator = torch.Generator(device="cuda").manual_seed(seed)
 
366
 
367
 
368
 
369
+ @spaces.GPU(duration=100)
370
  def run_lora_logo(prompt, image_strength, cfg_scale, steps, selected_index, randomize_seed, seed, width, height, lora_scale, progress=gr.Progress(track_tqdm=True)):
371
  if selected_index is None:
372
  raise gr.Error("You must select a Logo Image before proceeding.🧨")
 
389
  yield image, seed, gr.update(value=progress_bar, visible=True)
390
 
391
 
392
+ @spaces.GPU(duration=100)
393
  def run_lora_sticker(prompt, image_strength, cfg_scale, steps, selected_index, randomize_seed, seed, width, height, lora_scale, progress=gr.Progress(track_tqdm=True)):
394
  if selected_index is None:
395
  raise gr.Error("You must select a Sticker Image before proceeding.🧨")