diff --git a/entry.py b/entry.py index ccebb14..7e230e5 100644 --- a/entry.py +++ b/entry.py @@ -5,6 +5,24 @@ import safetensors.torch from omegaconf import OmegaConf from sgm.util import instantiate_from_config +from sgm.modules.diffusionmodules.sampling import EulerAncestralSampler + +sampler = EulerAncestralSampler( + num_steps=40, + discretization_config={ + "target": "sgm.modules.diffusionmodules.discretizer.LegacyDDPMDiscretization", + }, + guider_config={ + "target": "sgm.modules.diffusionmodules.guiders.VanillaCFG", + "params": {"scale": 9.0, "dyn_thresh_config": { + "target": "sgm.modules.diffusionmodules.sampling_utils.NoDynamicThresholding" + }}, + }, + eta=1.0, + s_noise=1.0, + verbose=True, +) + config_path = './sd_xl_base.yaml' config = OmegaConf.load(config_path) model = instantiate_from_config(config.model).cpu()