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
b454a67b
Commit
b454a67b
authored
Dec 12, 2023
by
comfyanonymous
Browse files
Support segmind vega model.
parent
824e4935
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
comfy/model_detection.py
comfy/model_detection.py
+7
-1
comfy/supported_models.py
comfy/supported_models.py
+11
-1
No files found.
comfy/model_detection.py
View file @
b454a67b
...
@@ -289,7 +289,13 @@ def unet_config_from_diffusers_unet(state_dict, dtype):
...
@@ -289,7 +289,13 @@ def unet_config_from_diffusers_unet(state_dict, dtype):
'channel_mult'
:
[
1
,
2
,
4
],
'transformer_depth_middle'
:
-
1
,
'use_linear_in_transformer'
:
True
,
'context_dim'
:
2048
,
'num_head_channels'
:
64
,
'channel_mult'
:
[
1
,
2
,
4
],
'transformer_depth_middle'
:
-
1
,
'use_linear_in_transformer'
:
True
,
'context_dim'
:
2048
,
'num_head_channels'
:
64
,
'use_temporal_attention'
:
False
,
'use_temporal_resblock'
:
False
}
'use_temporal_attention'
:
False
,
'use_temporal_resblock'
:
False
}
supported_models
=
[
SDXL
,
SDXL_refiner
,
SD21
,
SD15
,
SD21_uncliph
,
SD21_unclipl
,
SDXL_mid_cnet
,
SDXL_small_cnet
,
SDXL_diffusers_inpaint
,
SSD_1B
]
Segmind_Vega
=
{
'use_checkpoint'
:
False
,
'image_size'
:
32
,
'out_channels'
:
4
,
'use_spatial_transformer'
:
True
,
'legacy'
:
False
,
'num_classes'
:
'sequential'
,
'adm_in_channels'
:
2816
,
'dtype'
:
dtype
,
'in_channels'
:
4
,
'model_channels'
:
320
,
'num_res_blocks'
:
[
2
,
2
,
2
],
'transformer_depth'
:
[
0
,
0
,
1
,
1
,
2
,
2
],
'transformer_depth_output'
:
[
0
,
0
,
0
,
1
,
1
,
1
,
2
,
2
,
2
],
'channel_mult'
:
[
1
,
2
,
4
],
'transformer_depth_middle'
:
-
1
,
'use_linear_in_transformer'
:
True
,
'context_dim'
:
2048
,
'num_head_channels'
:
64
,
'use_temporal_attention'
:
False
,
'use_temporal_resblock'
:
False
}
supported_models
=
[
SDXL
,
SDXL_refiner
,
SD21
,
SD15
,
SD21_uncliph
,
SD21_unclipl
,
SDXL_mid_cnet
,
SDXL_small_cnet
,
SDXL_diffusers_inpaint
,
SSD_1B
,
Segmind_Vega
]
for
unet_config
in
supported_models
:
for
unet_config
in
supported_models
:
matches
=
True
matches
=
True
...
...
comfy/supported_models.py
View file @
b454a67b
...
@@ -217,6 +217,16 @@ class SSD1B(SDXL):
...
@@ -217,6 +217,16 @@ class SSD1B(SDXL):
"use_temporal_attention"
:
False
,
"use_temporal_attention"
:
False
,
}
}
class
Segmind_Vega
(
SDXL
):
unet_config
=
{
"model_channels"
:
320
,
"use_linear_in_transformer"
:
True
,
"transformer_depth"
:
[
0
,
0
,
1
,
1
,
2
,
2
],
"context_dim"
:
2048
,
"adm_in_channels"
:
2816
,
"use_temporal_attention"
:
False
,
}
class
SVD_img2vid
(
supported_models_base
.
BASE
):
class
SVD_img2vid
(
supported_models_base
.
BASE
):
unet_config
=
{
unet_config
=
{
"model_channels"
:
320
,
"model_channels"
:
320
,
...
@@ -242,5 +252,5 @@ class SVD_img2vid(supported_models_base.BASE):
...
@@ -242,5 +252,5 @@ class SVD_img2vid(supported_models_base.BASE):
def
clip_target
(
self
):
def
clip_target
(
self
):
return
None
return
None
models
=
[
SD15
,
SD20
,
SD21UnclipL
,
SD21UnclipH
,
SDXLRefiner
,
SDXL
,
SSD1B
]
models
=
[
SD15
,
SD20
,
SD21UnclipL
,
SD21UnclipH
,
SDXLRefiner
,
SDXL
,
SSD1B
,
Segmind_Vega
]
models
+=
[
SVD_img2vid
]
models
+=
[
SVD_img2vid
]
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