ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Outcome of 2 separate latent batch generation is always non-deterministic

Open stephantual opened this issue 1 year ago • 3 comments

Initially i thought i had finally gone crazy - but no - even when running in parrall on a super simple workflow, the outcome of 2 separate batches of latent that aren't identical in size gives out random noise in the output.

Here's a very simple workflow demonstrating the issue. rgthree compare temp_oieuz_00019 (1)

If batch 1 size != batch size 2, regardless of size, the pandas are 'slightly' different. No matter what I tried.

I understand this may be by design - however, in the context of building a 2 part workflow using an image picker such as https://github.com/chrisgoringe/cg-image-picker/, it breaks the output because no one wants to end up with 'slightly different' images.

Thank you for considering this problem

stephantual avatar Feb 16 '24 02:02 stephantual

That's normal increasing batch size can change a tiny bit the results due to how some algorithms are implemented. You can try running comfyui with --deterministic which might solve your issue.

comfyanonymous avatar Feb 16 '24 06:02 comfyanonymous

Trying now. This is super interesting, thank you.

stephantual avatar Feb 16 '24 18:02 stephantual

Ok I tried it, added --deterministic as recommended, ran the exact same worfklow, same outcome (the images are different). I tried both the built-in ksampler and the inspire pack one which gives a bit more control over things, no dice either.

stephantual avatar Feb 16 '24 20:02 stephantual