Skip to content

Commit

Permalink
Enable CivitAI SDXL Inpainting Models Conversion (huggingface#8795)
Browse files Browse the repository at this point in the history
modify in_channels in network_config params

Co-authored-by: Dhruv Nair <[email protected]>
  • Loading branch information
mazharosama and DN6 authored Jul 25, 2024
1 parent 0bda1d7 commit 1fd647f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,8 @@ def download_from_original_stable_diffusion_ckpt(

if "unet_config" in original_config["model"]["params"]:
original_config["model"]["params"]["unet_config"]["params"]["in_channels"] = num_in_channels
elif "network_config" in original_config["model"]["params"]:
original_config["model"]["params"]["network_config"]["params"]["in_channels"] = num_in_channels

if (
"parameterization" in original_config["model"]["params"]
Expand Down

0 comments on commit 1fd647f

Please sign in to comment.