MCPcopy Index your code
hub / github.com/kijai/ComfyUI-WanVideoWrapper / get_cache_path

Method get_cache_path

nodes.py:484–487  ·  view source on GitHub ↗
(prompt)

Source from the content-addressed store, hash-verified

482 cache_dir = os.path.join(script_directory, 'text_embed_cache')
483 os.makedirs(cache_dir, exist_ok=True)
484 def get_cache_path(prompt):
485 cache_key = prompt.strip()
486 cache_hash = hashlib.sha256(cache_key.encode('utf-8')).hexdigest()
487 return os.path.join(cache_dir, f"{cache_hash}.pt")
488 cache_path = get_cache_path(prompt)
489 if os.path.exists(cache_path):
490 try:

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected