Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1451 additions
and
1 deletion
+1451
-1
ldsr_model_arch.py
extensions-builtin/LDSR/ldsr_model_arch.py
+1
-0
ldsr_model.py
extensions-builtin/LDSR/scripts/ldsr_model.py
+1
-1
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