Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CatDroid opened this issue Aug 21, 2024 · 2 comments
Open

Comments

@CatDroid
Copy link

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
Copy link
Author

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
Copy link
Author

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]) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant