JasonS09 / comfy_sd_krita_plugin

Make AI art between canvas and nodes with Krita.
MIT License
148 stars 7 forks source link

Add Lora text to prompt info #14

Closed ElliottLester closed 1 year ago

ElliottLester commented 1 year ago

Issue: The text that is saved to the layer name has the lora removed

Fix: Walk the API request and re-add the lora to the positive prompt

Notes: I don't know if there is a way to get the original prompt strings for the request but that would be ideal.

ElliottLester commented 1 year ago

need to remove the .safetensors extension

JasonS09 commented 1 year ago

I don't know if there is a way to get the original prompt strings for the request but that would be ideal.

You can access the full prompt (including the lora) directly from the stored configuration. I.e:

self.cfg("txt2img_prompt", str)

It's never removed there. Maybe using that is easier that searching from the lora nodes in history? You'd have to figure out which mode (txt2img, img2img, inpaint...) was used though.

ElliottLester commented 1 year ago

ok thanks I will look at that and see if it works.