huchenlei / sd-webui-api-payload-display

Display the corresponding API payload after each generation on WebUI
MIT License
160 stars 18 forks source link

lora is not shown up in prompt #2

Open speaknowpotato opened 1 year ago

speaknowpotato commented 1 year ago

hi @huchenlei ,

when i add lora to my prompt, image

it will not show up in the API payload, image

But if i click Copy button, and copy the json payload to clipboard, it does have Lora inside the prompt. something like this,

    "prompt": "blue hair <lora:ghibli_style_offset:1>  red eye",

Is this expected or a bug? thanks!

huchenlei commented 1 year ago

I think it is a problem with jsonTree library. It does not do the escape of special chars. I probably need to handle chars like "<" and ">" manually.