Skip to content

Commit

Permalink
Allow model sampling to set number of timesteps.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jul 16, 2024
1 parent e163039 commit 821f938
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comfy/model_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def __init__(self, model_config=None):
beta_schedule = sampling_settings.get("beta_schedule", "linear")
linear_start = sampling_settings.get("linear_start", 0.00085)
linear_end = sampling_settings.get("linear_end", 0.012)
timesteps = sampling_settings.get("timesteps", 1000)

self._register_schedule(given_betas=None, beta_schedule=beta_schedule, timesteps=1000, linear_start=linear_start, linear_end=linear_end, cosine_s=8e-3)
self._register_schedule(given_betas=None, beta_schedule=beta_schedule, timesteps=timesteps, linear_start=linear_start, linear_end=linear_end, cosine_s=8e-3)
self.sigma_data = 1.0

def _register_schedule(self, given_betas=None, beta_schedule="linear", timesteps=1000,
Expand Down

0 comments on commit 821f938

Please sign in to comment.