bjooo commited on
Commit
c60840a
ยท
verified ยท
1 Parent(s): bb02813

Add files using upload-large-folder tool

Browse files
_archive/nodes_unregistered/__init_old__.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # __init__.py (ํ†ตํ•ฉ ๋กœ๋”)
2
+ import traceback
3
+
4
+ NODE_CLASS_MAPPINGS = {}
5
+ NODE_DISPLAY_NAME_MAPPINGS = {}
6
+
7
+ def register_node(class_name, node_class, display_name):
8
+ NODE_CLASS_MAPPINGS[class_name] = node_class
9
+ NODE_DISPLAY_NAME_MAPPINGS[class_name] = display_name
10
+
11
+ # ๋ฆฌ์‚ฌ์ด์ฆˆ
12
+ try:
13
+ from .wan_resizer import WanNativeResize_Dolphin
14
+ register_node("WanNativeResize_Dolphin", WanNativeResize_Dolphin, "๐Ÿฌ Wan Native Resize (Dolphin)")
15
+ except Exception as e: print(e)
16
+
17
+ # ํŠธ๋ฆฌํ”Œ ๋งคํŠธ๋ฆญ์Šค
18
+ try:
19
+ from .arch_logic_v16 import DolphinTripleLoraMatrix
20
+ register_node("DolphinTripleLoraMatrix", DolphinTripleLoraMatrix, "๐Ÿฌ Dolphin Triple Lora Matrix (Wan 2.2)")
21
+ except Exception as e: print(e)
22
+
23
+ # ์Šคํ† ๋ฆฌ ์Šคํ”Œ๋ฆฌํ„ฐ
24
+ try:
25
+ from .promp_logic_v32_story import DolphinMultiActionPromptNode_V32
26
+ register_node("DolphinMultiActionPromptNode_V32", DolphinMultiActionPromptNode_V32, "๐Ÿฌ Dolphin Story Splitter V32")
27
+ except Exception as e: print(e)
28
+
29
+ # ๋””๋ ‰ํ„ฐ
30
+ try:
31
+ from .dolphin_director import DolphinDirector
32
+ register_node("DolphinDirector", DolphinDirector, "๐Ÿฌ Dolphin Director (V1)")
33
+ except Exception as e: print(e)
34
+
35
+ __all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
_archive/nodes_unregistered/gemini-code-1782954683883.py ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ def convert_workflow(input_file, output_file):
4
+ with open(input_file, 'r', encoding='utf-8') as f:
5
+ data = json.load(f)
6
+
7
+ for node in data.get('nodes', []):
8
+ # 1. Story Splitter ๊ตฌ๋ฒ„์ „ -> V32 ์ตœ์‹ ๋ฒ„์ „์œผ๋กœ ๊ต์ฒด
9
+ if node.get('type', '').startswith('DolphinMultiActionPromptNode_'):
10
+ node['type'] = 'DolphinMultiActionPromptNode_V32'
11
+
12
+ # 2. Architect V15/V16 -> Triple Lora Matrix ๋กœ ๊ต์ฒด
13
+ if node.get('type', '').startswith('DolphinArchitect'):
14
+ node_id = node['id']
15
+ node['type'] = 'DolphinTripleLoraMatrix'
16
+
17
+ # [์ž…๋ ฅ ์Šฌ๋กฏ ์ตœ์ ํ™”]
18
+ # ๊ตฌ๋ฒ„์ „์˜ 3๊ฐœ ๋ชจ๋ธ ์ž…๋ ฅ์ฐฝ์„ ์ œ๊ฑฐํ•˜๊ณ , 1๊ฐœ์˜ ํ†ตํ•ฉ 'model' ์ž…๋ ฅ์œผ๋กœ ์ „ํ™˜
19
+ new_inputs = []
20
+ for inp in node.get('inputs', []):
21
+ if inp['name'] == 'model_base':
22
+ inp['name'] = 'model' # ์Šฌ๋กฏ 0๋ฒˆ ์œ ์ง€
23
+ new_inputs.append(inp)
24
+ node['inputs'] = new_inputs
25
+
26
+ # [์ถœ๋ ฅ ์Šฌ๋กฏ ์žฌ๊ตฌ์„ฑ]
27
+ # ์ƒˆ๋กœ์šด ๋…ธ๋“œ์˜ 7๊ฐœ ์ถœ๋ ฅ(M_BASE, C_BASE, M_HIGH, C_HIGH, M_LOW, C_LOW, string)์— ๋งž์ถค
28
+ node['outputs'] = [
29
+ {"name": "M_BASE", "type": "MODEL", "links": []},
30
+ {"name": "C_BASE", "type": "CLIP", "links": []},
31
+ {"name": "M_HIGH", "type": "MODEL", "links": []},
32
+ {"name": "C_HIGH", "type": "CLIP", "links": []},
33
+ {"name": "M_LOW", "type": "MODEL", "links": []},
34
+ {"name": "C_LOW", "type": "CLIP", "links": []},
35
+ {"name": "applied_loras", "type": "STRING", "links": []}
36
+ ]
37
+
38
+ # [์œ„์ ฏ ์ดˆ๊ธฐํ™”]
39
+ # 24๊ฐœ์งœ๋ฆฌ ๋ฌด๊ฑฐ์šด UI๋ฅผ ์ง€์šฐ๊ณ , ๊ฐ€๋ฒผ์šด ์ฝค๋ณด+ํ…์ŠคํŠธ UI๋กœ ๋ฆฌ์…‹
40
+ node['widgets_values'] = [
41
+ "None", "0.5, 0.2, 0.5",
42
+ "None", "1.0, 0.5, 0.0",
43
+ "None", "1.0, 1.0, 1.0"
44
+ ]
45
+
46
+ # [๋งํฌ(์„ ) ์ง€๋Šฅํ˜• ์žฌ์—ฐ๊ฒฐ]
47
+ # M_HIGH์™€ M_LOW์˜ ์ถœ๋ ฅ ํฌํŠธ ๋ฒˆํ˜ธ๊ฐ€ ๋ณ€๊ฒฝ๋œ ๊ฒƒ์„ ์ฐพ์•„ ์„ ์„ ๋‹ค์‹œ ์ด์–ด์คŒ
48
+ for link in data.get('links', []):
49
+ # link = [link_id, origin_id, origin_slot, target_id, target_slot, type]
50
+ if link[1] == node_id:
51
+ if link[2] == 1: # ๊ตฌ๋ฒ„์ „ M_HIGH
52
+ link[2] = 2 # ์‹ ๋ฒ„์ „ M_HIGH ํฌํŠธ(2๋ฒˆ)๋กœ ์ด๋™
53
+ node['outputs'][2]['links'].append(link[0])
54
+ elif link[2] == 2: # ๊ตฌ๋ฒ„์ „ M_LOW
55
+ link[2] = 4 # ์‹ ๋ฒ„์ „ M_LOW ํฌํŠธ(4๋ฒˆ)๋กœ ์ด๋™
56
+ node['outputs'][4]['links'].append(link[0])
57
+ elif link[2] == 0: # M_BASE๋Š” ๊ทธ๋Œ€๋กœ ์œ ์ง€
58
+ node['outputs'][0]['links'].append(link[0])
59
+
60
+ with open(output_file, 'w', encoding='utf-8') as f:
61
+ json.dump(data, f, indent=4)
62
+
63
+ print(f"โœ… ๋ณ€ํ™˜ ์™„๋ฃŒ! ์ƒ์„ฑ๋œ '{output_file}' ํŒŒ์ผ์„ ComfyUI์— ๋“œ๋ž˜๊ทธ ์•ค ๋“œ๋กญ ํ•˜์„ธ์š”.")
64
+
65
+ # ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰
66
+ convert_workflow('0705_optimized.json', '0705_v32_matrix.json')
_archive/nodes_unregistered/lora_classifier.py ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ LoRA Manager ๋กœ์ปฌ DB(civitai์—์„œ ์Šค์บ” ์‹œ ์ด๋ฏธ ๊ธ์–ด์˜จ ํƒœ๊ทธ/๋ฉ”ํƒ€๋ฐ์ดํ„ฐ)๋ฅผ ์ฝ์–ด์„œ
4
+ WAN ๊ณ„์—ด ๋กœ๋ผ๋งŒ ๊ณจ๋ผ 1์ฐจ ์ž๋™ ๋ถ„๋ฅ˜ ๊ฒฐ๊ณผ๋ฅผ JSON์œผ๋กœ ๋ฝ‘๋Š”๋‹ค.
5
+
6
+ ๋ถ„๋ฅ˜ ์ถ• 2๊ฐœ:
7
+ 1) ๊ธฐ์ˆ  ํ˜ธํ™˜์„ฑ: wan_version(2.1/2.2/unknown), variant(i2v/t2v/unknown),
8
+ stage(high/low/base-or-single) - ์ „๋ถ€ filename + base_model ํ•„๋“œ์—์„œ ์ถ”์ถœ
9
+ 2) ํ–‰์œ„/๋‚ด์šฉ ์นดํ…Œ๊ณ ๋ฆฌ: civitai์—์„œ ์Šค์บ”ํ•œ model_tags๋ฅผ ๋ฏธ๋ฆฌ ์ •ํ•œ ์นดํ…Œ๊ณ ๋ฆฌ
10
+ ์‚ฌ์ „์— ๋งคํ•‘ (์—ฌ๋Ÿฌ ๊ฐœ ์ค‘๋ณต ๊ฐ€๋Šฅ - ๋กœ๋ผ ํ•˜๋‚˜๊ฐ€ pov+anal ๊ฐ™์ด ์—ฌ๋Ÿฌ ํƒœ๊ทธ๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์Œ)
11
+
12
+ DB ์ž์ฒด๋ฅผ ์ˆ˜์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค(์ฝ๊ธฐ ์ „์šฉ). ๊ฒฐ๊ณผ๋Š” review์šฉ JSON ํ•˜๋‚˜๋กœ ๋ฝ‘์•„์„œ,
13
+ ์‚ฌ๋žŒ์ด ๋ˆˆ์œผ๋กœ ํ›‘๊ณ  ํ•„์š”ํ•˜๋ฉด ์†์œผ๋กœ ๊ณ ์น  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค - ์ž๋™๋ถ„๋ฅ˜ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ
14
+ ์ž๋™ ์ ์šฉ(๋กœ๋ผ ์ž๋™ ์„ ํƒ)ํ•˜๋Š” ๊ฑด ์ง€๋‚œ๋ฒˆ์— "์˜ˆ์™ธ ๋™์ž‘์ด ๋„ˆ๋ฌด ๋งŽ๋‹ค"๊ณ  ๋ช…์‹œ์ ์œผ๋กœ
15
+ ๊ฑฐ๋ถ€ํ•˜์…จ๋˜ ๋ฐฉํ–ฅ์ด๋ผ ์ด ์Šคํฌ๋ฆฝํŠธ๋Š” ๋”ฑ "๋ถ„๋ฅ˜ํ‘œ ์ƒ์„ฑ"๊นŒ์ง€๋งŒ ํ•œ๋‹ค.
16
+ """
17
+ import sqlite3
18
+ import json
19
+ import os
20
+ import re
21
+
22
+ DB_PATH = os.path.join(
23
+ os.environ.get("LOCALAPPDATA", ""), "ComfyUI-LoRA-Manager", "cache", "model", "comfyui.sqlite")
24
+ OUT_PATH = os.path.join(os.path.dirname(__file__), "dolphin_lora_classification.json")
25
+
26
+ # ํƒœ๊ทธ -> ์นดํ…Œ๊ณ ๋ฆฌ. ์ˆœ์„œ๋Š” ์šฐ์„ ์ˆœ์œ„(๋จผ์ € ๋งค์น˜๋˜๋Š” ๊ฑธ "primary"๋กœ ์”€). ์นดํ…Œ๊ณ ๋ฆฌ ์ž์ฒด๋Š”
27
+ # ์ค‘๋ณต ํ—ˆ์šฉ(ํ•œ ๋กœ๋ผ๊ฐ€ ์—ฌ๋Ÿฌ ์นดํ…Œ๊ณ ๋ฆฌ์— ๋‹ค ๋“ค์–ด๊ฐˆ ์ˆ˜ ์žˆ์Œ).
28
+ CATEGORY_TAG_MAP = {
29
+ "oral": {"oral", "blowjob", "deepthroat", "fellatio", "irrumatio"},
30
+ "anal": {"anal"},
31
+ "position_action": {"cowgirl", "doggystyle", "missionary", "riding", "sex", "penetration",
32
+ "reverse cowgirl", "standing sex", "piledriver"},
33
+ "masturbation": {"masturbation", "fingering", "handjob"},
34
+ "pov": {"pov"},
35
+ "fetish_other": {"futanari", "bdsm", "feet", "pee", "piss", "cum", "creampie", "squirting"},
36
+ "character_identity": {"character", "celebrity"},
37
+ "style_render": {"photorealistic", "realistic", "anime", "style", "illustrious"},
38
+ "toy_prop": {"sex toy", "dildo", "sex machine", "vibrator"},
39
+ "kink_dynamic": {"femdom", "bdsm"},
40
+ "dance_movement": {"dance", "poses", "pose"},
41
+ # ์ฝ˜ํ…์ธ  ์นดํ…Œ๊ณ ๋ฆฌ๊ฐ€ ์•„๋‹ˆ๋ผ "์ด ๋กœ๋ผ ์ž์ฒด๊ฐ€ lightx2v๋ฅ˜ ๊ฐ€์†/์ฆ๋ฅ˜ ๋กœ๋ผ"๋ผ๋Š” ํ‘œ์‹œ.
42
+ # ํด๋ฆฝ ์ฝ˜ํ…์ธ ์šฉ ๋กœ๋ผ ํ’€์—์„œ ๊ฑธ๋Ÿฌ๋‚ด์•ผ ํ•  ๋Œ€์ƒ - Model Loader์—์„œ ์ด๋ฏธ ์“ฐ๋Š” ๊ฒƒ๊ณผ
43
+ # ๊ฒน์น˜๋Š” ์†๋„์šฉ ๋กœ๋ผ๋ฅผ ์‹ค์ˆ˜๋กœ ํด๋ฆฝ ๋กœ๋ผ ์Šฌ๋กฏ์— ๋„ฃ์ง€ ์•Š๋„๋ก ๊ตฌ๋ถ„ํ•ด๋‘”๋‹ค.
44
+ "speed_distillation": {"distill", "distillation", "fast", "faster", "speed up", "lightning",
45
+ "lightx2v", "accelerator"},
46
+ }
47
+
48
+ FILENAME_STAGE_RE = re.compile(r"(high[_-]?noise|_high\b)", re.IGNORECASE)
49
+ FILENAME_LOW_RE = re.compile(r"(low[_-]?noise|_low\b)", re.IGNORECASE)
50
+
51
+
52
+ def classify_wan_version(base_model, file_name):
53
+ bm = (base_model or "").lower()
54
+ fn = (file_name or "").lower()
55
+ if "2.2" in bm or "2.2" in fn or "wan2.2" in fn or "wan22" in fn:
56
+ version = "2.2"
57
+ elif "wan video 14b" in bm or "2.1" in bm or "wan2.1" in fn or "wan21" in fn:
58
+ version = "2.1"
59
+ elif bm.startswith("wan"):
60
+ version = "unknown-wan"
61
+ else:
62
+ version = None # WAN ๊ณ„์—ด ์•„๋‹˜(Flux/Pony/SDXL ๋“ฑ) - ํ˜ธ์ถœ๋ถ€์—์„œ ๊ฑธ๋Ÿฌ๋ƒ„
63
+ if "i2v" in bm or "i2v" in fn:
64
+ variant = "i2v"
65
+ elif "t2v" in bm or "t2v" in fn:
66
+ variant = "t2v"
67
+ else:
68
+ variant = "unknown"
69
+ return version, variant
70
+
71
+
72
+ def classify_stage(file_name):
73
+ fn = file_name or ""
74
+ if FILENAME_STAGE_RE.search(fn):
75
+ return "high"
76
+ if FILENAME_LOW_RE.search(fn):
77
+ return "low"
78
+ return "base_or_single" # high/low ๊ตฌ๋ถ„ ์—†๋Š” ๋‹จ์ผ ํŒŒ์ผ (base ๊ฒธ์šฉ์ด๊ฑฐ๋‚˜ non-split)
79
+
80
+
81
+ def main():
82
+ if not os.path.exists(DB_PATH):
83
+ print(f"โŒ LoRA Manager DB๋ฅผ ๋ชป ์ฐพ์Œ: {DB_PATH}")
84
+ return
85
+
86
+ con = sqlite3.connect(f"file:{DB_PATH}?mode=ro", uri=True)
87
+ cur = con.cursor()
88
+ cur.execute("""
89
+ SELECT file_path, file_name, base_model, trained_words, notes, usage_tips
90
+ FROM models WHERE model_type='lora'
91
+ """)
92
+ rows = cur.fetchall()
93
+
94
+ cur.execute("SELECT file_path, tag FROM model_tags WHERE model_type='lora'")
95
+ tags_by_path = {}
96
+ for file_path, tag in cur.fetchall():
97
+ tags_by_path.setdefault(file_path, []).append(tag)
98
+ con.close()
99
+
100
+ results = []
101
+ skipped_non_wan = 0
102
+ for file_path, file_name, base_model, trained_words, notes, usage_tips in rows:
103
+ version, variant = classify_wan_version(base_model, file_name)
104
+ if version is None:
105
+ skipped_non_wan += 1
106
+ continue
107
+
108
+ tags = set(t.lower() for t in tags_by_path.get(file_path, []))
109
+ categories = [cat for cat, keywords in CATEGORY_TAG_MAP.items() if tags & keywords]
110
+
111
+ try:
112
+ trained = json.loads(trained_words) if trained_words else []
113
+ except (ValueError, TypeError):
114
+ trained = []
115
+
116
+ results.append({
117
+ "file_name": file_name,
118
+ "file_path": file_path,
119
+ "wan_version": version,
120
+ "variant": variant,
121
+ "stage": classify_stage(file_name),
122
+ "categories": categories or ["uncategorized"],
123
+ "trigger_words": trained,
124
+ "raw_tags": sorted(tags),
125
+ "notes": notes or "",
126
+ "usage_tips": usage_tips or "",
127
+ })
128
+
129
+ results.sort(key=lambda r: (r["wan_version"], r["variant"], r["file_name"]))
130
+
131
+ with open(OUT_PATH, "w", encoding="utf-8") as f:
132
+ json.dump(results, f, ensure_ascii=False, indent=1)
133
+
134
+ print(f"โœ… WAN ๊ณ„์—ด ๋กœ๋ผ {len(results)}๊ฐœ ๋ถ„๋ฅ˜ ์™„๋ฃŒ (๋น„WAN {skipped_non_wan}๊ฐœ ์ œ์™ธ)")
135
+ print(f" -> {OUT_PATH}")
136
+
137
+ from collections import Counter
138
+ ver_counts = Counter((r["wan_version"], r["variant"]) for r in results)
139
+ print("\n๋ฒ„์ „/variant ๋ถ„ํฌ:")
140
+ for k, v in ver_counts.most_common():
141
+ print(f" {k}: {v}")
142
+ cat_counts = Counter(c for r in results for c in r["categories"])
143
+ print("\n์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ:")
144
+ for k, v in cat_counts.most_common():
145
+ print(f" {k}: {v}")
146
+
147
+
148
+ if __name__ == "__main__":
149
+ main()
_archive/workflows/0705_director.json ADDED
The diff for this file is too large to render. See raw diff
 
_archive/workflows/0705_optimized.json ADDED
The diff for this file is too large to render. See raw diff
 
dataset_builder/__pycache__/caption.cpython-313.pyc ADDED
Binary file (13.6 kB). View file
 
dataset_builder/__pycache__/detect.cpython-313.pyc ADDED
Binary file (6.49 kB). View file
 
dataset_builder/__pycache__/scene_split.cpython-313.pyc ADDED
Binary file (10.5 kB). View file
 
dataset_builder/__pycache__/webui.cpython-313.pyc ADDED
Binary file (25.6 kB). View file
 
dataset_builder/yolov8n.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f59b3d833e2ff32e194b5bb8e08d211dc7c5bdf144b90d2c8412c47ccfc83b36
3
+ size 6549796