The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Fix "Load Checkpoint with config" node.
comfyanonymousfe4c07400c79
diff --git a/comfy/sd.py b/comfy/sd.pyindex a63a0d1de..e98dabe88 100644--- a/comfy/sd.py+++ b/comfy/sd.py@@ -22,6 +22,7 @@ from . import sdxl_clipimport comfy.model_patcherimport comfy.loraimport comfy.t2i_adapter.adapter+import comfy.supported_models_basedef load_model_weights(model, sd):m, u = model.load_state_dict(sd, strict=False)@@ -348,10 +349,11 @@ def load_checkpoint(config_path=None, ckpt_path=None, output_vae=True, output_clclass EmptyClass:pass- model_config = EmptyClass()- model_config.unet_config = unet_config+ model_config = comfy.supported_models_base.BASE({})+from . import latent_formatsmodel_config.latent_format = latent_formats.SD15(scale_factor=scale_factor)+ model_config.unet_config = unet_configif config['model']["target"].endswith("LatentInpaintDiffusion"):model = model_base.SDInpaint(model_config, model_type=model_type)diff --git a/comfy/supported_models_base.py b/comfy/supported_models_base.pyindex c72838008..c9cd54d0e 100644--- a/comfy/supported_models_base.py+++ b/comfy/supported_models_base.py@@ -1,6 +1,7 @@import torchfrom . import model_basefrom . import utils+from . import latent_formatsdef state_dict_key_replace(state_dict, keys_to_replace):@@ -34,6 +35,7 @@ class BASE:clip_vision_prefix = Nonenoise_aug_config = Nonebeta_schedule = "linear"+ latent_format = latent_formats.LatentFormat@classmethoddef matches(s, unet_config):