work around unexplained crash when timesteps=1000 (#440)

* work around unexplained crash when timesteps=1000

* this fix seems to work
This commit is contained in:
Lincoln Stein 2022-09-08 20:41:37 -04:00 committed by GitHub
parent c33a84cdfd
commit 653144694f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,9 @@ def make_ddim_timesteps(
# assert ddim_timesteps.shape[0] == num_ddim_timesteps # assert ddim_timesteps.shape[0] == num_ddim_timesteps
# add one to get the final alpha values right (the ones from first scale to data during sampling) # add one to get the final alpha values right (the ones from first scale to data during sampling)
steps_out = ddim_timesteps + 1 # steps_out = ddim_timesteps + 1
steps_out = ddim_timesteps
if verbose: if verbose:
print(f'Selected timesteps for ddim sampler: {steps_out}') print(f'Selected timesteps for ddim sampler: {steps_out}')
return steps_out return steps_out