Unverified Commit fcb2ec8c authored by Joqsan's avatar Joqsan Committed by GitHub
Browse files

Fix typos and minor redundancies (#2029)



fix typos and minor redundancies
Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
parent 013955b5
...@@ -397,7 +397,7 @@ class StableDiffusionImg2ImgPipeline(DiffusionPipeline): ...@@ -397,7 +397,7 @@ class StableDiffusionImg2ImgPipeline(DiffusionPipeline):
raise ValueError(f"`prompt` has to be of type `str` or `list` but is {type(prompt)}") raise ValueError(f"`prompt` has to be of type `str` or `list` but is {type(prompt)}")
if strength < 0 or strength > 1: if strength < 0 or strength > 1:
raise ValueError(f"The value of strength should in [1.0, 1.0] but is {strength}") raise ValueError(f"The value of strength should in [0.0, 1.0] but is {strength}")
if (callback_steps is None) or ( if (callback_steps is None) or (
callback_steps is not None and (not isinstance(callback_steps, int) or callback_steps <= 0) callback_steps is not None and (not isinstance(callback_steps, int) or callback_steps <= 0)
......
...@@ -327,7 +327,7 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin): ...@@ -327,7 +327,7 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
variance_noise = randn_tensor( variance_noise = randn_tensor(
model_output.shape, generator=generator, device=device, dtype=model_output.dtype model_output.shape, generator=generator, device=device, dtype=model_output.dtype
) )
variance = self._get_variance(timestep, prev_timestep) ** (0.5) * eta * variance_noise variance = std_dev_t * variance_noise
prev_sample = prev_sample + variance prev_sample = prev_sample + variance
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment