Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -158,11 +158,14 @@ def process_image(
|
|
| 158 |
|
| 159 |
# Generate image
|
| 160 |
with torch.no_grad():
|
| 161 |
-
output = pipeline(
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
|
|
|
|
|
|
|
|
|
| 166 |
num_inference_steps=num_inference_steps,
|
| 167 |
generator=generator,
|
| 168 |
height=target_height,
|
|
@@ -192,7 +195,6 @@ def process_image(
|
|
| 192 |
print(f"Error processing image: {str(e)}")
|
| 193 |
return None
|
| 194 |
|
| 195 |
-
|
| 196 |
# Create Gradio interface
|
| 197 |
iface = gr.Interface(
|
| 198 |
fn=process_image,
|
|
|
|
| 158 |
|
| 159 |
# Generate image
|
| 160 |
with torch.no_grad():
|
| 161 |
+
inference_time, output = pipeline(
|
| 162 |
+
0.6666, # t_max
|
| 163 |
+
0.0, # t_min
|
| 164 |
+
False, # tile_diffusion
|
| 165 |
+
None, # tile_diffusion_size
|
| 166 |
+
None, # tile_diffusion_stride
|
| 167 |
+
prompt, # validation_prompt / added_prompt
|
| 168 |
+
input_pil, # validation_image
|
| 169 |
num_inference_steps=num_inference_steps,
|
| 170 |
generator=generator,
|
| 171 |
height=target_height,
|
|
|
|
| 195 |
print(f"Error processing image: {str(e)}")
|
| 196 |
return None
|
| 197 |
|
|
|
|
| 198 |
# Create Gradio interface
|
| 199 |
iface = gr.Interface(
|
| 200 |
fn=process_image,
|