Unverified Commit 37b09517 authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

fix: controlnet inpaint single file. (#6975)

parent 4343ce2c
...@@ -1172,6 +1172,7 @@ def create_diffusers_unet_model_from_ldm( ...@@ -1172,6 +1172,7 @@ def create_diffusers_unet_model_from_ldm(
if num_in_channels is None: if num_in_channels is None:
if pipeline_class_name in [ if pipeline_class_name in [
"StableDiffusionInpaintPipeline", "StableDiffusionInpaintPipeline",
"StableDiffusionControlNetInpaintPipeline",
"StableDiffusionXLInpaintPipeline", "StableDiffusionXLInpaintPipeline",
"StableDiffusionXLControlNetInpaintPipeline", "StableDiffusionXLControlNetInpaintPipeline",
]: ]:
...@@ -1190,6 +1191,7 @@ def create_diffusers_unet_model_from_ldm( ...@@ -1190,6 +1191,7 @@ def create_diffusers_unet_model_from_ldm(
diffusers_format_unet_checkpoint = convert_ldm_unet_checkpoint(checkpoint, unet_config, extract_ema=extract_ema) diffusers_format_unet_checkpoint = convert_ldm_unet_checkpoint(checkpoint, unet_config, extract_ema=extract_ema)
ctx = init_empty_weights if is_accelerate_available() else nullcontext ctx = init_empty_weights if is_accelerate_available() else nullcontext
with ctx(): with ctx():
unet = UNet2DConditionModel(**unet_config) unet = UNet2DConditionModel(**unet_config)
......
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