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
acedbe67
Commit
acedbe67
authored
Oct 14, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bring history tab back, make it behave; it's still slow but won't fuck anything up until you use it
parent
4bbe5d62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
images_history.js
javascript/images_history.js
+12
-4
ui.py
modules/ui.py
+2
-2
No files found.
javascript/images_history.js
View file @
acedbe67
...
@@ -163,10 +163,15 @@ function images_history_init(){
...
@@ -163,10 +163,15 @@ function images_history_init(){
for
(
var
i
in
images_history_tab_list
){
for
(
var
i
in
images_history_tab_list
){
var
tabname
=
images_history_tab_list
[
i
]
var
tabname
=
images_history_tab_list
[
i
]
tab_btns
[
i
].
setAttribute
(
"tabname"
,
tabname
);
tab_btns
[
i
].
setAttribute
(
"tabname"
,
tabname
);
tab_btns
[
i
].
addEventListener
(
'click'
,
images_history_click_tab
);
// this refreshes history upon tab switch
// until the history is known to work well, which is not the case now, we do not do this at startup
//tab_btns[i].addEventListener('click', images_history_click_tab);
}
}
tabs_box
.
classList
.
add
(
images_history_tab_list
[
0
]);
tabs_box
.
classList
.
add
(
images_history_tab_list
[
0
]);
load_txt2img_button
.
click
();
// same as above, at page load
//load_txt2img_button.click();
}
else
{
}
else
{
setTimeout
(
images_history_init
,
500
);
setTimeout
(
images_history_init
,
500
);
}
}
...
@@ -182,12 +187,15 @@ document.addEventListener("DOMContentLoaded", function() {
...
@@ -182,12 +187,15 @@ document.addEventListener("DOMContentLoaded", function() {
buttons
.
forEach
(
function
(
bnt
){
buttons
.
forEach
(
function
(
bnt
){
bnt
.
addEventListener
(
'click'
,
images_history_click_image
,
true
);
bnt
.
addEventListener
(
'click'
,
images_history_click_image
,
true
);
});
});
// same as load_txt2img_button.click() above
/*
var cls_btn = gradioApp().getElementById(tabname + '_images_history_gallery').querySelector("svg");
var cls_btn = gradioApp().getElementById(tabname + '_images_history_gallery').querySelector("svg");
if (cls_btn){
if (cls_btn){
cls_btn.addEventListener('click', function(){
cls_btn.addEventListener('click', function(){
gradioApp().getElementById(tabname + '_images_history_renew_page').click();
gradioApp().getElementById(tabname + '_images_history_renew_page').click();
}, false);
}, false);
}
}
*/
}
}
});
});
...
...
modules/ui.py
View file @
acedbe67
...
@@ -1090,7 +1090,7 @@ def create_ui(wrap_gradio_gpu_call):
...
@@ -1090,7 +1090,7 @@ def create_ui(wrap_gradio_gpu_call):
"i2i"
:
img2img_paste_fields
"i2i"
:
img2img_paste_fields
}
}
#
images_history = img_his.create_history_tabs(gr, opts, wrap_gradio_call(modules.extras.run_pnginfo), images_history_switch_dict)
images_history
=
img_his
.
create_history_tabs
(
gr
,
opts
,
wrap_gradio_call
(
modules
.
extras
.
run_pnginfo
),
images_history_switch_dict
)
with
gr
.
Blocks
()
as
modelmerger_interface
:
with
gr
.
Blocks
()
as
modelmerger_interface
:
with
gr
.
Row
()
.
style
(
equal_height
=
False
):
with
gr
.
Row
()
.
style
(
equal_height
=
False
):
...
@@ -1487,7 +1487,7 @@ Requested path was: {f}
...
@@ -1487,7 +1487,7 @@ Requested path was: {f}
(
img2img_interface
,
"img2img"
,
"img2img"
),
(
img2img_interface
,
"img2img"
,
"img2img"
),
(
extras_interface
,
"Extras"
,
"extras"
),
(
extras_interface
,
"Extras"
,
"extras"
),
(
pnginfo_interface
,
"PNG Info"
,
"pnginfo"
),
(
pnginfo_interface
,
"PNG Info"
,
"pnginfo"
),
#
(images_history, "History", "images_history"),
(
images_history
,
"History"
,
"images_history"
),
(
modelmerger_interface
,
"Checkpoint Merger"
,
"modelmerger"
),
(
modelmerger_interface
,
"Checkpoint Merger"
,
"modelmerger"
),
(
train_interface
,
"Train"
,
"ti"
),
(
train_interface
,
"Train"
,
"ti"
),
(
settings_interface
,
"Settings"
,
"settings"
),
(
settings_interface
,
"Settings"
,
"settings"
),
...
...
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