Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
de973804
Commit
de973804
authored
Jan 07, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this breaks on default config because width, height, hr_scale are None at that point.
parent
01cc07b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
ui.py
modules/ui.py
+6
-8
No files found.
modules/ui.py
View file @
de973804
...
@@ -725,14 +725,8 @@ def create_ui():
...
@@ -725,14 +725,8 @@ def create_ui():
hr_resize_x
=
gr
.
Slider
(
minimum
=
0
,
maximum
=
2048
,
step
=
8
,
label
=
"Resize width to"
,
value
=
0
,
elem_id
=
"txt2img_hr_resize_x"
)
hr_resize_x
=
gr
.
Slider
(
minimum
=
0
,
maximum
=
2048
,
step
=
8
,
label
=
"Resize width to"
,
value
=
0
,
elem_id
=
"txt2img_hr_resize_x"
)
hr_resize_y
=
gr
.
Slider
(
minimum
=
0
,
maximum
=
2048
,
step
=
8
,
label
=
"Resize height to"
,
value
=
0
,
elem_id
=
"txt2img_hr_resize_y"
)
hr_resize_y
=
gr
.
Slider
(
minimum
=
0
,
maximum
=
2048
,
step
=
8
,
label
=
"Resize height to"
,
value
=
0
,
elem_id
=
"txt2img_hr_resize_y"
)
with
FormRow
(
elem_id
=
"txt2img_hires_fix_row3"
):
with
FormRow
(
elem_id
=
"txt2img_hires_fix_row3"
):
hr_final_resolution
=
gr
.
Textbox
(
value
=
calc_resolution_hires
(
width
.
value
,
height
.
value
,
hr_scale
.
value
),
hr_final_resolution
=
gr
.
Textbox
(
value
=
""
,
elem_id
=
"txtimg_hr_finalres"
,
label
=
"Upscaled resolution"
,
interactive
=
False
)
elem_id
=
"txtimg_hr_finalres"
,
label
=
"Upscaled resolution"
,
interactive
=
False
)
hr_scale
.
change
(
fn
=
calc_resolution_hires
,
inputs
=
[
width
,
height
,
hr_scale
],
outputs
=
hr_final_resolution
,
show_progress
=
False
)
width
.
change
(
fn
=
calc_resolution_hires
,
inputs
=
[
width
,
height
,
hr_scale
],
outputs
=
hr_final_resolution
,
show_progress
=
False
)
height
.
change
(
fn
=
calc_resolution_hires
,
inputs
=
[
width
,
height
,
hr_scale
],
outputs
=
hr_final_resolution
,
show_progress
=
False
)
elif
category
==
"batch"
:
elif
category
==
"batch"
:
if
not
opts
.
dimensions_and_batch_together
:
if
not
opts
.
dimensions_and_batch_together
:
...
@@ -744,6 +738,10 @@ def create_ui():
...
@@ -744,6 +738,10 @@ def create_ui():
with
FormGroup
(
elem_id
=
"txt2img_script_container"
):
with
FormGroup
(
elem_id
=
"txt2img_script_container"
):
custom_inputs
=
modules
.
scripts
.
scripts_txt2img
.
setup_ui
()
custom_inputs
=
modules
.
scripts
.
scripts_txt2img
.
setup_ui
()
hr_scale
.
change
(
fn
=
calc_resolution_hires
,
inputs
=
[
width
,
height
,
hr_scale
],
outputs
=
hr_final_resolution
,
show_progress
=
False
)
width
.
change
(
fn
=
calc_resolution_hires
,
inputs
=
[
width
,
height
,
hr_scale
],
outputs
=
hr_final_resolution
,
show_progress
=
False
)
height
.
change
(
fn
=
calc_resolution_hires
,
inputs
=
[
width
,
height
,
hr_scale
],
outputs
=
hr_final_resolution
,
show_progress
=
False
)
txt2img_gallery
,
generation_info
,
html_info
,
html_log
=
create_output_panel
(
"txt2img"
,
opts
.
outdir_txt2img_samples
)
txt2img_gallery
,
generation_info
,
html_info
,
html_log
=
create_output_panel
(
"txt2img"
,
opts
.
outdir_txt2img_samples
)
parameters_copypaste
.
bind_buttons
({
"txt2img"
:
txt2img_paste
},
None
,
txt2img_prompt
)
parameters_copypaste
.
bind_buttons
({
"txt2img"
:
txt2img_paste
},
None
,
txt2img_prompt
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment