ariG23498 HF staff commited on
Commit
a8626d0
·
1 Parent(s): e24284e

remove progress bar

Browse files
Files changed (1) hide show
  1. app.py +10 -15
app.py CHANGED
@@ -38,21 +38,16 @@ def generate(prompt, input_image, seed):
38
  seed = int(seed) # Ensure seed is an integer
39
  generator = torch.Generator(device="cuda").manual_seed(seed) # Maintain reproducibility
40
 
41
- # Create a progress bar manually
42
- progress = gr.Progress(track_tqdm=True)
43
-
44
- with progress.tqdm(total=1, desc="Generating Image") as pbar:
45
- output_image = pipeline(
46
- control_image=input_image,
47
- prompt=prompt,
48
- guidance_scale=30.,
49
- num_inference_steps=8,
50
- max_sequence_length=512,
51
- height=input_image.height,
52
- width=input_image.width,
53
- generator=generator # Pass the seeded generator
54
- ).images[0]
55
- pbar.update(1) # Update progress bar
56
 
57
  return output_image
58
 
 
38
  seed = int(seed) # Ensure seed is an integer
39
  generator = torch.Generator(device="cuda").manual_seed(seed) # Maintain reproducibility
40
 
41
+ output_image = pipeline(
42
+ control_image=input_image,
43
+ prompt=prompt,
44
+ guidance_scale=30.,
45
+ num_inference_steps=8,
46
+ max_sequence_length=512,
47
+ height=input_image.height,
48
+ width=input_image.width,
49
+ generator=generator # Pass the seeded generator
50
+ ).images[0]
 
 
 
 
 
51
 
52
  return output_image
53