AIrjen / OneButtonPrompt

One Button Prompt
GNU General Public License v3.0
875 stars 87 forks source link

error when using generate and upscale option "sd_checkpoint_hash" #107

Closed Kking1111 closed 1 year ago

Kking1111 commented 1 year ago

Traceback (most recent call last): File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "C:\stable-diffusion-webui\extensions\OneButtonPrompt\main.py", line 52, in generateimages currentlyselectedmodelhash = optionsresponsejson["sd_checkpoint_hash"] KeyError: 'sd_checkpoint_hash'

AIrjen commented 1 year ago

Hi! On which version of A1111 are you running?

Kking1111 commented 1 year ago

It says Version: v1.5.1. May be i enabled the origin/dev also for SDXL.

AIrjen commented 1 year ago

Thanks. This option has been introduced in v1.5 onwards. I will look at this soon.

AIrjen commented 1 year ago

I did some checks, and I found this: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12185

However, I checked the fix, and it is rolled out in the dev branch as well.

Just some questions:

Kking1111 commented 1 year ago

Strangely it has started working, I didn't even update Auto111 and i no longer have origin/dev message coming on when starting Auto1111. But now, when i use "don't generate, only upscale", I get this error: Found and upscaling files

Traceback (most recent call last): File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "C:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "C:\stable-diffusion-webui\extensions\OneButtonPrompt\main.py", line 302, in generateimages if(continuewithnextpart == True): UnboundLocalError: local variable 'continuewithnextpart' referenced before assignment

AIrjen commented 1 year ago

Hi! Thanks for getting back on this. Glad to see its working.

I just got the same issue reported. This was a bug and a mistake by me from one of the latest changes.

Should be fixed now! Sorry, didn't test this when I made the latest batch of large changes.