mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Add clarifying comment to explain why noise might be None in latents_from_embedding().
This commit is contained in:
parent
fa183025ac
commit
9dd779b414
@ -298,6 +298,8 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline):
|
|||||||
batch_size = latents.shape[0]
|
batch_size = latents.shape[0]
|
||||||
batched_t = init_timestep.expand(batch_size)
|
batched_t = init_timestep.expand(batch_size)
|
||||||
|
|
||||||
|
# NOTE(ryand): noise will be None if we are running the SDXL refiner. I can't think of any other reason that
|
||||||
|
# we'd want noise to be None, but I didn't write this logic, so there might be a reason I haven't thought of.
|
||||||
if noise is not None:
|
if noise is not None:
|
||||||
# latents = noise * self.scheduler.init_noise_sigma # it's like in t2l according to diffusers
|
# latents = noise * self.scheduler.init_noise_sigma # it's like in t2l according to diffusers
|
||||||
latents = self.scheduler.add_noise(latents, noise, batched_t)
|
latents = self.scheduler.add_noise(latents, noise, batched_t)
|
||||||
|
Loading…
Reference in New Issue
Block a user