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
bfb8fb16
Commit
bfb8fb16
authored
Aug 19, 2022
by
kurumuz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message
parent
0ac840eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
.gitignore
.gitignore
+2
-0
hydra_node/models.py
hydra_node/models.py
+2
-2
run_diffusion.sh
run_diffusion.sh
+8
-0
No files found.
.gitignore
0 → 100644
View file @
bfb8fb16
*.pyc
__pycache__
\ No newline at end of file
hydra_node/models.py
View file @
bfb8fb16
...
@@ -81,10 +81,10 @@ class StableDiffusionModel(nn.Module):
...
@@ -81,10 +81,10 @@ class StableDiffusionModel(nn.Module):
return
model
,
model_config
return
model
,
model_config
def
load_model_from_config
(
self
,
config
,
ckpt
,
verbose
=
False
):
def
load_model_from_config
(
self
,
config
,
ckpt
,
verbose
=
False
):
self
.
config
.
logger
.
info
(
f
"Loading model from {ckpt}"
)
print
(
f
"Loading model from {ckpt}"
)
pl_sd
=
torch
.
load
(
ckpt
,
map_location
=
"cpu"
)
pl_sd
=
torch
.
load
(
ckpt
,
map_location
=
"cpu"
)
if
"global_step"
in
pl_sd
:
if
"global_step"
in
pl_sd
:
self
.
config
.
logger
.
info
(
f
"Global Step: {pl_sd['global_step']}"
)
print
(
f
"Global Step: {pl_sd['global_step']}"
)
sd
=
pl_sd
[
"state_dict"
]
sd
=
pl_sd
[
"state_dict"
]
model
=
instantiate_from_config
(
config
.
model
)
model
=
instantiate_from_config
(
config
.
model
)
m
,
u
=
model
.
load_state_dict
(
sd
,
strict
=
False
)
m
,
u
=
model
.
load_state_dict
(
sd
,
strict
=
False
)
...
...
run_diffusion.sh
0 → 100644
View file @
bfb8fb16
export
DTYPE
=
"float32"
export
AMP
=
"1"
export
MODEL
=
"stable-diffusion"
export
DEV
=
"True"
export
MODEL_PATH
=
"/home/xuser/nvme1/workspace/aero/stable/sdfinetune/checkpoints/kuru30k"
export
TRANSFORMERS_CACHE
=
"/home/xuser/nvme1/transformer_cache"
export
SENTRY_URL
=
"https://49ca8adcf4444f82a10eae1b3fd4182f@o846434.ingest.sentry.io/6612448"
gunicorn main:app
--workers
1
--worker-class
uvicorn.workers.UvicornWorker
--bind
0.0.0.0:4315
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