krita-ai-diffusion icon indicating copy to clipboard operation
krita-ai-diffusion copied to clipboard

Allow option to enable a save node in workflow sent to ComfyUI

Open sraney opened this issue 1 year ago • 5 comments

Would It be possible to add an option to enable mirroring results sent to the "Send Image (WebSocket)" node and pipe it to an additional "Save Image" node?

I hacked a forced node in the ai_diffusion/workflow.py but, that's a mess but works.

Example workflow generated by my hack. ( moved the node to make it a bit more presentable.

Krita-ComfyUILocalSave

sraney avatar Jul 14 '24 17:07 sraney

Yes but why? Images are already saved in the document, and doing it this way will give partial / incomplete images for selections.

Acly avatar Jul 16 '24 19:07 Acly

Yes but why? Images are already saved in the document, and doing it this way will give partial/incomplete images for selections.

Due to how ComfyUI saves the workflow and allows me to rebuild it with a drag and drop back into ComfyUI to see the workflow created. Currently the 'save workflow' only seems to save the last workflow used. Also, it allows me to use them outside of Kriata if I need to rebuild or import them into Clip Studio Paint or Inkscape. Currently, there is no way to see what model was used. I often flip between models when moving between backgrounds and foreground subjects.

sraney avatar Jul 16 '24 20:07 sraney

+1 Sometimes there is a need to look at the workflow in history. For example, when experimenting with LoRA, to see the names and weights used. Alternatively, it would be nice to have a menu item for saving the workflow. Something like: image

asn88 avatar Jul 23 '24 18:07 asn88

Problem is it requires to keep all workflows ever created. Unlike most ComfyUI workflows, the plugin's workflow always contain the entire data (all input images full resolution lossless). It eats up lot of memory really fast, for something most people will never access, and even those that do only rarely.

Acly avatar Jul 24 '24 22:07 Acly

I agree, this will really increase memory consumption. Thanks for taking the time to review my idea.

asn88 avatar Jul 27 '24 17:07 asn88