Skip to content

Commit 6531446

Browse files
authored
work around unexplained crash when timesteps=1000 (invoke-ai#440)
* work around unexplained crash when timesteps=1000 * this fix seems to work
1 parent c33a84c commit 6531446

File tree

1 file changed

+3
-1
lines changed
  • ldm/modules/diffusionmodules

1 file changed

+3
-1
lines changed

ldm/modules/diffusionmodules/util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def make_ddim_timesteps(
8181

8282
# assert ddim_timesteps.shape[0] == num_ddim_timesteps
8383
# add one to get the final alpha values right (the ones from first scale to data during sampling)
84-
steps_out = ddim_timesteps + 1
84+
# steps_out = ddim_timesteps + 1
85+
steps_out = ddim_timesteps
86+
8587
if verbose:
8688
print(f'Selected timesteps for ddim sampler: {steps_out}')
8789
return steps_out

0 commit comments

Comments
 (0)