Flip bits in seed for sde/ancestral schedulers to have different noise from initial

This commit is contained in:
Sergey Borisov 2023-08-13 19:50:16 +03:00
parent 6e0beb1ed4
commit 59ba9fc0f6

View File

@ -205,7 +205,8 @@ class DenoiseLatentsInvocation(BaseInvocation):
# for ddim scheduler
eta=0.0, # ddim_eta
# for ancestral and sde schedulers
generator=torch.Generator(device=unet.device).manual_seed(seed),
# flip all bits to have noise different from initial
generator=torch.Generator(device=unet.device).manual_seed(seed ^ 0xFFFFFFFF),
)
return conditioning_data