-
Notifications
You must be signed in to change notification settings - Fork 3
/
vv_defaults.py
81 lines (66 loc) · 1.93 KB
/
vv_defaults.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
SD1_ATTN_INJ_DEFAULTS = set([])
for idx in [1,2,3,4,5,6]:
SD1_ATTN_INJ_DEFAULTS.add(('output', idx))
SD1_RES_INJ_DEFAULTS = set()
for idx in [3,4,6]:
SD1_RES_INJ_DEFAULTS.add(('output', idx))
SD1_FLOW_MAP = set([('input', 0), ('input', 1), ('output', 6), ('output', 7), ('output', 8)])
SD1_OUTER_MAP = SD1_FLOW_MAP
SD1_INNER_MAP = set([])
for i in range(2, 12):
SD1_INNER_MAP.add(('input', i))
for i in range(6):
SD1_INNER_MAP.add(('output', i))
SD_FULL_MAP = set([])
for i in range(40):
SD_FULL_MAP.add(('input', i))
SD_FULL_MAP.add(('output', i))
SD1_INPUT_MAP = set([])
SD1_OUTPUT_MAP = set([])
for i in range(12):
SD1_INPUT_MAP.add(('input', i))
SD1_OUTPUT_MAP.add(('output', i))
# TODO get actual adj upsampler indexes
SDXL_ATTN_INJ_DEFAULTS = set([])
for idx in [10, 15, 20, 25, 30]:
SDXL_ATTN_INJ_DEFAULTS.add(('output', idx))
SDXL_RES_INJ_DEFAULTS = set([])
for idx in [1,2,4]:
SDXL_RES_INJ_DEFAULTS.add(('output', idx))
SDXL_FLOW_MAP = set([])
for idx in range(36):
SDXL_FLOW_MAP.add(('input', idx))
SDXL_FLOW_MAP.add(('output', idx))
# These are approximate
SDXL_OUTER_MAP = set([])
for i in range(30, 40):
SDXL_OUTER_MAP.add(('output', i))
for i in range(5):
SDXL_OUTER_MAP.add(('input', i))
SDXL_INNER_MAP =set([])
for i in range(30):
SDXL_INNER_MAP.add(('output', i))
for i in range(5, 40):
SDXL_INNER_MAP.add(('input', i))
SDXL_INPUT_MAP = set([])
SDXL_OUTPUT_MAP = set([])
for i in range(40):
SDXL_INPUT_MAP.add(('input', i))
SDXL_OUTER_MAP.add(('output', i))
MAP_TYPES = ['none', 'inner', 'outer', 'full', 'input', 'output']
SD1_MAPS = {
'none': set(),
'inner': SD1_INNER_MAP,
'outer': SD1_OUTER_MAP,
'full': SD_FULL_MAP,
'output': SD1_OUTPUT_MAP,
'input': SD1_INPUT_MAP,
}
SDXL_MAPS = {
'none': set(),
'inner': SDXL_INNER_MAP,
'outer': SDXL_OUTER_MAP,
'full': SD_FULL_MAP,
'output': SDXL_OUTPUT_MAP,
'input': SDXL_INPUT_MAP,
}