Project Structure
kimodo/
βββ kimodo/ # Main Python package
β βββ model/ # Model architecture and loading
β β βββ kimodo_model.py # Kimodo diffusion model wrapper
β β βββ twostage_denoiser.py # Two-stage denoising architecture
β β βββ backbone.py # Transformer encoder backbone
β β βββ diffusion.py # Diffusion process
β β βββ cfg.py # Classifier-free guidance
β β βββ common.py # Shared model utilities
β β βββ load_model.py # Model loading and registry lookup
β β βββ loading.py # Checkpoint loading utilities
β β βββ registry.py # Model registry (skeleton, checkpoint URLs)
β β βββ text_encoder_api.py # Text encoder API client
β β βββ tmr.py # TMR compatibility
β β βββ llm2vec/ # LLM-based text encoder
β βββ motion_rep/ # Motion representation
β β βββ reps/ # Skeleton-specific motion reps
β β β βββ base.py # Base motion rep types
β β β βββ kimodo_motionrep.py
β β β βββ tmr_motionrep.py
β β βββ conditioning.py # Conditioning (text, constraints)
β β βββ feature_utils.py # Feature extraction
β β βββ feet.py # Foot contact / smoothing
β β βββ smooth_root.py # Smooth root representation
β β βββ stats.py # Normalization statistics
β βββ skeleton/ # Skeleton definitions and kinematics
β β βββ definitions.py # Skeleton topology (joints, chains)
β β βββ registry.py # Skeleton registry
β β βββ base.py # Base skeleton types
β β βββ kinematics.py # Forward kinematics
β β βββ transforms.py # Rotation/transform utilities
β β βββ bvh.py # BVH I/O
β βββ viz/ # Visualization
β β βββ scene.py # 3D scene setup
β β βββ playback.py # Timeline / motion playback
β β βββ viser_utils.py # Viser 3D helpers
β β βββ gui.py # Demo GUI components
β β βββ constraint_ui.py # Constraint editing UI
β β βββ coords.py # Coordinate frames
β β βββ soma_skin.py # SOMA character skinning
β β βββ soma_layer_skin.py # SOMA layer-based skinning
β β βββ smplx_skin.py # SMPL-X skinning
β β βββ g1_rig.py # G1 robot rig
β βββ demo/ # Interactive web demo
β β βββ app.py # Demo entry (Gradio / Viser)
β β βββ config.py # Demo configuration
β β βββ state.py # Application state
β β βββ ui.py # UI layout and callbacks
β β βββ generation.py # Generation pipeline for demo
β β βββ embedding_cache.py # Cached text embeddings
β β βββ queue_manager.py # Request queue for demo
β β βββ __main__.py # Demo run as module
β βββ exports/ # Motion export formats
β β βββ bvh.py # BVH export
β β βββ mujoco.py # MuJoCo export
β β βββ smplx.py # SMPL-X export
β βββ metrics/ # Evaluation metrics
β β βββ base.py # Metric base classes
β β βββ foot_skate.py # Foot skate metric
β β βββ constraints.py # Constraint satisfaction
β β βββ tmr.py # TMR-based metrics
β βββ scripts/ # CLI and helper scripts
β β βββ generate.py # CLI for motion synthesis (kimodo_gen)
β β βββ run_text_encoder_server.py # Text encoder server (kimodo_textencoder)
β β βββ gradio_theme.py # Gradio theme for demo
β β βββ docker-entrypoint.sh # Docker entrypoint for demo
β β βββ lock_requirements.py # Dependency locking
β β βββ mujoco_load.py # MuJoCo scene loading
β β βββ ... # Other helpers
β βββ assets/ # Package data (shipped with package)
β β βββ demo/ # Demo examples and config
β β βββ skeletons/ # Skeleton assets
β βββ constraints.py # Constraint definitions and handling
β βββ geometry.py # Geometric utilities
β βββ postprocess.py # Post-processing (e.g. MotionCorrection)
β βββ meta.py # Motion metadata
β βββ sanitize.py # Input sanitization
β βββ assets.py # Asset path resolution
β βββ tools.py # General utilities
βββ MotionCorrection/ # Optional C++/Python post-processing
β βββ python/motion_correction/ # Python bindings
β βββ src/cpp/ # C++ implementation
βββ docs/ # Documentation (Sphinx)
β βββ source/ # RST/MD sources
βββ assets/ # Repo-level assets (banner, screenshots)
βββ pyproject.toml # Package config and entry points
βββ setup.py # Setuptools entry (if needed)
βββ Dockerfile # Container image for demo
βββ docker-compose.yaml # Docker Compose for demo + text encoder
βββ README.md
Entry points (from pyproject.toml):
kimodo_genβ command-line motion synthesis (kimodo.scripts.generate:main)kimodo_demoβ interactive web demo (kimodo.demo:main)kimodo_textencoderβ text encoder server (kimodo.scripts.run_text_encoder_server:main)