Add files using upload-large-folder tool
Browse filesFiles changed (10)
- _archive/nodes_unregistered/__init_old__.pyAdded+35
- _archive/nodes_unregistered/gemini-code-1782954683883.pyAdded+66
- _archive/nodes_unregistered/lora_classifier.pyAdded+149
- _archive/workflows/0705_director.jsonAdded
- _archive/workflows/0705_optimized.jsonAdded
- dataset_builder/__pycache__/caption.cpython-313.pycAdded
- dataset_builder/__pycache__/detect.cpython-313.pycAdded
- dataset_builder/__pycache__/scene_split.cpython-313.pycAdded
- dataset_builder/__pycache__/webui.cpython-313.pycAdded
- dataset_builder/yolov8n.ptAdded+3
1234567891011121314151617181920212223242526272829303132333435# __init__.py (ํตํฉ ๋ก๋)import traceback
NODE_CLASS_MAPPINGS = {}NODE_DISPLAY_NAME_MAPPINGS = {}
def register_node(class_name, node_class, display_name): NODE_CLASS_MAPPINGS[class_name] = node_class NODE_DISPLAY_NAME_MAPPINGS[class_name] = display_name
# ๋ฆฌ์ฌ์ด์ฆtry: from .wan_resizer import WanNativeResize_Dolphin register_node("WanNativeResize_Dolphin", WanNativeResize_Dolphin, "๐ฌ Wan Native Resize (Dolphin)")except Exception as e: print(e)
# ํธ๋ฆฌํ ๋งคํธ๋ฆญ์คtry: from .arch_logic_v16 import DolphinTripleLoraMatrix register_node("DolphinTripleLoraMatrix", DolphinTripleLoraMatrix, "๐ฌ Dolphin Triple Lora Matrix (Wan 2.2)")except Exception as e: print(e)
# ์คํ ๋ฆฌ ์คํ๋ฆฌํฐtry: from .promp_logic_v32_story import DolphinMultiActionPromptNode_V32 register_node("DolphinMultiActionPromptNode_V32", DolphinMultiActionPromptNode_V32, "๐ฌ Dolphin Story Splitter V32")except Exception as e: print(e)
# ๋๋ ํฐtry: from .dolphin_director import DolphinDirector register_node("DolphinDirector", DolphinDirector, "๐ฌ Dolphin Director (V1)")except Exception as e: print(e)
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566import json
def convert_workflow(input_file, output_file): with open(input_file, 'r', encoding='utf-8') as f: data = json.load(f) for node in data.get('nodes', []): # 1. Story Splitter ๊ตฌ๋ฒ์ -> V32 ์ต์ ๋ฒ์ ์ผ๋ก ๊ต์ฒด if node.get('type', '').startswith('DolphinMultiActionPromptNode_'): node['type'] = 'DolphinMultiActionPromptNode_V32' # 2. Architect V15/V16 -> Triple Lora Matrix ๋ก ๊ต์ฒด if node.get('type', '').startswith('DolphinArchitect'): node_id = node['id'] node['type'] = 'DolphinTripleLoraMatrix' # [์
๋ ฅ ์ฌ๋กฏ ์ต์ ํ] # ๊ตฌ๋ฒ์ ์ 3๊ฐ ๋ชจ๋ธ ์
๋ ฅ์ฐฝ์ ์ ๊ฑฐํ๊ณ , 1๊ฐ์ ํตํฉ 'model' ์
๋ ฅ์ผ๋ก ์ ํ new_inputs = [] for inp in node.get('inputs', []): if inp['name'] == 'model_base': inp['name'] = 'model' # ์ฌ๋กฏ 0๋ฒ ์ ์ง new_inputs.append(inp) node['inputs'] = new_inputs # [์ถ๋ ฅ ์ฌ๋กฏ ์ฌ๊ตฌ์ฑ] # ์๋ก์ด ๋
ธ๋์ 7๊ฐ ์ถ๋ ฅ(M_BASE, C_BASE, M_HIGH, C_HIGH, M_LOW, C_LOW, string)์ ๋ง์ถค node['outputs'] = [ {"name": "M_BASE", "type": "MODEL", "links": []}, {"name": "C_BASE", "type": "CLIP", "links": []}, {"name": "M_HIGH", "type": "MODEL", "links": []}, {"name": "C_HIGH", "type": "CLIP", "links": []}, {"name": "M_LOW", "type": "MODEL", "links": []}, {"name": "C_LOW", "type": "CLIP", "links": []}, {"name": "applied_loras", "type": "STRING", "links": []} ] # [์์ ฏ ์ด๊ธฐํ] # 24๊ฐ์ง๋ฆฌ ๋ฌด๊ฑฐ์ด UI๋ฅผ ์ง์ฐ๊ณ , ๊ฐ๋ฒผ์ด ์ฝค๋ณด+ํ
์คํธ UI๋ก ๋ฆฌ์
node['widgets_values'] = [ "None", "0.5, 0.2, 0.5", "None", "1.0, 0.5, 0.0", "None", "1.0, 1.0, 1.0" ]
# [๋งํฌ(์ ) ์ง๋ฅํ ์ฌ์ฐ๊ฒฐ] # M_HIGH์ M_LOW์ ์ถ๋ ฅ ํฌํธ ๋ฒํธ๊ฐ ๋ณ๊ฒฝ๋ ๊ฒ์ ์ฐพ์ ์ ์ ๋ค์ ์ด์ด์ค for link in data.get('links', []): # link = [link_id, origin_id, origin_slot, target_id, target_slot, type] if link[1] == node_id: if link[2] == 1: # ๊ตฌ๋ฒ์ M_HIGH link[2] = 2 # ์ ๋ฒ์ M_HIGH ํฌํธ(2๋ฒ)๋ก ์ด๋ node['outputs'][2]['links'].append(link[0]) elif link[2] == 2: # ๊ตฌ๋ฒ์ M_LOW link[2] = 4 # ์ ๋ฒ์ M_LOW ํฌํธ(4๋ฒ)๋ก ์ด๋ node['outputs'][4]['links'].append(link[0]) elif link[2] == 0: # M_BASE๋ ๊ทธ๋๋ก ์ ์ง node['outputs'][0]['links'].append(link[0]) with open(output_file, 'w', encoding='utf-8') as f: json.dump(data, f, indent=4) print(f"โ
๋ณํ ์๋ฃ! ์์ฑ๋ '{output_file}' ํ์ผ์ ComfyUI์ ๋๋๊ทธ ์ค ๋๋กญ ํ์ธ์.")
# ์คํฌ๋ฆฝํธ ์คํconvert_workflow('0705_optimized.json', '0705_v32_matrix.json')123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149# -*- coding: utf-8 -*-"""LoRA Manager ๋ก์ปฌ DB(civitai์์ ์ค์บ ์ ์ด๋ฏธ ๊ธ์ด์จ ํ๊ทธ/๋ฉํ๋ฐ์ดํฐ)๋ฅผ ์ฝ์ด์WAN ๊ณ์ด ๋ก๋ผ๋ง ๊ณจ๋ผ 1์ฐจ ์๋ ๋ถ๋ฅ ๊ฒฐ๊ณผ๋ฅผ JSON์ผ๋ก ๋ฝ๋๋ค.
๋ถ๋ฅ ์ถ 2๊ฐ: 1) ๊ธฐ์ ํธํ์ฑ: wan_version(2.1/2.2/unknown), variant(i2v/t2v/unknown), stage(high/low/base-or-single) - ์ ๋ถ filename + base_model ํ๋์์ ์ถ์ถ 2) ํ์/๋ด์ฉ ์นดํ
๊ณ ๋ฆฌ: civitai์์ ์ค์บํ model_tags๋ฅผ ๋ฏธ๋ฆฌ ์ ํ ์นดํ
๊ณ ๋ฆฌ ์ฌ์ ์ ๋งคํ (์ฌ๋ฌ ๊ฐ ์ค๋ณต ๊ฐ๋ฅ - ๋ก๋ผ ํ๋๊ฐ pov+anal ๊ฐ์ด ์ฌ๋ฌ ํ๊ทธ๋ฅผ ๊ฐ์ง ์ ์์)
DB ์์ฒด๋ฅผ ์์ ํ์ง ์๋๋ค(์ฝ๊ธฐ ์ ์ฉ). ๊ฒฐ๊ณผ๋ review์ฉ JSON ํ๋๋ก ๋ฝ์์,์ฌ๋์ด ๋์ผ๋ก ํ๊ณ ํ์ํ๋ฉด ์์ผ๋ก ๊ณ ์น ์ ์๊ฒ ํ๋ค - ์๋๋ถ๋ฅ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋๋ก์๋ ์ ์ฉ(๋ก๋ผ ์๋ ์ ํ)ํ๋ ๊ฑด ์ง๋๋ฒ์ "์์ธ ๋์์ด ๋๋ฌด ๋ง๋ค"๊ณ ๋ช
์์ ์ผ๋ก๊ฑฐ๋ถํ์
จ๋ ๋ฐฉํฅ์ด๋ผ ์ด ์คํฌ๋ฆฝํธ๋ ๋ฑ "๋ถ๋ฅํ ์์ฑ"๊น์ง๋ง ํ๋ค."""import sqlite3import jsonimport osimport re
DB_PATH = os.path.join( os.environ.get("LOCALAPPDATA", ""), "ComfyUI-LoRA-Manager", "cache", "model", "comfyui.sqlite")OUT_PATH = os.path.join(os.path.dirname(__file__), "dolphin_lora_classification.json")
# ํ๊ทธ -> ์นดํ
๊ณ ๋ฆฌ. ์์๋ ์ฐ์ ์์(๋จผ์ ๋งค์น๋๋ ๊ฑธ "primary"๋ก ์). ์นดํ
๊ณ ๋ฆฌ ์์ฒด๋# ์ค๋ณต ํ์ฉ(ํ ๋ก๋ผ๊ฐ ์ฌ๋ฌ ์นดํ
๊ณ ๋ฆฌ์ ๋ค ๋ค์ด๊ฐ ์ ์์).CATEGORY_TAG_MAP = { "oral": {"oral", "blowjob", "deepthroat", "fellatio", "irrumatio"}, "anal": {"anal"}, "position_action": {"cowgirl", "doggystyle", "missionary", "riding", "sex", "penetration", "reverse cowgirl", "standing sex", "piledriver"}, "masturbation": {"masturbation", "fingering", "handjob"}, "pov": {"pov"}, "fetish_other": {"futanari", "bdsm", "feet", "pee", "piss", "cum", "creampie", "squirting"}, "character_identity": {"character", "celebrity"}, "style_render": {"photorealistic", "realistic", "anime", "style", "illustrious"}, "toy_prop": {"sex toy", "dildo", "sex machine", "vibrator"}, "kink_dynamic": {"femdom", "bdsm"}, "dance_movement": {"dance", "poses", "pose"}, # ์ฝํ
์ธ ์นดํ
๊ณ ๋ฆฌ๊ฐ ์๋๋ผ "์ด ๋ก๋ผ ์์ฒด๊ฐ lightx2v๋ฅ ๊ฐ์/์ฆ๋ฅ ๋ก๋ผ"๋ผ๋ ํ์. # ํด๋ฆฝ ์ฝํ
์ธ ์ฉ ๋ก๋ผ ํ์์ ๊ฑธ๋ฌ๋ด์ผ ํ ๋์ - Model Loader์์ ์ด๋ฏธ ์ฐ๋ ๊ฒ๊ณผ # ๊ฒน์น๋ ์๋์ฉ ๋ก๋ผ๋ฅผ ์ค์๋ก ํด๋ฆฝ ๋ก๋ผ ์ฌ๋กฏ์ ๋ฃ์ง ์๋๋ก ๊ตฌ๋ถํด๋๋ค. "speed_distillation": {"distill", "distillation", "fast", "faster", "speed up", "lightning", "lightx2v", "accelerator"},}
FILENAME_STAGE_RE = re.compile(r"(high[_-]?noise|_high\b)", re.IGNORECASE)FILENAME_LOW_RE = re.compile(r"(low[_-]?noise|_low\b)", re.IGNORECASE)
def classify_wan_version(base_model, file_name): bm = (base_model or "").lower() fn = (file_name or "").lower() if "2.2" in bm or "2.2" in fn or "wan2.2" in fn or "wan22" in fn: version = "2.2" elif "wan video 14b" in bm or "2.1" in bm or "wan2.1" in fn or "wan21" in fn: version = "2.1" elif bm.startswith("wan"): version = "unknown-wan" else: version = None # WAN ๊ณ์ด ์๋(Flux/Pony/SDXL ๋ฑ) - ํธ์ถ๋ถ์์ ๊ฑธ๋ฌ๋ if "i2v" in bm or "i2v" in fn: variant = "i2v" elif "t2v" in bm or "t2v" in fn: variant = "t2v" else: variant = "unknown" return version, variant
def classify_stage(file_name): fn = file_name or "" if FILENAME_STAGE_RE.search(fn): return "high" if FILENAME_LOW_RE.search(fn): return "low" return "base_or_single" # high/low ๊ตฌ๋ถ ์๋ ๋จ์ผ ํ์ผ (base ๊ฒธ์ฉ์ด๊ฑฐ๋ non-split)
def main(): if not os.path.exists(DB_PATH): print(f"โ LoRA Manager DB๋ฅผ ๋ชป ์ฐพ์: {DB_PATH}") return
con = sqlite3.connect(f"file:{DB_PATH}?mode=ro", uri=True) cur = con.cursor() cur.execute(""" SELECT file_path, file_name, base_model, trained_words, notes, usage_tips FROM models WHERE model_type='lora' """) rows = cur.fetchall()
cur.execute("SELECT file_path, tag FROM model_tags WHERE model_type='lora'") tags_by_path = {} for file_path, tag in cur.fetchall(): tags_by_path.setdefault(file_path, []).append(tag) con.close()
results = [] skipped_non_wan = 0 for file_path, file_name, base_model, trained_words, notes, usage_tips in rows: version, variant = classify_wan_version(base_model, file_name) if version is None: skipped_non_wan += 1 continue
tags = set(t.lower() for t in tags_by_path.get(file_path, [])) categories = [cat for cat, keywords in CATEGORY_TAG_MAP.items() if tags & keywords]
try: trained = json.loads(trained_words) if trained_words else [] except (ValueError, TypeError): trained = []
results.append({ "file_name": file_name, "file_path": file_path, "wan_version": version, "variant": variant, "stage": classify_stage(file_name), "categories": categories or ["uncategorized"], "trigger_words": trained, "raw_tags": sorted(tags), "notes": notes or "", "usage_tips": usage_tips or "", })
results.sort(key=lambda r: (r["wan_version"], r["variant"], r["file_name"]))
with open(OUT_PATH, "w", encoding="utf-8") as f: json.dump(results, f, ensure_ascii=False, indent=1)
print(f"โ
WAN ๊ณ์ด ๋ก๋ผ {len(results)}๊ฐ ๋ถ๋ฅ ์๋ฃ (๋นWAN {skipped_non_wan}๊ฐ ์ ์ธ)") print(f" -> {OUT_PATH}")
from collections import Counter ver_counts = Counter((r["wan_version"], r["variant"]) for r in results) print("\n๋ฒ์ /variant ๋ถํฌ:") for k, v in ver_counts.most_common(): print(f" {k}: {v}") cat_counts = Counter(c for r in results for c in r["categories"]) print("\n์นดํ
๊ณ ๋ฆฌ ๋ถํฌ:") for k, v in cat_counts.most_common(): print(f" {k}: {v}")
if __name__ == "__main__": main()123version https://git-lfs.github.com/spec/v1oid sha256:f59b3d833e2ff32e194b5bb8e08d211dc7c5bdf144b90d2c8412c47ccfc83b36size 6549796_archive/nodes_unregistered/__init_old__.pyAdded+35
_archive/nodes_unregistered/gemini-code-1782954683883.pyAdded+66
_archive/nodes_unregistered/lora_classifier.pyAdded+149
_archive/workflows/0705_director.jsonAdded
_archive/workflows/0705_optimized.jsonAdded
dataset_builder/__pycache__/caption.cpython-313.pycAdded
dataset_builder/__pycache__/detect.cpython-313.pycAdded
dataset_builder/__pycache__/scene_split.cpython-313.pycAdded
dataset_builder/__pycache__/webui.cpython-313.pycAdded
dataset_builder/yolov8n.ptAdded+3