Spaces:
Running
on
Zero
Running
on
Zero
Update raw.py
Browse files
raw.py
CHANGED
|
@@ -29,6 +29,7 @@ def generate_image(prompt, scale, steps, control_image):
|
|
| 29 |
w, h = control_image.size
|
| 30 |
# Upscale x1
|
| 31 |
control_image = control_image.resize((int(w * scale), int(h * scale)))
|
|
|
|
| 32 |
image = pipe(
|
| 33 |
prompt=prompt,
|
| 34 |
control_image=control_image,
|
|
@@ -50,7 +51,7 @@ iface = gr.Interface(
|
|
| 50 |
gr.Image(type="pil", label="Control Image"),
|
| 51 |
],
|
| 52 |
outputs=[
|
| 53 |
-
gr.Image(type="pil", label="Generated Image"),
|
| 54 |
],
|
| 55 |
title="FLUX ControlNet Image Generation",
|
| 56 |
description="Generate images using the FluxControlNetPipeline. Upload a control image and enter a prompt to create an image.",
|
|
|
|
| 29 |
w, h = control_image.size
|
| 30 |
# Upscale x1
|
| 31 |
control_image = control_image.resize((int(w * scale), int(h * scale)))
|
| 32 |
+
print("Size to: " + control_image.size[0] + ", " + control_image.size[1])
|
| 33 |
image = pipe(
|
| 34 |
prompt=prompt,
|
| 35 |
control_image=control_image,
|
|
|
|
| 51 |
gr.Image(type="pil", label="Control Image"),
|
| 52 |
],
|
| 53 |
outputs=[
|
| 54 |
+
gr.Image(type="pil", label="Generated Image", format="png"),
|
| 55 |
],
|
| 56 |
title="FLUX ControlNet Image Generation",
|
| 57 |
description="Generate images using the FluxControlNetPipeline. Upload a control image and enter a prompt to create an image.",
|