The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Move beta_schedule to model_config and allow disabling unet creation.
comfyanonymous15adc3699f74
diff --git a/comfy/model_base.py b/comfy/model_base.pyindex d654f56f6..acd4169a8 100644--- a/comfy/model_base.py+++ b/comfy/model_base.py@@ -19,8 +19,9 @@ class BaseModel(torch.nn.Module):unet_config = model_config.unet_configself.latent_format = model_config.latent_formatself.model_config = model_config- self.register_schedule(given_betas=None, beta_schedule="linear", timesteps=1000, linear_start=0.00085, linear_end=0.012, cosine_s=8e-3)- self.diffusion_model = UNetModel(**unet_config, device=device)+ self.register_schedule(given_betas=None, beta_schedule=model_config.beta_schedule, timesteps=1000, linear_start=0.00085, linear_end=0.012, cosine_s=8e-3)+ if not unet_config.get("disable_unet_model_creation", False):+ self.diffusion_model = UNetModel(**unet_config, device=device)self.model_type = model_typeself.adm_channels = unet_config.get("adm_in_channels", None)if self.adm_channels is None:diff --git a/comfy/supported_models_base.py b/comfy/supported_models_base.pyindex d0088bbd5..c72838008 100644--- a/comfy/supported_models_base.py+++ b/comfy/supported_models_base.py@@ -33,6 +33,7 @@ class BASE:clip_prefix = []clip_vision_prefix = Nonenoise_aug_config = None+ beta_schedule = "linear"@classmethoddef matches(s, unet_config):