Update app.py
Browse files
app.py
CHANGED
|
@@ -101,14 +101,16 @@ def pipe_inference(
|
|
| 101 |
guidance_scale=guidance_scale,
|
| 102 |
neg_prompt_ids=negative_prompt_ids,
|
| 103 |
jit=True,
|
| 104 |
-
)
|
| 105 |
-
all_outputs = []
|
| 106 |
-
all_outputs.append(image)
|
| 107 |
-
if not is_canny:
|
| 108 |
-
|
| 109 |
|
| 110 |
-
for image in output.images:
|
| 111 |
-
|
|
|
|
|
|
|
| 112 |
return all_outputs
|
| 113 |
|
| 114 |
def resize_image(image, resolution):
|
|
|
|
| 101 |
guidance_scale=guidance_scale,
|
| 102 |
neg_prompt_ids=negative_prompt_ids,
|
| 103 |
jit=True,
|
| 104 |
+
).images
|
| 105 |
+
# all_outputs = []
|
| 106 |
+
# all_outputs.append(image)
|
| 107 |
+
# if not is_canny:
|
| 108 |
+
# all_outputs.append(resized_image)
|
| 109 |
|
| 110 |
+
# for image in output.images:
|
| 111 |
+
# all_outputs.append(image)
|
| 112 |
+
|
| 113 |
+
all_outputs = pipe.numpy_to_pil(np.asarray(output.reshape((num_samples,) + output.shape[-3:])))
|
| 114 |
return all_outputs
|
| 115 |
|
| 116 |
def resize_image(image, resolution):
|