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
ecb80abb
"...git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "9da00464a0462fbf89957c76f5ed9751fd62e276"
Commit
ecb80abb
authored
Nov 01, 2023
by
comfyanonymous
Browse files
Allow ModelSamplingDiscrete to be instantiated without a model config.
parent
e73ec8c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
comfy/model_base.py
comfy/model_base.py
+5
-2
No files found.
comfy/model_base.py
View file @
ecb80abb
...
@@ -32,9 +32,12 @@ class V_PREDICTION(EPS):
...
@@ -32,9 +32,12 @@ class V_PREDICTION(EPS):
class
ModelSamplingDiscrete
(
torch
.
nn
.
Module
):
class
ModelSamplingDiscrete
(
torch
.
nn
.
Module
):
def
__init__
(
self
,
model_config
):
def
__init__
(
self
,
model_config
=
None
):
super
().
__init__
()
super
().
__init__
()
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
)
beta_schedule
=
"linear"
if
model_config
is
not
None
:
beta_schedule
=
model_config
.
beta_schedule
self
.
_register_schedule
(
given_betas
=
None
,
beta_schedule
=
beta_schedule
,
timesteps
=
1000
,
linear_start
=
0.00085
,
linear_end
=
0.012
,
cosine_s
=
8e-3
)
self
.
sigma_data
=
1.0
self
.
sigma_data
=
1.0
def
_register_schedule
(
self
,
given_betas
=
None
,
beta_schedule
=
"linear"
,
timesteps
=
1000
,
def
_register_schedule
(
self
,
given_betas
=
None
,
beta_schedule
=
"linear"
,
timesteps
=
1000
,
...
...
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