Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
H
Hydra Node Http
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Hydra Node Http
Commits
61649601
Commit
61649601
authored
Sep 17, 2022
by
kurumuz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make encode work
parent
807acb90
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
hydra_node/models.py
hydra_node/models.py
+5
-8
No files found.
hydra_node/models.py
View file @
61649601
...
...
@@ -188,16 +188,13 @@ class StableDiffusionModel(nn.Module):
typex
=
torch
.
float32
self
.
model
=
model
.
to
(
config
.
device
)
.
to
(
typex
)
if
self
.
config
.
vae_path
:
model
.
first_stage_model
=
model
.
first_stage_model
.
float
()
ckpt
=
torch
.
load
(
self
.
config
.
vae_path
,
map_location
=
"cpu"
)
loss
=
[]
dec_ckpt
=
{}
for
i
in
ckpt
[
"state_dict"
]
.
keys
():
if
i
[
0
:
4
]
==
"loss"
:
loss
.
append
(
i
)
for
i
in
loss
:
del
ckpt
[
"state_dict"
][
i
]
model
.
first_stage_model
=
model
.
first_stage_model
.
float
()
model
.
first_stage_model
.
load_state_dict
(
ckpt
[
"state_dict"
])
if
i
[
0
:
8
]
==
"decoder."
:
dec_ckpt
[
i
[
8
:]]
=
ckpt
[
"state_dict"
][
i
]
x
,
y
=
model
.
first_stage_model
.
decoder
.
load_state_dict
(
dec_ckpt
)
model
.
first_stage_model
=
model
.
first_stage_model
.
float
()
del
ckpt
del
loss
...
...
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