ltdrdata / ComfyUI-Impact-Pack

Custom nodes pack for ComfyUI This custom node helps to conveniently enhance images through Detector, Detailer, Upscaler, Pipe, and more.
GNU General Public License v3.0
1.78k stars 165 forks source link

[REQUEST] Option to get a different wildcard value for each object when using batch_size #679

Closed MNeMoNiCuZ closed 2 months ago

MNeMoNiCuZ commented 2 months ago

I'm trying to generate multiple images at the same time using batch_size in comfy, and I want each "batched" image to use a different seed for the wildcard processor.

But I seem to be unable to get a new random selection from my wildcard, even if I am trying to use the KSampler (inspire) and batch_seed_mode to be incremental.

Is this possible? I want it to behave like A1111, where each batched image gets different values from the wildcards.

image

ltdrdata commented 2 months ago

Due to the structure of KSampler, it's not possible to apply wildcards in batch. Wildcards are determined at the string level, and by the time they are passed to KSampler, they have already been encoded as CONDITIONING.

Moreover, if it's set to change the LoRA applied in the wildcard, the model passed to KSampler will also change. I'm not sure how A1111's wildcard processing method is internally structured, but in cases where the model changes, it cannot be processed in batch mode.

What you want should be implemented in the form of a list, not a batch.

wildcard-list2

NOTE: mode should be fixed and wildcard text should be written in populated_text.