ComfyUI_Comfyroll_CustomNodes icon indicating copy to clipboard operation
ComfyUI_Comfyroll_CustomNodes copied to clipboard

Iterate through the CR Prompt List node and the CR Load Image List node ?

Open CatDroid opened this issue 1 year ago • 2 comments

Using both the CR Prompt List node and the CR Load Image List node, the output from the CR Load Image List node is connected to the positive input of the Eff.Loader SDXL node, and the output from the CR Load Image List node is connected to ControlNet and then to the cnet_stack input of the Eff.Loader SDXL node. Upon running, it was found that it didn't iterate through all the images and prompts, but only took the first prompt from the CR Prompt List node.

CatDroid avatar Aug 21 '24 04:08 CatDroid

What methods does ComfyUI have to iterate over each suggestion word (e.g., M words) and each reference image (e.g., N images) to obtain M*N generated images?

CatDroid avatar Aug 27 '24 07:08 CatDroid

class CR_LoadImageList:
         ...
        images = torch.cat(image_list, dim=0)
        images_out = [images[i:i + 1, ...] for i in range(images.shape[0])]

        return (images_out, show_help, )

why torch.cat and then un-pack to images_out ? from list( tensor[1,C, H, W]), to tensor[N, C, H, W] to list( tensor[C, H, W]) ?

CatDroid avatar Aug 27 '24 08:08 CatDroid