Yaron Koresh commited on
Commit
c87c14d
·
verified ·
1 Parent(s): ae40afc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -66,8 +66,8 @@ def translate(text,lang):
66
  print(ret)
67
  return ret
68
 
69
- progress((0, step))
70
  def progress_callback(i, t, z):
 
71
  progress((i+1, step))
72
 
73
  def generate_random_string(length):
@@ -169,12 +169,16 @@ def main():
169
  global device
170
  global step
171
  global dtype
172
-
 
173
  device = "cuda"
174
  dtype = torch.bfloat16
175
  result=[]
176
  step = 2
177
 
 
 
 
178
  base = "stabilityai/stable-diffusion-xl-base-1.0"
179
  repo = "ByteDance/SDXL-Lightning"
180
  ckpt = f"sdxl_lightning_{step}step_unet.safetensors"
 
66
  print(ret)
67
  return ret
68
 
 
69
  def progress_callback(i, t, z):
70
+ global progress
71
  progress((i+1, step))
72
 
73
  def generate_random_string(length):
 
169
  global device
170
  global step
171
  global dtype
172
+ global progress
173
+
174
  device = "cuda"
175
  dtype = torch.bfloat16
176
  result=[]
177
  step = 2
178
 
179
+ progress=gr.Progress()
180
+ progress((0, step))
181
+
182
  base = "stabilityai/stable-diffusion-xl-base-1.0"
183
  repo = "ByteDance/SDXL-Lightning"
184
  ckpt = f"sdxl_lightning_{step}step_unet.safetensors"