typearray
value typefile
{
"generate_color": true,
"generate_model": true,
"generate_normal": false,
"images": [
"https://replicate.delivery/pbxt/MQmDK1SbOQegtAM5EvfsTGWiZcUVoBxUN55nXyIj8j7NjOPj/tmpv04xqg6e.jpg"
],
"mesh_simplify": 0.9,
"randomize_seed": true,
"return_no_background": false,
"save_gaussian_ply": true,
"seed": 0,
"slat_guidance_strength": 3,
"slat_sampling_steps": 12,
"ss_guidance_strength": 7.5,
"ss_sampling_steps": 38,
"texture_size": 2048
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Q4b**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run firtoz/trellis using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"firtoz/trellis:4876f2a8da1c544772dffa32e8889da4a1bab3a1f5c1937bfcfccb99ae347251",
{
input: {
generate_color: true,
generate_model: true,
generate_normal: false,
images: ["https://replicate.delivery/pbxt/MQmDK1SbOQegtAM5EvfsTGWiZcUVoBxUN55nXyIj8j7NjOPj/tmpv04xqg6e.jpg"],
mesh_simplify: 0.9,
randomize_seed: true,
return_no_background: false,
save_gaussian_ply: true,
seed: 0,
slat_guidance_strength: 3,
slat_sampling_steps: 12,
ss_guidance_strength: 7.5,
ss_sampling_steps: 38,
texture_size: 2048
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Q4b**********************************
This is your API token. Keep it to yourself.
import replicate
Run firtoz/trellis using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"firtoz/trellis:4876f2a8da1c544772dffa32e8889da4a1bab3a1f5c1937bfcfccb99ae347251",
input={
"generate_color": True,
"generate_model": True,
"generate_normal": False,
"images": ["https://replicate.delivery/pbxt/MQmDK1SbOQegtAM5EvfsTGWiZcUVoBxUN55nXyIj8j7NjOPj/tmpv04xqg6e.jpg"],
"mesh_simplify": 0.9,
"randomize_seed": True,
"return_no_background": False,
"save_gaussian_ply": True,
"seed": 0,
"slat_guidance_strength": 3,
"slat_sampling_steps": 12,
"ss_guidance_strength": 7.5,
"ss_sampling_steps": 38,
"texture_size": 2048
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Q4b**********************************
This is your API token. Keep it to yourself.
Run firtoz/trellis using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "firtoz/trellis:4876f2a8da1c544772dffa32e8889da4a1bab3a1f5c1937bfcfccb99ae347251",
"input": {
"generate_color": true,
"generate_model": true,
"generate_normal": false,
"images": ["https://replicate.delivery/pbxt/MQmDK1SbOQegtAM5EvfsTGWiZcUVoBxUN55nXyIj8j7NjOPj/tmpv04xqg6e.jpg"],
"mesh_simplify": 0.9,
"randomize_seed": true,
"return_no_background": false,
"save_gaussian_ply": true,
"seed": 0,
"slat_guidance_strength": 3,
"slat_sampling_steps": 12,
"ss_guidance_strength": 7.5,
"ss_sampling_steps": 38,
"texture_size": 2048
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 3 properties
Use your mouse to zoom and rotate the model
{
"id": "wvnz280mjdrj00cms1qvr6smcg",
"model": "firtoz/trellis",
"version": "4876f2a8da1c544772dffa32e8889da4a1bab3a1f5c1937bfcfccb99ae347251",
"input": {
"generate_color": true,
"generate_model": true,
"generate_normal": false,
"images": [
"https://replicate.delivery/pbxt/MQmDK1SbOQegtAM5EvfsTGWiZcUVoBxUN55nXyIj8j7NjOPj/tmpv04xqg6e.jpg"
],
"mesh_simplify": 0.9,
"randomize_seed": true,
"return_no_background": false,
"save_gaussian_ply": true,
"seed": 0,
"slat_guidance_strength": 3,
"slat_sampling_steps": 12,
"ss_guidance_strength": 7.5,
"ss_sampling_steps": 38,
"texture_size": 2048
},
"logs": "INFO:predict:Loading and preprocessing input images...\nINFO:predict:Using randomized seed: 843466713\nINFO:predict:Running TRELLIS pipeline...\nSampling: 0%| | 0/38 [00:00<?, ?it/s]\nSampling: 3%|▎ | 1/38 [00:00<00:03, 9.60it/s]\nSampling: 8%|▊ | 3/38 [00:00<00:03, 10.72it/s]\nSampling: 13%|█▎ | 5/38 [00:00<00:03, 10.96it/s]\nSampling: 18%|█▊ | 7/38 [00:00<00:02, 11.07it/s]\nSampling: 24%|██▎ | 9/38 [00:00<00:02, 11.14it/s]\nSampling: 29%|██▉ | 11/38 [00:00<00:02, 11.16it/s]\nSampling: 34%|███▍ | 13/38 [00:01<00:02, 11.18it/s]\nSampling: 39%|███▉ | 15/38 [00:01<00:02, 11.20it/s]\nSampling: 45%|████▍ | 17/38 [00:01<00:01, 11.21it/s]\nSampling: 50%|█████ | 19/38 [00:01<00:01, 11.19it/s]\nSampling: 55%|█████▌ | 21/38 [00:01<00:01, 11.20it/s]\nSampling: 61%|██████ | 23/38 [00:02<00:01, 11.20it/s]\nSampling: 66%|██████▌ | 25/38 [00:02<00:01, 11.19it/s]\nSampling: 71%|███████ | 27/38 [00:02<00:00, 11.18it/s]\nSampling: 76%|███████▋ | 29/38 [00:02<00:00, 11.20it/s]\nSampling: 84%|████████▍ | 32/38 [00:02<00:00, 13.95it/s]\nSampling: 92%|█████████▏| 35/38 [00:02<00:00, 16.13it/s]\nSampling: 100%|██████████| 38/38 [00:03<00:00, 17.84it/s]\nSampling: 100%|██████████| 38/38 [00:03<00:00, 12.65it/s]\nSampling: 0%| | 0/12 [00:00<?, ?it/s]\nSampling: 8%|▊ | 1/12 [00:00<00:03, 3.62it/s]\nSampling: 17%|█▋ | 2/12 [00:00<00:02, 4.48it/s]\nSampling: 25%|██▌ | 3/12 [00:00<00:01, 4.86it/s]\nSampling: 33%|███▎ | 4/12 [00:00<00:01, 5.07it/s]\nSampling: 42%|████▏ | 5/12 [00:01<00:01, 5.19it/s]\nSampling: 50%|█████ | 6/12 [00:01<00:01, 5.27it/s]\nSampling: 58%|█████▊ | 7/12 [00:01<00:00, 5.31it/s]\nSampling: 67%|██████▋ | 8/12 [00:01<00:00, 5.35it/s]\nSampling: 75%|███████▌ | 9/12 [00:01<00:00, 5.37it/s]\nSampling: 83%|████████▎ | 10/12 [00:01<00:00, 5.39it/s]\nSampling: 100%|██████████| 12/12 [00:02<00:00, 7.05it/s]\nSampling: 100%|██████████| 12/12 [00:02<00:00, 5.65it/s]\nINFO:predict:TRELLIS pipeline complete!\nINFO:predict:Available output formats: dict_keys(['mesh', 'gaussian'])\nINFO:predict:Starting video rendering...\nINFO:predict:Generating color video from gaussian output...\nRendering: 0it [00:00, ?it/s]\nRendering: 19it [00:00, 188.74it/s]\nRendering: 44it [00:00, 220.80it/s]\nRendering: 69it [00:00, 232.86it/s]\nRendering: 93it [00:00, 232.47it/s]\nRendering: 117it [00:00, 233.95it/s]\nRendering: 120it [00:00, 229.34it/s]\nINFO:predict:Available gaussian render types: ['color', 'depth']\nINFO:predict:Generated color video successfully\nINFO:predict:Video rendering complete!\nINFO:predict:Generating GLB model...\nINFO- Loaded 15894 vertices and 31772 faces.\n0% done\n5% done\n11% done\n17% done\n23% done\n29% done\n35% done\n41% done\n47% done\n52% done\n58% done\n64% done\n70% done\n76% done\n82% done\n88% done\n94% done\n100% done\nWARNING- Some cuts were necessary to cope with non manifold configuration.\nRendering: 0it [00:00, ?it/s]\nRendering: 11it [00:00, 107.00it/s]\nRendering: 23it [00:00, 112.74it/s]\nRendering: 35it [00:00, 115.17it/s]\nRendering: 47it [00:00, 114.72it/s]\nRendering: 59it [00:00, 115.36it/s]\nRendering: 71it [00:00, 115.98it/s]\nRendering: 83it [00:00, 116.86it/s]\nRendering: 96it [00:00, 118.12it/s]\nRendering: 100it [00:00, 116.01it/s]\nINFO:predict:GLB model generation complete!\nINFO:predict:Saving Gaussian point cloud as PLY...\nINFO:predict:Gaussian PLY file saved successfully!\nINFO:predict:Prediction complete! Returning results...",
"output": {
"color_video": "https://replicate.delivery/yhqm/5Mfj6M4OM9RaOScrbwHKzCzeYFVvwpoCD14Trgualu3ftxWoA/output_color.mp4",
"combined_video": null,
"gaussian_ply": "https://replicate.delivery/yhqm/xXtsQbix9ZrqHJ0RSmbnHy8BLGDRTOUv9MhdV9kmHOJwN2CF/output_gaussian.ply",
"model_file": "https://replicate.delivery/yhqm/Qpl4Nz5JL0bwBheNCtYePtph8B4EtHoWoGVkwTnBMdjA3YLUA/output.glb",
"no_background_images": null,
"normal_video": null
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-02-02T20:51:50.547Z",
"started_at": "2025-02-02T20:54:30.706267Z",
"completed_at": "2025-02-02T20:55:28.816645Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/wvnz280mjdrj00cms1qvr6smcg/cancel",
"get": "https://api.replicate.com/v1/predictions/wvnz280mjdrj00cms1qvr6smcg",
"web": "https://replicate.com/p/wvnz280mjdrj00cms1qvr6smcg"
},
"metrics": {
"predict_time": 58.110378347,
"total_time": 218.269645
}
}