mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Merge pull request #5415 from wywywywy/reinstate-ddpm-v1
Reinstate DDPM V1 to LDSR
This commit is contained in:
commit
3896242e9e
@ -22,6 +22,7 @@ class LDSR:
|
||||
pl_sd = torch.load(self.modelPath, map_location="cpu")
|
||||
sd = pl_sd["state_dict"]
|
||||
config = OmegaConf.load(self.yamlPath)
|
||||
config.model.target = "ldm.models.diffusion.ddpm.LatentDiffusionV1"
|
||||
model = instantiate_from_config(config.model)
|
||||
model.load_state_dict(sd, strict=False)
|
||||
model.cuda()
|
||||
|
@ -7,7 +7,7 @@ from basicsr.utils.download_util import load_file_from_url
|
||||
from modules.upscaler import Upscaler, UpscalerData
|
||||
from ldsr_model_arch import LDSR
|
||||
from modules import shared, script_callbacks
|
||||
import sd_hijack_autoencoder
|
||||
import sd_hijack_autoencoder, sd_hijack_ddpm_v1
|
||||
|
||||
|
||||
class UpscalerLDSR(Upscaler):
|
||||
|
1449
extensions-builtin/LDSR/sd_hijack_ddpm_v1.py
Normal file
1449
extensions-builtin/LDSR/sd_hijack_ddpm_v1.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user