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
360feed9
Commit
360feed9
authored
Dec 31, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HAPPY NEW YEAR
make save to zip into its own button instead of a checkbox
parent
f4535f6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
ui.py
modules/ui.py
+22
-8
style.css
style.css
+6
-0
No files found.
modules/ui.py
View file @
360feed9
...
@@ -570,13 +570,14 @@ Requested path was: {f}
...
@@ -570,13 +570,14 @@ Requested path was: {f}
generation_info
=
None
generation_info
=
None
with
gr
.
Column
():
with
gr
.
Column
():
with
gr
.
Row
():
with
gr
.
Row
(
elem_id
=
f
"image_buttons_{tabname}"
):
open_folder_button
=
gr
.
Button
(
folder_symbol
,
elem_id
=
"hidden_element"
if
shared
.
cmd_opts
.
hide_ui_dir_config
else
'open_folder'
)
if
tabname
!=
"extras"
:
if
tabname
!=
"extras"
:
save
=
gr
.
Button
(
'Save'
,
elem_id
=
f
'save_{tabname}'
)
save
=
gr
.
Button
(
'Save'
,
elem_id
=
f
'save_{tabname}'
)
save_zip
=
gr
.
Button
(
'Zip'
,
elem_id
=
f
'save_zip_{tabname}'
)
buttons
=
parameters_copypaste
.
create_buttons
([
"img2img"
,
"inpaint"
,
"extras"
])
buttons
=
parameters_copypaste
.
create_buttons
([
"img2img"
,
"inpaint"
,
"extras"
])
button_id
=
"hidden_element"
if
shared
.
cmd_opts
.
hide_ui_dir_config
else
'open_folder'
open_folder_button
=
gr
.
Button
(
folder_symbol
,
elem_id
=
button_id
)
open_folder_button
.
click
(
open_folder_button
.
click
(
fn
=
lambda
:
open_folder
(
opts
.
outdir_samples
or
outdir
),
fn
=
lambda
:
open_folder
(
opts
.
outdir_samples
or
outdir
),
...
@@ -585,9 +586,6 @@ Requested path was: {f}
...
@@ -585,9 +586,6 @@ Requested path was: {f}
)
)
if
tabname
!=
"extras"
:
if
tabname
!=
"extras"
:
with
gr
.
Row
():
do_make_zip
=
gr
.
Checkbox
(
label
=
"Make Zip when Save?"
,
value
=
False
)
with
gr
.
Row
():
with
gr
.
Row
():
download_files
=
gr
.
File
(
None
,
file_count
=
"multiple"
,
interactive
=
False
,
show_label
=
False
,
visible
=
False
)
download_files
=
gr
.
File
(
None
,
file_count
=
"multiple"
,
interactive
=
False
,
show_label
=
False
,
visible
=
False
)
...
@@ -608,11 +606,11 @@ Requested path was: {f}
...
@@ -608,11 +606,11 @@ Requested path was: {f}
save
.
click
(
save
.
click
(
fn
=
wrap_gradio_call
(
save_files
),
fn
=
wrap_gradio_call
(
save_files
),
_js
=
"(x, y, z, w) => [x, y,
z
, selected_gallery_index()]"
,
_js
=
"(x, y, z, w) => [x, y,
false
, selected_gallery_index()]"
,
inputs
=
[
inputs
=
[
generation_info
,
generation_info
,
result_gallery
,
result_gallery
,
do_make_zip
,
html_info
,
html_info
,
html_info
,
],
],
outputs
=
[
outputs
=
[
...
@@ -620,6 +618,22 @@ Requested path was: {f}
...
@@ -620,6 +618,22 @@ Requested path was: {f}
html_log
,
html_log
,
]
]
)
)
save_zip
.
click
(
fn
=
wrap_gradio_call
(
save_files
),
_js
=
"(x, y, z, w) => [x, y, true, selected_gallery_index()]"
,
inputs
=
[
generation_info
,
result_gallery
,
html_info
,
html_info
,
],
outputs
=
[
download_files
,
html_log
,
]
)
else
:
else
:
html_info_x
=
gr
.
HTML
()
html_info_x
=
gr
.
HTML
()
html_info
=
gr
.
HTML
()
html_info
=
gr
.
HTML
()
...
...
style.css
View file @
360feed9
...
@@ -568,6 +568,12 @@ img2maskimg, #img2maskimg > .h-60, #img2maskimg > .h-60 > div, #img2maskimg > .h
...
@@ -568,6 +568,12 @@ img2maskimg, #img2maskimg > .h-60, #img2maskimg > .h-60 > div, #img2maskimg > .h
font-size
:
95%
;
font-size
:
95%
;
}
}
#image_buttons_txt2img
button
,
#image_buttons_img2img
button
,
#image_buttons_extras
button
{
min-width
:
auto
;
padding-left
:
0.5em
;
padding-right
:
0.5em
;
}
/* The following handles localization for right-to-left (RTL) languages like Arabic.
/* The following handles localization for right-to-left (RTL) languages like Arabic.
The rtl media type will only be activated by the logic in javascript/localization.js.
The rtl media type will only be activated by the logic in javascript/localization.js.
If you change anything above, you need to make sure it is RTL compliant by just running
If you change anything above, you need to make sure it is RTL compliant by just running
...
...
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