bedovyy / ComfyUI_NAIDGenerator

NovelAI Diffusion generator for ComfyUI
GNU General Public License v3.0
40 stars 8 forks source link

Request for NAI Weight Converter #21

Open da2el-ai opened 3 days ago

da2el-ai commented 3 days ago

Thank you for creating such wonderful custom nodes! They're so useful that I use them every day.

I have a request, if I may. I'd like a custom node that converts NAI-style weights to SD-style weights. For example: {{foo}} > (foo:1.1)

The custom node "D2 Load Image" that I've published has a feature to extract prompts from images, and it's compatible with NovelAI images. If there were a custom node to convert NAI weights to SD weights, it would make prompt reuse much easier, which would be fantastic. https://github.com/da2el-ai/D2-nodes-ComfyUI

I'm not sure if it will be helpful, but here's the JavaScript source I created: https://github.com/da2el-ai/sd-d2-nai-prompt-convert/blob/4d3da2a0ff7ff4cda7d6726fee28b96f96233e2e/src/js/D2NPCPromptConvert.ts#L40

bedovyy commented 14 hours ago

Thank you for the request!

the difficult part of NAI weight to SD weight is that multiple brackets doesn't end at same time. for example, the below prompt is also valid. {{1girl, {black hair, chibi,}}} {{catgirl [[under]]}} a {{{{{cherry blossom tree https://docs.novelai.net/image/strengthening-weakening.html#note And converters I found did not works correctly at that condition.

However, I will try best to meet the requirement. Please wait for a while.