skfoo / ComfyUI-Coziness

MIT License
28 stars 3 forks source link

Lora text extractor bug #1

Closed featherice closed 1 year ago

featherice commented 1 year ago

Basically it is unusable with negative weight. Input loraname:-0.5:-0.8 becomes loraname:0.5:0.8

skfoo commented 1 year ago

Thanks for the report, but I haven't been able to reproduce this. For example, here's two pizzas with -2/+2 add_detail,

low detail high detail

featherice commented 1 year ago

Ok, i fiddled with it a little bit more and found out why it was a bit confusing.. "\, " when put through lora extractor becomes "\", but if instead i just start with "more_details-0.5:0.5, " it becomes filtered out entirely, i checked it with Show Text node. I assumed that loraname:1.0:1.0 syntax is ok, but it must be \.

skfoo commented 1 year ago

Yeah, I guess I didn't specifically say that, but it looks for Automatic's "extra networks" syntax, which is like <network-name:parameters...>, where 'network-name' is 'lora' if the prompt is specifying a lora to load. So I scan the prompt for any lora commands (things like <lora:...>) and send those to the Extracted Text output. Everything else stays in the prompt.