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
15adc369
Commit
15adc369
authored
Aug 29, 2023
by
comfyanonymous
Browse files
Move beta_schedule to model_config and allow disabling unet creation.
parent
968078b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
comfy/model_base.py
comfy/model_base.py
+3
-2
comfy/supported_models_base.py
comfy/supported_models_base.py
+1
-0
No files found.
comfy/model_base.py
View file @
15adc369
...
@@ -19,8 +19,9 @@ class BaseModel(torch.nn.Module):
...
@@ -19,8 +19,9 @@ class BaseModel(torch.nn.Module):
unet_config
=
model_config
.
unet_config
unet_config
=
model_config
.
unet_config
self
.
latent_format
=
model_config
.
latent_format
self
.
latent_format
=
model_config
.
latent_format
self
.
model_config
=
model_config
self
.
model_config
=
model_config
self
.
register_schedule
(
given_betas
=
None
,
beta_schedule
=
"linear"
,
timesteps
=
1000
,
linear_start
=
0.00085
,
linear_end
=
0.012
,
cosine_s
=
8e-3
)
self
.
register_schedule
(
given_betas
=
None
,
beta_schedule
=
model_config
.
beta_schedule
,
timesteps
=
1000
,
linear_start
=
0.00085
,
linear_end
=
0.012
,
cosine_s
=
8e-3
)
self
.
diffusion_model
=
UNetModel
(
**
unet_config
,
device
=
device
)
if
not
unet_config
.
get
(
"disable_unet_model_creation"
,
False
):
self
.
diffusion_model
=
UNetModel
(
**
unet_config
,
device
=
device
)
self
.
model_type
=
model_type
self
.
model_type
=
model_type
self
.
adm_channels
=
unet_config
.
get
(
"adm_in_channels"
,
None
)
self
.
adm_channels
=
unet_config
.
get
(
"adm_in_channels"
,
None
)
if
self
.
adm_channels
is
None
:
if
self
.
adm_channels
is
None
:
...
...
comfy/supported_models_base.py
View file @
15adc369
...
@@ -33,6 +33,7 @@ class BASE:
...
@@ -33,6 +33,7 @@ class BASE:
clip_prefix
=
[]
clip_prefix
=
[]
clip_vision_prefix
=
None
clip_vision_prefix
=
None
noise_aug_config
=
None
noise_aug_config
=
None
beta_schedule
=
"linear"
@
classmethod
@
classmethod
def
matches
(
s
,
unet_config
):
def
matches
(
s
,
unet_config
):
...
...
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