mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-03-07 22:31:50 -08:00
gradio4
This commit is contained in:
parent
ac02216e54
commit
051375258c
15 changed files with 244 additions and 135 deletions
|
|
@ -108,14 +108,6 @@ function get_img2img_tab_index() {
|
|||
function create_submit_args(args) {
|
||||
var res = Array.from(args);
|
||||
|
||||
// As it is currently, txt2img and img2img send back the previous output args (txt2img_gallery, generation_info, html_info) whenever you generate a new image.
|
||||
// This can lead to uploading a huge gallery of previously generated images, which leads to an unnecessary delay between submitting and beginning to generate.
|
||||
// I don't know why gradio is sending outputs along with inputs, but we can prevent sending the image gallery here, which seems to be an issue for some.
|
||||
// If gradio at some point stops sending outputs, this may break something
|
||||
if (Array.isArray(res[res.length - 3])) {
|
||||
res[res.length - 3] = null;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +175,6 @@ function submit_extras() {
|
|||
|
||||
res[0] = id;
|
||||
|
||||
console.log(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue