divamgupta / diffusionbee-stable-diffusion-ui

Diffusion Bee is the easiest way to run Stable Diffusion locally on your M1 Mac. Comes with a one-click installer. No dependencies or technical knowledge needed.
https://diffusionbee.com
GNU Affero General Public License v3.0
12.4k stars 608 forks source link

Copy Paste Prompt from History = Prompt Too Long! #310

Open enzyme69 opened 1 year ago

enzyme69 commented 1 year ago

I remember using the Tensorflow version of DiffusionBee on Mac, and copy pasting my history, somewhat I kept getting "Prompt Too Long".

My feeling is that when copy pasting on that, I also copy paste some hidden characters or something. Try copy pasting prompt into Notes and you can see the issue.

It might be a bug.

NOTE: The prompt text field is also too small.

Leland commented 1 year ago

Can you provide a prompt that's long enough to cause this error?

sharetocreate commented 1 year ago

Many thanks for making this app - I've just got this issue too by copy pasting (prompt pasted below) - will try enzyme69's suggestion when the models have downloaded

a beautiful empress portrait, with a brilliant, impossible striking big cosmic galaxy headpiece, clothes entirely made out of cosmos chaos energy, symmetrical, dramatic studio lighting, rococo, baroque, jewels, asian, hyperrealism, closeup, D&D, fantasy, intricate, elegant, highly detailed, digital painting, artstation, octane render, 8k, concept art, matte, sharp focus, illustration, art by Artgerm and Greg Rutkowski and Alphonse Muchaa

Update : pasting to / from plain text file didn't work - reducing prompt to three lines worked

a beautiful empress portrait, a beautiful empress portrait, hyperrealism, closeup, D&D, fantasy, intricate, elegant, highly detailed, digital painting, artstation, octane render, 8k, concept art, matte, sharp focus, illustration, art by Artgerm and Greg Rutkowski and Alphonse Muchaa

but produced very different results - is it possible to extend the prompt text field?

kelvinthh commented 1 year ago

This also occurs to negative prompt as well, some custom models require a tediously long negative prompt in order to function properly, it would be a life saver if this could be fixed/improved!

BlackAlbatros commented 1 year ago

How can this be solved? Having the same issues. Not enough space for both prompt and negative prompt.

wokenlex commented 1 year ago

For example, this prompt makes this problem too: https://arthub.ai/art/23835 (just tried one of the first examples from this hub).

justinormont commented 1 year ago

The token length check is here: https://github.com/divamgupta/diffusionbee-stable-diffusion-ui/blob/c33afadd66dac6319b46b5f4446abf11de24c813/backends/stable_diffusion_tf/stable_diffusion_tf/stable_diffusion.py#L103-L108

Some methods of getting around the 77 token limitation:

When searching around, I also saw folks saying this is a limitation of the clip model, not stable diffusion, and another clip model can be used.