Spaces:
Running
on
Zero
Running
on
Zero
remove progress bar
Browse files
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 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
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 |
|