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
51d54775
Commit
51d54775
authored
Jul 18, 2023
by
comfyanonymous
Browse files
Add key to indicate checkpoint is v_prediction when saving.
parent
ff6b047a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
comfy/model_base.py
comfy/model_base.py
+4
-0
No files found.
comfy/model_base.py
View file @
51d54775
...
@@ -99,6 +99,10 @@ class BaseModel(torch.nn.Module):
...
@@ -99,6 +99,10 @@ class BaseModel(torch.nn.Module):
if
self
.
get_dtype
()
==
torch
.
float16
:
if
self
.
get_dtype
()
==
torch
.
float16
:
clip_state_dict
=
utils
.
convert_sd_to
(
clip_state_dict
,
torch
.
float16
)
clip_state_dict
=
utils
.
convert_sd_to
(
clip_state_dict
,
torch
.
float16
)
vae_state_dict
=
utils
.
convert_sd_to
(
vae_state_dict
,
torch
.
float16
)
vae_state_dict
=
utils
.
convert_sd_to
(
vae_state_dict
,
torch
.
float16
)
if
self
.
model_type
==
ModelType
.
V_PREDICTION
:
unet_state_dict
[
"v_pred"
]
=
torch
.
tensor
([])
return
{
**
unet_state_dict
,
**
vae_state_dict
,
**
clip_state_dict
}
return
{
**
unet_state_dict
,
**
vae_state_dict
,
**
clip_state_dict
}
...
...
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