mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-04-03 03:00:17 -04:00
(1.0) Fix non-square controlnet dimensions. (#2056)
* Fix non-square controlnet dims * Hide batch size slider in txt2img
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user