Commit 32447f0c authored by comfyanonymous's avatar comfyanonymous
Browse files

Add sampling_settings so models can specify specific sampling settings.

parent 70d2ea0f
...@@ -24,7 +24,7 @@ class ModelSamplingDiscrete(torch.nn.Module): ...@@ -24,7 +24,7 @@ class ModelSamplingDiscrete(torch.nn.Module):
super().__init__() super().__init__()
beta_schedule = "linear" beta_schedule = "linear"
if model_config is not None: if model_config is not None:
beta_schedule = model_config.beta_schedule beta_schedule = model_config.sampling_settings.get("beta_schedule", beta_schedule)
self._register_schedule(given_betas=None, beta_schedule=beta_schedule, timesteps=1000, linear_start=0.00085, linear_end=0.012, cosine_s=8e-3) self._register_schedule(given_betas=None, beta_schedule=beta_schedule, timesteps=1000, linear_start=0.00085, linear_end=0.012, cosine_s=8e-3)
self.sigma_data = 1.0 self.sigma_data = 1.0
......
...@@ -19,7 +19,7 @@ class BASE: ...@@ -19,7 +19,7 @@ class BASE:
clip_prefix = [] clip_prefix = []
clip_vision_prefix = None clip_vision_prefix = None
noise_aug_config = None noise_aug_config = None
beta_schedule = "linear" sampling_settings = {}
latent_format = latent_formats.LatentFormat latent_format = latent_formats.LatentFormat
@classmethod @classmethod
......
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