Conversation
I think the following should work:
Image Layer node should filter image layers and Mask Layer node mask layers, so you might have to use 2 nodes if you have a mixed group. Also no names. Not sure that fits your use case, but as it is it already feels highly specific to me, and other users are unlikely to discover or understand how to use it with the extra nodes and lists. It would be nice if Comfy had better support for structured data & lists, but as it is, I think keeping it as simple as possible and sticking to batches is better. |
The names are necessary, they are not optional. For example, if you want to send regions over to ComfyUI, you need to match the region name with the layer. Or if you're sending masks, you need to match the mask name with the layer. Sending the names opens up a lot of extra possibilities, which is well worth it.
ComfyUI's support for data lists is actually pretty robust, and works quite well. Because the images and names are both a data list, they will be properly zipped together. So everything works as you would expect. |
Yes, I originally tried that, but it required a lot of refactoring. I can try it again... |
|
It should be a small change. I could be wrong, but if it requires lots of refactor / additional code it's probably not worth it. |
|
Yeah it ended up being a pretty small change. However, adding this feature to So I only made the change to |
| if len(list) == 1: | ||
| return list[0] | ||
|
|
||
| output = self.add("ETN_ListEmpty", 1) |
There was a problem hiding this comment.
Why does this use custom list nodes?
Can't ComfyUI built-in nodes be used (PrimitiveString, CreateList)?
| img, mask = w.load_image_and_mask(get_param(node, (Image, ImageCollection))) | ||
| layer: CustomLayerInput = get_param(node, CustomLayerInput) | ||
| img, mask = w.load_image_and_mask(layer.images) | ||
| if not layer.is_batch: |
There was a problem hiding this comment.
I think it would be better to always return a batch. The node output type can stay the same and it's less confusing for flatten/animation. Rebatch can be added in the workflow if a list is needed.
Currently there are three ways to send images to ComfyUI:
Krita Canvas,Krita Image Layer, andKrita Mask Layer.This adds a new
Krita Group Layernode that sends an entire group of image layers to ComfyUI (along with the masks and names of each image layer).This is really useful for a variety of situations:
Generate Animationmode.Originally I wanted to add this feature to the existing
Krita Image LayerandKrita Mask Layernodes, but that would have needed significant code refactoring. So I made a new node instead.