How maymhappy/meshripple works
MeshRipple is a mesh-generation inference application. The documented workflow loads a configured mesh dataset, prepares point-cloud conditioning and frontier-ordered face tokens, generates faces autoregressively with either full attention or NSA, then detokenizes and exports mesh files. The README documents the two inference variants and the topology-aware generation design. Some orchestration calls are omitted from the excerpts, so edges rely on indexed imports or README statements; unsampled subsystems are not expanded beyond supported paths.
Main entry points: main.py Inference runner · transformer_nsa.py NSA model · transformer.py Full-attention model · nsa.py Sparse attention core
Components 20
Inference runtime
- Config loader
config_loader/load_config.py - Inference runner
main.py - Mesh dataset
data_load/mesh_dataset_more_aug.py
Mesh representation
- BFS face tokenizer
ripple_tokenizer/tokenizer.py - Mesh postprocessor
utils/data_process.py
Autoregressive models
- Full-attention model
model_compile/transformer.py - Dense attention layers
model_compile/multihead_flashdiff_2.py - Dense RMSNorm
model_compile/rms_norm.py - NSA model
model_nsa_compile/transformer_nsa.py - NSA attention layers
model_nsa_compile/multihead_flashdiff_2.py - NSA RMSNorm
model_nsa_compile/rms_norm.py
Sparse attention
- Sparse attention core
nsa/module/nsa.py - Compressed attention
nsa/ops/compressed_attention.py - Linear compression
nsa/ops/linear_compress.py - Top-k attention
nsa/ops/topk_sparse_attention.py
Shape conditioning
- Point-cloud conditioner
model_compile/miche_conditioner.py - NSA point-cloud conditioner
model_nsa_compile/miche_conditioner.py - Michelangelo encoder
miche/encode.py
Other components
- Inference user
- Generated mesh files
Connections 21
- Inference user → Inference runner: starts inference
README.md - Inference runner → Config loader: loads config
main.py - Inference runner → Mesh dataset: builds dataset
main.py - Mesh dataset → BFS face tokenizer: uses tokenization
data_load/mesh_dataset_more_aug.py - Inference runner → Full-attention model: selects model
main.py - Inference runner → NSA model: selects model
main.py - Full-attention model → Dense attention layers: uses attention
model_compile/transformer.py - Full-attention model → Dense RMSNorm: uses normalization
model_compile/transformer.py - NSA model → NSA attention layers: uses attention
model_nsa_compile/transformer_nsa.py - NSA model → NSA RMSNorm: uses normalization
model_nsa_compile/transformer_nsa.py - NSA model → Sparse attention core: dispatches sparse attention
model_nsa_compile/transformer_nsa.py - Sparse attention core → Compressed attention: calls compressed attention
nsa/module/nsa.py - Sparse attention core → Linear compression: calls linear compression
nsa/module/nsa.py - Sparse attention core → Top-k attention: calls top-k attention
nsa/module/nsa.py - Full-attention model → Point-cloud conditioner: uses conditioning
model_compile/transformer.py - NSA model → NSA point-cloud conditioner: uses conditioning
model_nsa_compile/transformer_nsa.py - Point-cloud conditioner → Michelangelo encoder: loads encoder
model_compile/miche_conditioner.py - NSA point-cloud conditioner → Michelangelo encoder: loads encoder
model_nsa_compile/miche_conditioner.py - Inference runner → Mesh postprocessor: processes predictions
main.py - Mesh postprocessor → BFS face tokenizer: undiscretizes tokens
utils/data_process.py - Mesh postprocessor → Generated mesh files: exports meshes
utils/data_process.py