KingNish commited on
Commit
4e918fb
1 Parent(s): cdf2ba8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -64,7 +64,11 @@ def generate_image(prompt, base="Realistic", motion="", step=8, progress=gr.Prog
64
  pipe.set_adapters(["motion"], [0.7])
65
  motion_loaded = motion
66
 
67
- output = pipe(prompt=f"{base} image of {prompt}", guidance_scale=1.2, num_inference_steps=step)
 
 
 
 
68
 
69
  name = str(uuid.uuid4()).replace("-", "")
70
  path = f"/tmp/{name}.mp4"
 
64
  pipe.set_adapters(["motion"], [0.7])
65
  motion_loaded = motion
66
 
67
+ progress((0, step))
68
+ def progress_callback(i, t, z):
69
+ progress((i+1, step))
70
+
71
+ output = pipe(prompt=prompt, guidance_scale=1.2, num_inference_steps=step, callback=progress_callback, callback_steps=1)
72
 
73
  name = str(uuid.uuid4()).replace("-", "")
74
  path = f"/tmp/{name}.mp4"