Overwrite with converted Qwen2.5-3B model files (mirror delete: 11 files)
Browse files- sd_config.py +0 -53
sd_config.py
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
from transformers.configuration_utils import PretrainedConfig
|
2 |
-
from transformers.utils import logging
|
3 |
-
|
4 |
-
logger = logging.get_logger(__name__)
|
5 |
-
|
6 |
-
class EmptyClass(PretrainedConfig):
|
7 |
-
def __init__(self):
|
8 |
-
pass
|
9 |
-
class SDConfig(PretrainedConfig):
|
10 |
-
|
11 |
-
def __init__(self,
|
12 |
-
override_total_steps = -1,
|
13 |
-
freeze_vae = True,
|
14 |
-
use_flash = False,
|
15 |
-
adapt_topk = -1,
|
16 |
-
loss = 'mse',
|
17 |
-
mean = [0.485, 0.456, 0.406],
|
18 |
-
std = [0.229, 0.224, 0.225],
|
19 |
-
use_same_noise_among_timesteps = False,
|
20 |
-
random_timestep_per_iteration = True,
|
21 |
-
rand_timestep_equal_int = False,
|
22 |
-
output_dir = './outputs/First_Start',
|
23 |
-
do_center_crop_size = 384,
|
24 |
-
architectures = None,
|
25 |
-
input = None,
|
26 |
-
model = None,
|
27 |
-
tta = None,
|
28 |
-
**kwargs
|
29 |
-
|
30 |
-
|
31 |
-
):
|
32 |
-
super().__init__()
|
33 |
-
self.model = EmptyClass()
|
34 |
-
self.model.override_total_steps = override_total_steps
|
35 |
-
self.model.freeze_vae = freeze_vae
|
36 |
-
self.model.use_flash = use_flash
|
37 |
-
self.tta = EmptyClass()
|
38 |
-
self.tta.gradient_descent = EmptyClass()
|
39 |
-
self.tta.adapt_topk = adapt_topk
|
40 |
-
self.tta.loss = loss
|
41 |
-
self.tta.use_same_noise_among_timesteps = use_same_noise_among_timesteps
|
42 |
-
self.tta.random_timestep_per_iteration = random_timestep_per_iteration
|
43 |
-
self.tta.rand_timestep_equal_int = rand_timestep_equal_int
|
44 |
-
self.input = EmptyClass()
|
45 |
-
self.input.mean = mean
|
46 |
-
self.input.std = std
|
47 |
-
self.output_dir = output_dir
|
48 |
-
self.do_center_crop_size = do_center_crop_size
|
49 |
-
self.architectures = architectures
|
50 |
-
for k, v in kwargs.items():
|
51 |
-
setattr(self, k, v)
|
52 |
-
if __name__ =='__main__':
|
53 |
-
SDConfig()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|