"examples/vscode:/vscode.git/clone" did not exist on "1997614aa9525ef0f49858ac409540fdf2f02e9d"
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(
if num_in_channels is None:
if pipeline_class_name in [
"StableDiffusionInpaintPipeline",
"StableDiffusionControlNetInpaintPipeline",
"StableDiffusionXLInpaintPipeline",
"StableDiffusionXLControlNetInpaintPipeline",
]:
......@@ -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)
ctx = init_empty_weights if is_accelerate_available() else nullcontext
with ctx():
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