LostRuins / koboldcpp

Run GGUF models easily with a KoboldAI UI. One File. Zero Install.
https://github.com/lostruins/koboldcpp
GNU Affero General Public License v3.0
5.27k stars 360 forks source link

SDUI negative_prompt URL parameter not working / implemented #1072

Closed xifer closed 3 months ago

xifer commented 3 months ago

Works: http://localhost:5001/sdui?prompt=prompt (Seed, steps, width, height, etc work too.)

Does not work: http://localhost:5001/sdui?negative_prompt=prompt

I checked out https://github.com/LostRuins/koboldcpp/blob/concedo/kcpp_sdui.embd, it looked to me like seed, steps, width, height, prompt were implemented but not negative_prompt.

Is there another an un-minified version this is built from?

LostRuins commented 3 months ago

You are trying to run it as a get request to the url? Why not use the api directly then

LostRuins commented 3 months ago

Check out the sdapi reference

https://lite.koboldai.net/koboldcpp_api

LostRuins commented 3 months ago

https://github.com/ayunami2000/stable-ui

Stable UI comes from here. But it's been unmaintained for a while

xifer commented 3 months ago

You are trying to run it as a get request to the url? Why not use the api directly then

I am using those http params as starting point when I launch sdui from a script.

https://github.com/ayunami2000/stable-ui

Stable UI comes from here. But it's been unmaintained for a while

Ah, this is what I needed: https://github.com/ayunami2000/stable-ui/blob/1da33e7baecfad5cf91760b6c36f440eba5b24ec/src/stores/generator.ts#L374

Works: http://localhost:5001/sdui?prompt=prompt%20%23%23%23%20negative%20prompt

"%20%23%23%23%20" = " ### " And putting a '#' in the URL will not pass it as a character, so %23 is a required replacement.

Thanks!