(1.0) Fix non-square controlnet dimensions. (#2056)

* Fix non-square controlnet dims

* Hide batch size slider in txt2img
This commit is contained in:
Ean Garvey
2024-01-04 21:33:55 -06:00
committed by GitHub
parent 6853a33728
commit 0a6f6fad86
3 changed files with 17 additions and 16 deletions

View File

@@ -266,8 +266,8 @@ class StencilPipeline(StableDiffusionPipeline):
latent_model_input_1 = latent_model_input
# Multicontrolnet
width = latent_model_input_1.shape[2]
height = latent_model_input_1.shape[3]
height = latent_model_input_1.shape[2]
width = latent_model_input_1.shape[3]
dtype = latent_model_input_1.dtype
control_acc = (
[torch.zeros((2, 320, height, width), dtype=dtype)] * 3

View File

@@ -597,20 +597,20 @@ with gr.Blocks(title="Image-to-Image") as img2img_web:
value="None",
choices=choices,
)
canvas_width = gr.Slider(
label="Canvas Width",
minimum=256,
maximum=1024,
value=512,
step=1,
visible=False,
)
canvas_height = gr.Slider(
label="Canvas Height",
minimum=256,
maximum=1024,
maximum=768,
value=512,
step=1,
step=8,
visible=False,
)
canvas_width = gr.Slider(
label="Canvas Width",
minimum=256,
maximum=768,
value=512,
step=8,
visible=False,
)
make_canvas = gr.Button(
@@ -710,17 +710,17 @@ with gr.Blocks(title="Image-to-Image") as img2img_web:
canvas_width = gr.Slider(
label="Canvas Width",
minimum=256,
maximum=1024,
maximum=768,
value=512,
step=1,
step=8,
visible=False,
)
canvas_height = gr.Slider(
label="Canvas Height",
minimum=256,
maximum=1024,
maximum=768,
value=512,
step=1,
step=8,
visible=False,
)
make_canvas = gr.Button(

View File

@@ -623,6 +623,7 @@ with gr.Blocks(title="Text-to-Image", css=dark_theme) as txt2img_web:
step=1,
label=default_settings.get("batch_size"),
interactive=True,
visible=False,
)
repeatable_seeds = gr.Checkbox(
default_settings.get("repeatable_seeds"),