- Using Local SD-WebUI API option will send a post request to stable-diffusion-webui running with the --api switch on http://127.0.0.1:7860/sdapi/v1/txt2img
Signed-off-by: Robert Vining
- sends prompt to locally hosted stable-diffusion-webui API and retrieves
image result. info from SD API is embedded in png file as it is saved.
image files are named with the current date at generation and saved
in /stories/art/
Modified UI_2_generate_image() to call text2img_api() instead of text2img_horde
Signed-off-by: Robert Vining <offers@robertrvining.com>
Add the PhraseBiasLogitsProcessor to the logits processor list
Fix an issue with bias phrases that contain the start token
multiple times. Because we were searching backwards for the first
occurrence of the start token, we would restart the phrase when
we encountered a subsequent instance of the token. We now search
forwards from the maximum possible overlap to find the maximum overlap.
Fix an issue with the phrase bias token index not accounting for
non-matching words. Previously, once we found the start token,
we would apply the bias for each token in the bias phrase even if
subsequent tokens in the context didn't match the bias phrase.
Do not apply phrase completion if the bias score is negative.
If multiple phrases apply a score modifier to the same token, add
the scores rather than replacing the modifier with the last occurrence.
Increase the maximum range of the bias slider. For extremely
repetitive text on large models, -12 is insufficient to break the
model out of its loop. -50 to 50 is potentially excessive, but it's
safer to give the user some additional control over the bias score.
When streaming preview tokens arrive, they are accumulated into
a stream_preview span. These tokens were inserted one-by-one
into the `innerText` property of this span. However, the behavior
of innerText is to discard trailing whitespace, which meant
that a token that was entirely composed of spaces would be
discarded.
See this link for more information on this behavior:
https://stackoverflow.com/questions/47768523/empty-spaces-are-ignored-by-the-innertext-property
I tried fixing this by switching to use `textContent`, however this
caused newlines to be discarded instead. This change fixes the issue
by accumulating incoming tokens into a string and then assigning the
string to innerText.