i
This commit is contained in:
parent
b4852a5c0a
commit
33133615fd
18
entry.py
18
entry.py
@ -5,6 +5,24 @@ import safetensors.torch
|
|||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
from sgm.util import instantiate_from_config
|
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_path = './sd_xl_base.yaml'
|
||||||
config = OmegaConf.load(config_path)
|
config = OmegaConf.load(config_path)
|
||||||
model = instantiate_from_config(config.model).cpu()
|
model = instantiate_from_config(config.model).cpu()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user