d8ahazard / sd_smartprocess

Smart Pre-processing extension for Stable Diffusion
194 stars 19 forks source link

Preprocess Button No Longer Works #20

Open gurgle1979 opened 1 year ago

gurgle1979 commented 1 year ago

Is there an existing issue for this? I have searched the existing issues and checked the recent builds/commits

What happened? Starting today, as of AUTOMATIC1111 commit 52f6e94... the preprocess button in the interface no longer starts the processing.

Edge JS Console shows: (index):1533

   Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'parentNode')
at requestProgress ((index):1533:50)
at start_smart_process ((index):2605:5)
at eval (eval at <anonymous> (index.0b923826.js:75:2081), <anonymous>:3:41)
at index.0b923826.js:34:32309
at HTMLButtonElement.<anonymous> (index.0b923826.js:76:2455)
at index.0b923826.js:4:1266
at Array.forEach (<anonymous>)
at HTMLButtonElement.ae (index.0b923826.js:4:1253)
at HTMLButtonElement._ (Button.svelte:10:48)
at index.0b923826.js:4:1266

Firefox JS Console shows: Uncaught (in promise) TypeError: progressbarContainer is undefined requestProgress (index):1533 start_smartprocess (index):2605 anonymous index.0b923826.js line 75 > AsyncFunction:3 ac index.0b923826.js:34 Nt index.0b923826.js:76 ae index.0b923826.js:4 ae index.0b923826.js:4 Button.svelte:10 ae index.0b923826.js:4 ae index.0b923826.js:4 B Button.svelte:9

Steps to reproduce the problem Click "Preprocess" on the tab.

What should have happened? The processing should have initiated.

Commit where the problem happens

Within 24 hours of this commit https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/52f6e94338f31c286361802b08ee5210b8244141

Currently installed latest version of smart process: https://github.com/d8ahazard/sd_smartprocess/commit/330f47f85984e096fcfd8f1ce65c0795eab99f93

What platforms do you use to access UI ? Windows

What browsers do you use to access the UI ? Mozilla Firefox, Edge Chromium

Command Line Arguments --xformers

DexeconGithub commented 1 year ago

same issue. is there a way to bypass the button and run it anyway?

the0ckid82 commented 1 year ago

having the same issue as well

latentwiki commented 1 year ago

+++ having this issue too

Additional (potentially related to the comment up above) issue appearing in console upon loading the gradio page:

check_progressbar is not defined ReferenceError: check_progressbar is not defined

<!-- smart_process.js --><script>function start_smart_process() {
    requestProgress('sp');
    gradioApp().querySelector('#sp_error').innerHTML = '';
    return args_to_array(arguments);
}

onUiUpdate(function () {
    check_progressbar('sp', 'sp_progressbar', 'sp_progress_span', '', 'sp_interrupt', 'sp_preview', 'sp_gallery')
})</script>

Edit: Trying to fix it... found this for deforum: https://arbitriumbridge.com/?_=%2Fdeforum-art%2Fdeforum-for-automatic1111-webui%2Fcommit%2F97516023dd06438aa6ff264d809a337b47160b72%23DkuKGHnxcb%2BGWG7HiEbRTV1a

latentwiki commented 1 year ago

Found a cheap fix, but you won't have a progress bar:

// replace contents of stable-diffusion-webui/extensions/sd_smartprocess/javascript/smart_process.js:
function start_smart_process() {
    //requestProgress('sp');
    gradioApp().querySelector('#sp_error').innerHTML = '';
    return args_to_array(arguments);
}

onUiUpdate(function () {
    //check_progressbar('sp', 'sp_progressbar', 'sp_progress_span', '', 'sp_interrupt', 'sp_preview', 'sp_gallery')
    check_gallery('sp_gallery')
})

You'll be able to monitor progress via the terminal/notebook output still.

mcbradd commented 1 year ago

+1 same issue as original post.

@unstablewiki's workaround works as described.

DexeconGithub commented 1 year ago

can confirm the @unstablewiki fix works, and i can monitor the progress in the terminal window 10/10

Conner-Anderson commented 1 year ago

I'd like to second the fact that the @unstablewiki solution works just fine.

martinobettucci commented 1 year ago

I've made a PR to fix the problem of the button no longer working https://github.com/d8ahazard/sd_smartprocess/pull/21

mediocreatmybest commented 1 year ago

After applying the pull request patch I've also noticed it doesn't matter if the re-name images is checked or not, all images and caption files are now re-named and start at 00000 etc. I'm guessing this is something on the Automatic1111 WebUI side that may have this side effect as It worked as intended previously.

DarkSolus commented 1 year ago

Um.... am I dumb, or the button still doesn't work even after the latest commit? Like, I've wiped the old files and pulled the newest commit, but still nothing in console nor in output.

d8ahazard commented 1 year ago

Yeah, everything is jacked up right now. Something changed in the javascript for the base of the app, which broke everything.

Currently working on a re-write to fix this, plus add a few new features and optimize things better for VRAM usage.

On Mon, Jan 23, 2023 at 12:28 PM DarkSolus @.***> wrote:

Um.... am I dumb, or the button still doesn't work even after the latest commit? Like, I've wiped the old files and pulled the newest commit, but still nothing in console nor in output.

— Reply to this email directly, view it on GitHub https://github.com/d8ahazard/sd_smartprocess/issues/20#issuecomment-1400791885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMO4NCG55APCABJVNKFZ53WT3EUXANCNFSM6AAAAAAT5BVGD4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mediocreatmybest commented 1 year ago

Yeah, everything is jacked up right now. Something changed in the javascript for the base of the app, which broke everything. Currently working on a re-write to fix this, plus add a few new features and optimize things better for VRAM usage.

Thanks for the heads up.

Would be great if it could run in its own gradio or as an extension but I'm not sure if that is possible. Similar to the way clip-interrogator has it on the colab.

https://colab.research.google.com/github/pharmapsychotic/clip-interrogator/blob/main/clip_interrogator.ipynb#scrollTo=Pf6qkFG6MPRj