Trojaner / text-generation-webui-stable_diffusion

Integrate image generation capabilities to text-generation-webui using Stable Diffusion.
Other
51 stars 5 forks source link

Issue: Lost context in Continous mode #13

Closed TheInvisibleMage closed 6 months ago

TheInvisibleMage commented 6 months ago

Description

Continuous mode seems non-functional about half of the time; no image is produced. Debugging shows that the context seems to "lag behind" sometimes. An example debug sequence is below.

It should be noted that the above is not consistent; sometimes the desired context makes it through, and the image generates successfully. This would suggest some kind of race condition around the context being set/loaded.

UI after one failure, during second attempt: image

Debug during second attempt: image

Additional Info

Trojaner commented 6 months ago

I noticed this issue as well but did not find a good way to reproduce it in a reliable way. Probably related to a different thread handling that part. I already reworked the way how the context is stored and it will no longer use a local thread state (as text-generation-webui doesn't support multithreading anyway). Might rework it further and make it part of state instead but for now it seems to be working.

I will push the related changes later this weekend as part of a bigger update that also fixes some other stuff like some values (especially booleans and enums) not being updated correctly via the UI.