MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / decode

Method decode

gsplat/compression/post_training/codec.py:91–99  ·  view source on GitHub ↗
(self, frame_dir: Path, artifacts: CodecArtifacts, quant_ctx: QuantizationContext)

Source from the content-addressed store, hash-verified

89 return CodecArtifacts(name="npz_debug", files=files)
90
91 def decode(self, frame_dir: Path, artifacts: CodecArtifacts, quant_ctx: QuantizationContext) -> TensorDict:
92 restored: TensorDict = {}
93 for name, meta in artifacts.files.items():
94 file_type = meta.get("type")
95 if file_type not in {"npz_int", "npz_float"}:
96 raise ValueError(f"NPZ codec received unsupported file type '{file_type}' for '{name}'.")
97 data = np.load(frame_dir / meta["file"])["data"]
98 restored[name] = torch.from_numpy(data.astype(np.float32))
99 return restored
100
101
102class PNGCodec:

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected