Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
2c97c302
"vscode:/vscode.git/clone" did not exist on "233e1116fbf2246b3d1e8a439d7d96ca178dd41c"
Commit
2c97c302
authored
Aug 16, 2023
by
comfyanonymous
Browse files
Support small diffusers controlnet so both types are now supported.
parent
53f326a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
comfy/model_detection.py
comfy/model_detection.py
+8
-2
No files found.
comfy/model_detection.py
View file @
2c97c302
...
...
@@ -173,12 +173,18 @@ def unet_config_from_diffusers_unet(state_dict, use_fp16):
'attention_resolutions'
:
[
1
,
2
,
4
],
'transformer_depth'
:
[
1
,
1
,
1
,
0
],
'channel_mult'
:
[
1
,
2
,
4
,
4
],
'transformer_depth_middle'
:
1
,
'use_linear_in_transformer'
:
False
,
'context_dim'
:
768
,
"num_heads"
:
8
}
SDXL_mi
ni
_cnet
=
{
'use_checkpoint'
:
False
,
'image_size'
:
32
,
'out_channels'
:
4
,
'use_spatial_transformer'
:
True
,
'legacy'
:
False
,
SDXL_mi
d
_cnet
=
{
'use_checkpoint'
:
False
,
'image_size'
:
32
,
'out_channels'
:
4
,
'use_spatial_transformer'
:
True
,
'legacy'
:
False
,
'num_classes'
:
'sequential'
,
'adm_in_channels'
:
2816
,
'use_fp16'
:
use_fp16
,
'in_channels'
:
4
,
'model_channels'
:
320
,
'num_res_blocks'
:
2
,
'attention_resolutions'
:
[
4
],
'transformer_depth'
:
[
0
,
0
,
1
],
'channel_mult'
:
[
1
,
2
,
4
],
'transformer_depth_middle'
:
1
,
'use_linear_in_transformer'
:
True
,
'context_dim'
:
2048
,
"num_head_channels"
:
64
}
supported_models
=
[
SDXL
,
SDXL_refiner
,
SD21
,
SD15
,
SD21_uncliph
,
SD21_unclipl
,
SDXL_mini_cnet
]
SDXL_small_cnet
=
{
'use_checkpoint'
:
False
,
'image_size'
:
32
,
'out_channels'
:
4
,
'use_spatial_transformer'
:
True
,
'legacy'
:
False
,
'num_classes'
:
'sequential'
,
'adm_in_channels'
:
2816
,
'use_fp16'
:
use_fp16
,
'in_channels'
:
4
,
'model_channels'
:
320
,
'num_res_blocks'
:
2
,
'attention_resolutions'
:
[],
'transformer_depth'
:
[
0
,
0
,
0
],
'channel_mult'
:
[
1
,
2
,
4
],
'transformer_depth_middle'
:
0
,
'use_linear_in_transformer'
:
True
,
"num_head_channels"
:
64
,
'context_dim'
:
1
}
supported_models
=
[
SDXL
,
SDXL_refiner
,
SD21
,
SD15
,
SD21_uncliph
,
SD21_unclipl
,
SDXL_mid_cnet
,
SDXL_small_cnet
]
for
unet_config
in
supported_models
:
matches
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment