Spaces:
Paused
Paused
test gradio
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ def generate_image(prompt, reference_image, controlnet_conditioning_scale):
|
|
| 28 |
# Generate the image with ControlNet conditioning
|
| 29 |
generated_image = pipe(
|
| 30 |
prompt=prompt,
|
| 31 |
-
control_image=reference_image,
|
| 32 |
controlnet_conditioning_scale=controlnet_conditioning_scale,
|
| 33 |
guidance_scale=7.5,
|
| 34 |
num_inference_steps=75 # Increased from 50 to refine quality
|
|
@@ -40,7 +40,7 @@ interface = gr.Interface(
|
|
| 40 |
fn=generate_image,
|
| 41 |
inputs=[
|
| 42 |
gr.Textbox(label="Prompt"),
|
| 43 |
-
gr.Image( label="Reference Image (Style)"),
|
| 44 |
gr.Slider(label="Control Net Conditioning Scale", minimum=0, maximum=1.0, step=0.1, value=0.6),
|
| 45 |
],
|
| 46 |
outputs="image",
|
|
|
|
| 28 |
# Generate the image with ControlNet conditioning
|
| 29 |
generated_image = pipe(
|
| 30 |
prompt=prompt,
|
| 31 |
+
control_image=reference_image.resize((512, 512)),
|
| 32 |
controlnet_conditioning_scale=controlnet_conditioning_scale,
|
| 33 |
guidance_scale=7.5,
|
| 34 |
num_inference_steps=75 # Increased from 50 to refine quality
|
|
|
|
| 40 |
fn=generate_image,
|
| 41 |
inputs=[
|
| 42 |
gr.Textbox(label="Prompt"),
|
| 43 |
+
gr.Image( type= "pil",label="Reference Image (Style)"),
|
| 44 |
gr.Slider(label="Control Net Conditioning Scale", minimum=0, maximum=1.0, step=0.1, value=0.6),
|
| 45 |
],
|
| 46 |
outputs="image",
|