Files
aigc-home/docs/hel-892/animate-document-evidence/acquire-animate.py.txt
T
2026-11-01 20:40:33 +08:00

18 lines
2.6 KiB
Plaintext

from pathlib import Path
import json,hashlib,datetime,subprocess,concurrent.futures
R=Path.cwd();REF=R/'docs/hel-892/animate-reference';now=datetime.datetime.now(datetime.timezone.utc).isoformat()
s=(R/'.local-evidence/setup-anima.py').read_text();exec('def fetch(spec):'+s.split('def fetch(spec):')[1].split('with concurrent.futures')[0].replace('anima-','animate-'))
common=['__init__.py','LICENSE','requirements.txt','pyproject.toml']
specs=[('core0222','Comfy-Org/ComfyUI','v0.22.2',['nodes.py','LICENSE','requirements.txt']),('core051extra','Comfy-Org/ComfyUI','v0.5.1',['comfy_extras/nodes_post_processing.py']),('wan-e5ef9752','kijai/ComfyUI-WanVideoWrapper','e5ef9752a7e846b232fc05fd993327a2e870a788',common+['nodes.py','nodes_model_loading.py','nodes_sampler.py','utils.py']),('wan-0dc8a845','kijai/ComfyUI-WanVideoWrapper','0dc8a8456472e26e41a35fe3c660afaa98b9cdd1',common+['nodes_model_loading.py']),('wan-2bdd81a1','kijai/ComfyUI-WanVideoWrapper','2bdd81a10b03c14443c79bdf3b783b1feb3d1fa3',common+['nodes.py','utils.py']),('wan-761b1d19','kijai/ComfyUI-WanVideoWrapper','761b1d191e50d589465e31dc0d40ff7c59b1b7b0',common+['nodes.py']),('pose-e63d6e71','kijai/ComfyUI-WanAnimatePreprocess','e63d6e71ae4c271f3f81211a7ca7f87607b7e50d',common+['nodes.py']),('kj-bb205d80','kijai/ComfyUI-KJNodes','bb205d809b467307b8ec3bb1a22680a4873187f8',common+['nodes/image_nodes.py','nodes/mask_nodes.py']),('kj-00da1910','kijai/ComfyUI-KJNodes','00da1910634fbf314d407608efb281ae6f7f1ba2',common+['nodes/mask_nodes.py']),('kj-623b5913','kijai/ComfyUI-KJNodes','623b5913dc7f240fd8b26422e99f8849a21c5473',common+['nodes/mask_nodes.py']),('kj-ff7f876c','kijai/ComfyUI-KJNodes','ff7f876c09ff5a53be051073c3c1731b96ee31a3',common+['nodes/image_nodes.py'])]
rows=json.loads((REF/'sources.json').read_bytes())['sources'];failures=[]
with concurrent.futures.ThreadPoolExecutor(max_workers=4)as pool:
futs={pool.submit(fetch,s):s for s in specs}
for f in concurrent.futures.as_completed(futs):
try:rows+=f.result()
except Exception as e:failures.append(dict(spec=futs[f],error=str(e)));print('FAILED',futs[f][0],str(e),flush=True)
for e in rows:
e['applicability']='本图按实例准确声明静态核准;原获取和本图复核分列,不执行或认证安装/恢复/模型素材许可'
if e['id']=='core051extra':
e['id']='core051';e['identity_key']='core051extra';e['license_file']=next(x['license_file']for x in rows if x['id']=='core051'and x['file']=='LICENSE')
(REF/'sources.json').write_text(json.dumps({'sources':rows},ensure_ascii=False,indent=2)+'\n');(REF/'exact-fetch-failures.json').write_text(json.dumps(failures,ensure_ascii=False,indent=2)+'\n');print('SOURCES',len(rows),flush=True)