Spaces:
Paused
Paused
lllyasviel
commited on
Commit
·
3313361
1
Parent(s):
b4852a5
entry.py
CHANGED
@@ -5,6 +5,24 @@ import safetensors.torch
|
|
5 |
from omegaconf import OmegaConf
|
6 |
from sgm.util import instantiate_from_config
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
config_path = './sd_xl_base.yaml'
|
9 |
config = OmegaConf.load(config_path)
|
10 |
model = instantiate_from_config(config.model).cpu()
|
|
|
5 |
from omegaconf import OmegaConf
|
6 |
from sgm.util import instantiate_from_config
|
7 |
|
8 |
+
from sgm.modules.diffusionmodules.sampling import EulerAncestralSampler
|
9 |
+
|
10 |
+
sampler = EulerAncestralSampler(
|
11 |
+
num_steps=40,
|
12 |
+
discretization_config={
|
13 |
+
"target": "sgm.modules.diffusionmodules.discretizer.LegacyDDPMDiscretization",
|
14 |
+
},
|
15 |
+
guider_config={
|
16 |
+
"target": "sgm.modules.diffusionmodules.guiders.VanillaCFG",
|
17 |
+
"params": {"scale": 9.0, "dyn_thresh_config": {
|
18 |
+
"target": "sgm.modules.diffusionmodules.sampling_utils.NoDynamicThresholding"
|
19 |
+
}},
|
20 |
+
},
|
21 |
+
eta=1.0,
|
22 |
+
s_noise=1.0,
|
23 |
+
verbose=True,
|
24 |
+
)
|
25 |
+
|
26 |
config_path = './sd_xl_base.yaml'
|
27 |
config = OmegaConf.load(config_path)
|
28 |
model = instantiate_from_config(config.model).cpu()
|