Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: list RMBG-2.0 as a gated repo for the TRELLIS.2 CUDA lane too (#4684)

[._.]/ Adam Eivy007d9bbbc4c2
diff --git a/server/services/imageTo3d/targets.js b/server/services/imageTo3d/targets.js
index c7b08139da..5259cb4bba 100644
--- a/server/services/imageTo3d/targets.js
+++ b/server/services/imageTo3d/targets.js
@@ -151,14 +151,23 @@ export const IMAGE_TO_3D_TARGETS = Object.freeze({
+ 'upstream setup.sh, which builds flash-attn, nvdiffrast, nvdiffrec and cumesh '
+ 'from source into a new `trellis2` conda environment (~15 GB, and the compile '
+ 'takes a while).',
- // The 4B model conditions on DINOv3, which is gated. Unlike the MPS port this
- // lane does not use RMBG-2.0 (upstream's own example feeds the image straight
- // to the pipeline), so it is deliberately absent here rather than copied over.
+ // Same two gated repos as the MPS port, because this lane loads the same weights:
+ // `microsoft/TRELLIS.2-4B`'s `pipeline.json` names `briaai/RMBG-2.0` as its
+ // `rembg_model`, and `Trellis2ImageTo3DPipeline.run` defaults `preprocess_image=True`
+ // — so feeding it the raw image (which is what both upstream's example and PortOS's
+ // runner do) is precisely what makes it matte the background with RMBG. An earlier
+ // revision claimed this lane "does not use RMBG-2.0" and omitted the repo, which
+ // would leave a CUDA user whose HF account hasn't accepted the RMBG terms staring at
+ // a 401 at pipeline load with nothing naming the repo to go accept.
gatedRepos: Object.freeze([
Object.freeze({
label: 'facebook/dinov3-vitl16-pretrain-lvd1689m',
url: 'https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m',
}),
+ Object.freeze({
+ label: 'briaai/RMBG-2.0',
+ url: 'https://huggingface.co/briaai/RMBG-2.0',
+ }),
]),
}),
pixal3dCuda: Object.freeze({
diff --git a/server/services/imageTo3d/targets.test.js b/server/services/imageTo3d/targets.test.js
index c60664da64..d78a37f608 100644
--- a/server/services/imageTo3d/targets.test.js
+++ b/server/services/imageTo3d/targets.test.js
@@ -61,8 +61,11 @@ describe('image-to-3d target registry', () => {
// Upstream: "An NVIDIA GPU with at least 24GB of memory is necessary" and
// "currently tested only on Linux".
expect(t.requires).toMatchObject({ cuda: true, minVramGb: 24, linuxHost: true });
- // Unlike the MPS port, this lane does not pull RMBG-2.0 — only DINOv3 is gated.
- expect(t.gatedRepos.map((r) => r.label)).toEqual(['facebook/dinov3-vitl16-pretrain-lvd1689m']);
+ // Same gated repos as the MPS port: both lanes load microsoft/TRELLIS.2-4B, whose
+ // pipeline.json names briaai/RMBG-2.0 as the rembg model, and `run()` preprocesses
+ // by default. Omitting it here left a CUDA user's 401 at load time unexplained.
+ expect(t.gatedRepos.map((r) => r.label))
+ .toEqual(['facebook/dinov3-vitl16-pretrain-lvd1689m', 'briaai/RMBG-2.0']);
});
it('leaves trellis2 (MPS) as the default target', () => {