Update app.py
Browse files
app.py
CHANGED
|
@@ -54,15 +54,14 @@ def generate_(prompt, negative_prompt, grayscale_image, num_steps, controlnet_co
|
|
| 54 |
|
| 55 |
@spaces.GPU
|
| 56 |
def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed):
|
| 57 |
-
|
| 58 |
# resize input_image to 1024x1024
|
| 59 |
input_image = resize_image(input_image)
|
| 60 |
-
|
| 61 |
grayscale_image = input_image.convert('L').convert('RGB')
|
| 62 |
-
|
| 63 |
images = generate_(prompt, negative_prompt, grayscale_image, num_steps, controlnet_conditioning_scale, seed)
|
| 64 |
|
| 65 |
-
|
|
|
|
| 66 |
|
| 67 |
block = gr.Blocks().queue()
|
| 68 |
|
|
|
|
| 54 |
|
| 55 |
@spaces.GPU
|
| 56 |
def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed):
|
|
|
|
| 57 |
# resize input_image to 1024x1024
|
| 58 |
input_image = resize_image(input_image)
|
| 59 |
+
|
| 60 |
grayscale_image = input_image.convert('L').convert('RGB')
|
|
|
|
| 61 |
images = generate_(prompt, negative_prompt, grayscale_image, num_steps, controlnet_conditioning_scale, seed)
|
| 62 |
|
| 63 |
+
# Return both grayscale and output images in a list for the gallery
|
| 64 |
+
return [grayscale_image, images[0]]
|
| 65 |
|
| 66 |
block = gr.Blocks().queue()
|
| 67 |
|