From f89b5dbbd282091fd6b3318f3ef20cf23cf9ea3a Mon Sep 17 00:00:00 2001 From: huchenlei Date: Sat, 8 Jun 2024 22:15:37 -0400 Subject: [PATCH] nit --- modules/sd_models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index 93ff6c5fe..af35187cd 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -402,8 +402,9 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer del state_dict # Set is_sdxl_inpaint flag. - # Perform this check after model initialization to make sure state_dict - # structure is already known. + # Checks Unet structure to detect inpaint model. The inpaint model's + # checkpoint state_dict does not contain the key + # 'diffusion_model.input_blocks.0.0.weight'. diffusion_model_input = model.model.state_dict().get( 'diffusion_model.input_blocks.0.0.weight' )