Commit a8ae263c authored by wywywywy's avatar wywywywy

Reinstate DDPM V1 to LDSR

parent 44c46f0e
...@@ -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()
......
...@@ -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):
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment