Feature request: Randomize image selection
ik1ng opened this issue · comments
I've been digging around through the code looking for the image selection process, looking for a way to randomize the image input for controlnet. Have any pointers by any chance? I'm essentially looking to modify the script to select each "frame"'s input image randomly from the images uploaded to the script. Cheers!
Hello, what do you mean by randomize? randomize the order or generate a random input like a pose for controlnet openpose ?
Hello, what do you mean by randomize? randomize the order or generate a random input like a pose for controlnet openpose ?
Just to randomize the order, I'm using the script for sort of an "off-label" use case in conjunction with dynamic prompts to have total randomness haha.
what I usually use for my frames it to name them 1.png,2.png,3.png to ensure the order
😅 An easy solution would be to just randomize the names of the files. But if you do want to modify the script so that it does the shuffling you can do so in here:
Makes sense, I'm definitely using it in a strange way haha. Alright so I imported random and added the random.shuffle to the arg_map, getting the ValueError: Frames missing error
Got it - it wanted the arg randomized after defining what the arg is, just added it to the next line as opposed to doing it inline. All set! Thank you. :)