Force stable diffusion fp16 and fp32 to generate images with similar noise (#431)

This commit is contained in:
Quinn Dawkins
2022-10-25 17:28:18 -04:00
committed by GitHub
parent fd578a48a9
commit cdc6dd19e3

View File

@@ -129,8 +129,8 @@ if __name__ == "__main__":
latents = torch.randn(
(batch_size, 4, height // 8, width // 8),
generator=generator,
dtype=dtype,
)
dtype=torch.float32,
).to(dtype)
scheduler.set_timesteps(num_inference_steps)
scheduler.is_scale_input_called = True