mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-16 16:32:34 +08:00
switched subsequent latent seeds for INT inputs to increment
This commit is contained in:
parent
860894d83f
commit
aeedf7f6a8
@ -25,9 +25,12 @@ def prepare_noise(latent_image, seeds, noise_inds=None):
|
|||||||
if i < len(seeds): # Use the provided seeds if available
|
if i < len(seeds): # Use the provided seeds if available
|
||||||
seed = seeds[i]
|
seed = seeds[i]
|
||||||
else:
|
else:
|
||||||
seed = torch.randint(0, 2**32, (1,)).item() # Generate a random seed for additional latents
|
seed = seeds[-1] + i # Increment the last seed for additional latents
|
||||||
|
|
||||||
|
#else: maybe add this add a toggle or dropdown?
|
||||||
|
# seed = torch.randint(0, 2**32, (1,)).item() # Generate a random seed for additional latents
|
||||||
generator.manual_seed(seed)
|
generator.manual_seed(seed)
|
||||||
print("seed:", seed)
|
print("seed:", seed) #get rid of this after testing
|
||||||
noise = torch.randn([1] + list(latent_image.size())[1:], dtype=latent_image.dtype, layout=latent_image.layout, device="cpu", generator=generator)
|
noise = torch.randn([1] + list(latent_image.size())[1:], dtype=latent_image.dtype, layout=latent_image.layout, device="cpu", generator=generator)
|
||||||
noises.append(noise)
|
noises.append(noise)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user