sd-webui-prompt-history icon indicating copy to clipboard operation
sd-webui-prompt-history copied to clipboard

Problem with Automatic1111 1.6

Open abellos opened this issue 2 years ago • 11 comments
trafficstars

In 1.6 version of automatic1111 web ui the thumbnail are broken and not visible, the image are not written in the data folder of extension, pagination not work anymore

abellos avatar Sep 11 '23 12:09 abellos

thanks for the info, i will check it out.

namkazt avatar Sep 13 '23 04:09 namkazt

It may be related to this piece:

// prompt_history.js line 99
function promptHistoryAutoRefresh() {
    // hijack ui
    const btn_c = gradioApp().querySelector('#txt2img_style_create')

Since A1111 1.6 this button doesn't exist anymore, btn_c is null and the rest of the function will fail. (Unless you use some restore old ui extensions, don't know the name but they do exist)

Proposed fix:

function promptHistoryAutoRefresh() {
    // hijack ui
    const btn_c = gradioApp().querySelector('#txt2img_styles_edit_button');

zethriller avatar Sep 18 '23 22:09 zethriller

thanks @zethriller, i will check it as soon as i have some time.

namkazt avatar Sep 19 '23 02:09 namkazt

fixed in https://github.com/namkazt/sd-webui-prompt-history/commit/53cb5422a1e6c025f78e64fbd3f4ad02c5c0c2cf

namkazt avatar Sep 19 '23 06:09 namkazt

aw sorry, it only fix the display problem, the save history still has problem, i will debug somemore

namkazt avatar Sep 19 '23 06:09 namkazt

I have the feeling it starts locking itself up when a page is added (20 items per page ?) - until you refresh the webui (F5 in browser, no need for a full relaunch) This is still an unreliable lead, i can't reproduce it with 21 batches of 1x1 and the few debugs outputs i've added give nothing. However with somewhere about 50 generations without switching to the prompt history tab, it starts locking up. (!!) I hope for the sake of us all that the trigger is lower than that, i can't tell exactly how high it is. Then those pop up in the console:

Prompt History - prev_func(): global_state.config_changed: True
Prompt History - next_func(): global_state.config_changed: True

And it'll stay like that until you refresh the webui. If this stays on true, prev/next and possibly the other buttons become unusable. Ref:

# prompt_history_script.py:179
def prev_func():
  global current_page
  print("Prompt History - prev_func(): global_state.config_changed: " + str(global_state.config_changed))
  if global_state.config_changed: return

Data is recorded, i'm monitoring the data\ folder, preview images keep coming in. data.json file looks ok as well. I'm not fluent at all with python so i'm a bit nervous about going deeper in code than a few print(), sorry lol

Hope this helps, though.

zethriller avatar Sep 22 '23 21:09 zethriller

that weird, i already test pagination few times but with smaller page size ( around 3 )

namkazt avatar Oct 23 '23 14:10 namkazt

Latest revision (https://github.com/namkazt/sd-webui-prompt-history/commit/3fb37abb778df779113e8977b4fe5c735e3b1d84) has fixed both saving to history and paging. I'm way above a single page on today's generations and i can tell it works. 👍

zethriller avatar Oct 30 '23 17:10 zethriller

nice, close now, feel free to open new issue if you have any problem.

namkazt avatar Oct 31 '23 10:10 namkazt

Hello. I'm sorry, but it still doesn't work for me: previews don't get stored in /data folder. Pagination works ok.

I reinstalled stable-diffusion-webui and sd-webui-prompt-history but still no previews. I use Windows 11.

Thanks.

version: v1.6.0-2-g4afaaf8a  •  python: 3.10.6  •  torch: 2.0.1+cu118  •  xformers: 0.0.20  •  gradio: 3.41.2

terrrst avatar Nov 06 '23 19:11 terrrst

Hello. I'm sorry, but it still doesn't work for me: previews don't get stored in /data folder. Pagination works ok.

I reinstalled stable-diffusion-webui and sd-webui-prompt-history but still no previews. I use Windows 11.

Thanks.

version: v1.6.0-2-g4afaaf8a  •  python: 3.10.6  •  torch: 2.0.1+cu118  •  xformers: 0.0.20  •  gradio: 3.41.2

Can you try to open settings page and set thumbnail to NOT none

namkazt avatar Nov 07 '23 01:11 namkazt