koishijs / novelai-bot

Generate images by NovelAI | 基于 NovelAI 的画图机器人
https://bot.novelai.dev
MIT License
2.48k stars 204 forks source link

Bug: bot会将尖括号转成< #161

Closed yi03 closed 1 year ago

yi03 commented 1 year ago

Describe the bug

现在在stable diffusion webui的prompt里直接写使用<lora:amberGenshinImpact_flexibleV1:1>就可以调用相应的lora模型 但是这样在沙盒或者qq中使用bot时bot会把尖括号转成&lt; 导致webui无法调用相应的lora模型。

我测试使用的lora模型是这个 https://civitai.com/models/4503/amber-genshin-impact-lora

Steps to reproduce

发送nai 1girl,

Expected behavior

尖括号不被转义

Screenshots

No response

Relevant log output

No response

Launcher

Koishi CLI (koishi start)

Backend

Stable Diffusion WebUI (AUTOMATIC1111)

Versions

Additional context

No response

shigma commented 1 year ago

现在 sd 有尖括号的语法吗?

MaikoTan commented 1 year ago

现在 sd 有尖括号的语法吗?

Yes, there is a new extension called "lora" that requires <> to be indicated which was added about several days ago.

yi03 commented 1 year ago

现在 sd 有尖括号的语法吗?

image 最新版sd-webui点击最后的箭头指向的那个图,会在prompt里出现一个尖括号包着的prompt。官方wiki里大概找了找没找到说明,不过确实是有效的。 可能是三天前加的这个语法 https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/855b9e3d1c5a1bd8c2d815d38a38bc7c410be5a8

MaikoTan commented 1 year ago

I am not familiar with the transform mechanic in the novelai plugin, so I would like to ask @shigma -chan to do this.