Spaces:
Running
Running
File size: 4,776 Bytes
e57cd56 d878123 80fcf87 e57cd56 57b14d4 e57cd56 57b14d4 6efa3c8 80fcf87 412eb35 57b14d4 1dc1139 d878123 57b14d4 d878123 57b14d4 80fcf87 2d10208 ab0705a e57cd56 ab0705a 57b14d4 ab0705a 6efa3c8 ab0705a d878123 ab0705a 2d10208 ab0705a d878123 ab0705a d878123 ab0705a 2d10208 ab0705a 2d10208 ab0705a 2d10208 ab0705a 2d10208 ab0705a d878123 ab0705a 412eb35 ab0705a 412eb35 ab0705a d878123 ab0705a d878123 ab0705a 60952d9 ab0705a 60952d9 ab0705a 60952d9 ab0705a 60952d9 ab0705a 1de3951 ab0705a 1de3951 ab0705a 60952d9 ab0705a 60952d9 ab0705a 60952d9 ab0705a 60952d9 ab0705a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | ---
title: Companion Forge
emoji: π€
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 6.2.0
app_file: app.py
pinned: false
license: mit
hf_oauth: true
hf_oauth_expiration_minutes: 480
hf_oauth_scopes:
- jobs
- contribute-repos
models:
- black-forest-labs/FLUX.2-klein-4B
- VAST-AI/AniGen
tags:
- text-to-3d
- image-to-3d
- rigging
- animation
- companion
- game-assets
- hf-jobs
- onnx
- tensorrt
- distillation
---
# Companion Forge v7 Lab β v6.4 production + next-generation L4 training
Create a rigged desktop **Code Pet** from text or an image. The Gradio UI stays on CPU; generation and v7 training jobs are dispatched on demand to **Hugging Face Jobs `l4x1`** (NVIDIA L4 / SM89, 8 vCPU, ~30 GB RAM). GPU jobs terminate after the requested work.
## Stable production generation
The public generation path remains the validated v6.4 runtime until a v7 student passes quality, finite-tensor and rigging gates:
`FLUX.2 Klein TRT` β `DINOv2 TRT + DSINE TRT` β `AniGen SS TRT` β `AniGen SLat TRT` β full custom sparse/topology TensorRT decoder β `Skin TRT` β rigged GLB + skeleton + behavior bundle.
The SLat decoder no longer depends on an ordinary native PyTorch backbone in the normal path. Companion Forge has custom ONNX/TensorRT Plugin V3 operators for:
- `SparseConv3D`
- `SparseWindowAttention`
- `SparseDownsample`
- `SparseUpsample`
- `SparseSubdivide`
- `MeshTopologyExtract`
- `SparseMeshTopologyExtract`
The learned decoder branches/heads, topology extraction and skinning are validated end to end on L4; native checkpoints are lazy fallbacks only.
## V7 Lab
The **V7 Lab** tab exposes an experimental training/optimization stack without replacing stable inference automatically.
### Few-step flow distillation
Both major AniGen flows have a real L4 training path using one shared teacher/student base plus compact LoRA deltas:
- SS Flow: progressive `10 β 4 β 2 β 1`
- SLat Flow: progressive `10 β 4 β 2 β 1`
- velocity KD + endpoint consistency
- MeanFlow-style interval consistency
- later stages merge all previous adapters in order before learning the next delta
Real one-step backward smokes already pass on L4 for both SS and sparse SLat. Stage adapters are ~30 MB rather than multi-gigabyte duplicate checkpoints.
### FP8 + 2:4
The v7 optimization pipeline includes:
- NVIDIA Model Optimizer FP8 calibration/QAT on a CUDA **devel** Job image;
- real calibration tensors captured from private teacher-cache records;
- sensitive geometry/output heads, mesh/topology and normalization paths kept out of aggressive quantization;
- 2:4 pruning on eligible MLP/projection weights;
- TensorRT `SPARSE_WEIGHTS` tactics, with TensorRT free to keep a dense tactic when it benchmarks faster for a specific shape;
- ONNX external-data export and precompiled SM89 TensorRT plans.
### DINOv3, multi-view, symmetry, MoE and caching
Implemented v7 modules include:
- a DINOv3 β exact AniGen `1374 Γ 1024` conditioning bridge and DINOv2 feature-distillation trainer;
- front/left/back/right multi-view fusion with pose Fourier encoding, plus a shape-preserving mean-fusion fallback;
- flow-time reflection/C2/C4 velocity symmetrization and rig bilateral priors;
- Geometry-Inductive MoE experts for `coarse_shape`, `surface_detail`, `limbs`, `head_face`, `skeleton`, `skin`, and `materials`;
- time-aware residual/timestep caching for students with β₯4 sampling steps; caching is bypassed after successful 1β2 step distillation.
The official Meta DINOv3 weights currently require gated Hub access for the signed-in account, so the v7 bridge is ready but production continues to use DINOv2 TensorRT until access is available. MeshFlow is treated as an optional research geometry teacher and is not silently enabled in production.
## Private v7 training data
Companion Forge does **not** automatically collect generated references for training. A reference is added only when the signed-in user explicitly clicks **Add to private v7 cache**.
Each user gets app-created private repositories for:
- `companion-forge-v7-teacher-cache`
- `companion-forge-v7-students`
The lightweight teacher record stores conditioning plus sparse coordinates; random latent noise is regenerated during training. This avoids storing large trajectories and improves training diversity.
## Promotion policy
A v7 student is not promoted because it is merely faster. Promotion requires:
1. finite tensors through the full pipeline;
2. no unexpected PyTorch fallback;
3. valid mesh, skeleton and skinning;
4. geometry/rig metrics against the v6.4 teacher;
5. an L4 end-to-end benchmark;
6. successful ONNX/TensorRT export and runtime validation.
Until then, the v6.4 generation runtime remains the rollback-safe production path.
|