Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
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
Stable Diffusion Webui
Commits
a8ae263c
Commit
a8ae263c
authored
Dec 04, 2022
by
wywywywy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reinstate DDPM V1 to LDSR
parent
44c46f0e
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1451 additions
and
1 deletion
+1451
-1
extensions-builtin/LDSR/ldsr_model_arch.py
extensions-builtin/LDSR/ldsr_model_arch.py
+1
-0
extensions-builtin/LDSR/scripts/ldsr_model.py
extensions-builtin/LDSR/scripts/ldsr_model.py
+1
-1
extensions-builtin/LDSR/sd_hijack_ddpm_v1.py
extensions-builtin/LDSR/sd_hijack_ddpm_v1.py
+1449
-0
No files found.
extensions-builtin/LDSR/ldsr_model_arch.py
View file @
a8ae263c
...
@@ -22,6 +22,7 @@ class LDSR:
...
@@ -22,6 +22,7 @@ class LDSR:
pl_sd
=
torch
.
load
(
self
.
modelPath
,
map_location
=
"cpu"
)
pl_sd
=
torch
.
load
(
self
.
modelPath
,
map_location
=
"cpu"
)
sd
=
pl_sd
[
"state_dict"
]
sd
=
pl_sd
[
"state_dict"
]
config
=
OmegaConf
.
load
(
self
.
yamlPath
)
config
=
OmegaConf
.
load
(
self
.
yamlPath
)
config
.
model
.
target
=
"ldm.models.diffusion.ddpm.LatentDiffusionV1"
model
=
instantiate_from_config
(
config
.
model
)
model
=
instantiate_from_config
(
config
.
model
)
model
.
load_state_dict
(
sd
,
strict
=
False
)
model
.
load_state_dict
(
sd
,
strict
=
False
)
model
.
cuda
()
model
.
cuda
()
...
...
extensions-builtin/LDSR/scripts/ldsr_model.py
View file @
a8ae263c
...
@@ -7,7 +7,7 @@ from basicsr.utils.download_util import load_file_from_url
...
@@ -7,7 +7,7 @@ from basicsr.utils.download_util import load_file_from_url
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
ldsr_model_arch
import
LDSR
from
ldsr_model_arch
import
LDSR
from
modules
import
shared
,
script_callbacks
from
modules
import
shared
,
script_callbacks
import
sd_hijack_autoencoder
import
sd_hijack_autoencoder
,
sd_hijack_ddpm_v1
class
UpscalerLDSR
(
Upscaler
):
class
UpscalerLDSR
(
Upscaler
):
...
...
extensions-builtin/LDSR/sd_hijack_ddpm_v1.py
0 → 100644
View file @
a8ae263c
This diff is collapsed.
Click to expand it.
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