gokaygokay multimodalart HF staff commited on
Commit
29f3401
1 Parent(s): 0f4b6ed

Add progress tracking (#3)

Browse files

- Add progress tracking (3e31d7bc304561c9a4edb4f35f04004af10d5b33)


Co-authored-by: Apolinário from multimodal AI art <multimodalart@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -33,7 +33,7 @@ pipe = pipe.to("cuda")
33
  pipe.enable_model_cpu_offload()
34
 
35
  @spaces.GPU
36
- def generate_image(prompt, negative_prompt, height, width, num_inference_steps, guidance_scale, num_images_per_prompt, use_random_seed, seed):
37
  if use_random_seed:
38
  seed = random.randint(0, 2**32 - 1)
39
  else:
 
33
  pipe.enable_model_cpu_offload()
34
 
35
  @spaces.GPU
36
+ def generate_image(prompt, negative_prompt, height, width, num_inference_steps, guidance_scale, num_images_per_prompt, use_random_seed, seed, progress=gr.Progress(track_tqdm=True)):
37
  if use_random_seed:
38
  seed = random.randint(0, 2**32 - 1)
39
  else: