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

Class AttributeQuantizerConfig

gsplat/compression_simulation/config.py:51–69  ·  view source on GitHub ↗

Quantization controls for a single attribute.

Source from the content-addressed store, hash-verified

49
50@dataclass
51class AttributeQuantizerConfig:
52 """Quantization controls for a single attribute."""
53
54 enabled: bool = True
55 bitwidth: Optional[int] = None
56 clamp_range: Optional[Tuple[float, float]] = None
57 warmup_steps: Optional[int] = 10_000
58 warmup_bitwidth: Optional[int] = 8
59 mode: str = "noise"
60
61 def to_dict(self) -> Dict[str, Any]:
62 return {
63 "enabled": self.enabled,
64 "bitwidth": self.bitwidth,
65 "clamp_range": list(self.clamp_range) if self.clamp_range is not None else None,
66 "warmup_steps": self.warmup_steps,
67 "warmup_bitwidth": self.warmup_bitwidth,
68 "mode": self.mode,
69 }
70
71
72def _default_attribute_configs() -> Dict[str, AttributeQuantizerConfig]:

Calls

no outgoing calls