mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Allow model sampling to set number of timesteps.
This commit is contained in:
parent
e1630391d6
commit
821f93872e
@ -59,8 +59,9 @@ class ModelSamplingDiscrete(torch.nn.Module):
|
|||||||
beta_schedule = sampling_settings.get("beta_schedule", "linear")
|
beta_schedule = sampling_settings.get("beta_schedule", "linear")
|
||||||
linear_start = sampling_settings.get("linear_start", 0.00085)
|
linear_start = sampling_settings.get("linear_start", 0.00085)
|
||||||
linear_end = sampling_settings.get("linear_end", 0.012)
|
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
|
self.sigma_data = 1.0
|
||||||
|
|
||||||
def _register_schedule(self, given_betas=None, beta_schedule="linear", timesteps=1000,
|
def _register_schedule(self, given_betas=None, beta_schedule="linear", timesteps=1000,
|
||||||
|
Loading…
Reference in New Issue
Block a user