Spaces:
vilarin
/
Running on Zero

vilarin commited on
Commit
b9797ba
·
verified ·
1 Parent(s): fda59ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -60,13 +60,13 @@ def scrape_lora_link(url):
60
 
61
  def enable_lora(lora_scale,lora_add):
62
  if not lora_add:
63
- gradio.Info("No Lora Loaded, Use basemodel", duration=5)
64
  else:
65
  url = f'https://huggingface.co/{lora_add}/tree/main'
66
  lora_name = scrape_lora_link(url)
67
  pipe.load_lora_weights(lora_add, weight_name=lora_name)
68
  pipe.fuse_lora(lora_scale=lora_scale)
69
- gradio.Info(f"{lora_add} Loaded", duration=5)
70
 
71
  @spaces.GPU()
72
  def generate_image(
@@ -77,7 +77,8 @@ def generate_image(
77
  scales:float=3.5,
78
  steps:int=24,
79
  seed:int=-1,
80
- nums:int=1):
 
81
 
82
  pipe.to(device="cuda")
83
 
 
60
 
61
  def enable_lora(lora_scale,lora_add):
62
  if not lora_add:
63
+ gr.Info("No Lora Loaded, Use basemodel", duration=5)
64
  else:
65
  url = f'https://huggingface.co/{lora_add}/tree/main'
66
  lora_name = scrape_lora_link(url)
67
  pipe.load_lora_weights(lora_add, weight_name=lora_name)
68
  pipe.fuse_lora(lora_scale=lora_scale)
69
+ gr.Info(f"{lora_add} Loaded", duration=5)
70
 
71
  @spaces.GPU()
72
  def generate_image(
 
77
  scales:float=3.5,
78
  steps:int=24,
79
  seed:int=-1,
80
+ nums:int=1,
81
+ progress=gr.Progress(track_tqdm=True)):
82
 
83
  pipe.to(device="cuda")
84