MCPcopy Create free account
hub / github.com/Lightricks/ComfyUI-LTXVideo / extract_model_id

Function extract_model_id

gemma_api_conditioning.py:29–39  ·  view source on GitHub ↗
(ckpt_name: str)

Source from the content-addressed store, hash-verified

27
28
29def extract_model_id(ckpt_name: str) -> str:
30 model_id_key = "encrypted_wandb_properties"
31 with safe_open(
32 folder_paths.get_full_path_or_raise("checkpoints", ckpt_name),
33 framework="pt",
34 device="cpu",
35 ) as f:
36 metadata = f.metadata()
37 if not metadata or model_id_key not in metadata:
38 raise ValueError(MISSING_MODEL_ID_MESSAGE)
39 return metadata[model_id_key]
40
41
42@comfy_node(name="GemmaAPITextEncode")

Callers 1

encodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected