Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run camenduru/grm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"camenduru/grm:8c489b23ddc6a9b0484f8b6f55f9b24fd792a84a6715d02f7e3ec63325bae4f0",
{
input: {
seed: 42,
model: "Zero123++ v1.2",
fuse_mesh: true,
input_image: "https://replicate.delivery/pbxt/Kf2CVHoKhZ2rVCZ8B1R9fZiUsROyt5jl3wTBkf6VdSgw1Aaq/panda.png"
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run camenduru/grm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"camenduru/grm:8c489b23ddc6a9b0484f8b6f55f9b24fd792a84a6715d02f7e3ec63325bae4f0",
input={
"seed": 42,
"model": "Zero123++ v1.2",
"fuse_mesh": True,
"input_image": "https://replicate.delivery/pbxt/Kf2CVHoKhZ2rVCZ8B1R9fZiUsROyt5jl3wTBkf6VdSgw1Aaq/panda.png"
}
)
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=<paste-your-token-here>
Find your API token in your account settings.
Run camenduru/grm 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": "camenduru/grm:8c489b23ddc6a9b0484f8b6f55f9b24fd792a84a6715d02f7e3ec63325bae4f0",
"input": {
"seed": 42,
"model": "Zero123++ v1.2",
"fuse_mesh": true,
"input_image": "https://replicate.delivery/pbxt/Kf2CVHoKhZ2rVCZ8B1R9fZiUsROyt5jl3wTBkf6VdSgw1Aaq/panda.png"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-03-30T16:50:50.636997Z",
"created_at": "2024-03-30T16:45:50.593557Z",
"data_removed": false,
"error": null,
"id": "o3rwugzbhwu64rem6jh6nhux4y",
"input": {
"seed": 42,
"model": "Zero123++ v1.2",
"fuse_mesh": true,
"input_image": "https://replicate.delivery/pbxt/Kf2CVHoKhZ2rVCZ8B1R9fZiUsROyt5jl3wTBkf6VdSgw1Aaq/panda.png"
},
"logs": "Running image-to-3d with seed 42...\n/usr/local/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py:268: FutureWarning: `_encode_prompt()` is deprecated and it will be removed in a future version. Use `encode_prompt()` instead. Also, be aware that the output format changed from a concatenated tensor to a tuple.\ndeprecate(\"_encode_prompt()\", \"1.0.0\", deprecation_message, standard_warn=False)\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:08, 3.39it/s]\n 7%|▋ | 2/30 [00:00<00:05, 5.39it/s]\n 13%|█▎ | 4/30 [00:00<00:03, 7.77it/s]\n 20%|██ | 6/30 [00:00<00:02, 8.50it/s]\n 27%|██▋ | 8/30 [00:00<00:02, 9.17it/s]\n 33%|███▎ | 10/30 [00:01<00:02, 9.56it/s]\n 40%|████ | 12/30 [00:01<00:01, 9.79it/s]\n 47%|████▋ | 14/30 [00:01<00:01, 9.95it/s]\n 53%|█████▎ | 16/30 [00:01<00:01, 9.55it/s]\n 60%|██████ | 18/30 [00:01<00:01, 9.80it/s]\n 63%|██████▎ | 19/30 [00:02<00:01, 9.80it/s]\n 70%|███████ | 21/30 [00:02<00:00, 9.94it/s]\n 77%|███████▋ | 23/30 [00:02<00:00, 10.01it/s]\n 83%|████████▎ | 25/30 [00:02<00:00, 10.07it/s]\n 90%|█████████ | 27/30 [00:02<00:00, 9.77it/s]\n 97%|█████████▋| 29/30 [00:03<00:00, 9.92it/s]\n100%|██████████| 30/30 [00:03<00:00, 9.37it/s]\n/usr/local/lib/python3.10/site-packages/torch/utils/checkpoint.py:460: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.\nwarnings.warn(\n/usr/local/lib/python3.10/site-packages/torch/utils/checkpoint.py:90: UserWarning: None of the inputs have requires_grad=True. Gradients will be None\nwarnings.warn(\n/usr/local/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.)\nreturn _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\nIntegrate images into the TSDF volume.\n 0%| | 0/200 [00:00<?, ?it/s]\n 1%| | 2/200 [00:00<00:14, 13.97it/s]\n 4%|▎ | 7/200 [00:00<00:06, 31.08it/s]/content/GRM/webui/runner.py:233: RuntimeWarning: invalid value encountered in arcsin\ncam_elev = np.rad2deg(np.arcsin(cam_pos[2]))\n 6%|▌ | 11/200 [00:00<00:07, 23.92it/s]\n 8%|▊ | 16/200 [00:00<00:07, 25.92it/s]\n 10%|▉ | 19/200 [00:00<00:07, 24.66it/s]\n 11%|█ | 22/200 [00:00<00:08, 22.01it/s]\n 12%|█▎ | 25/200 [00:01<00:07, 22.84it/s]\n 15%|█▌ | 30/200 [00:01<00:06, 25.17it/s]\n 16%|█▋ | 33/200 [00:01<00:06, 25.28it/s]\n 18%|█▊ | 37/200 [00:01<00:05, 27.75it/s]\n 20%|██ | 40/200 [00:01<00:05, 27.89it/s]\n 22%|██▏ | 43/200 [00:01<00:06, 24.20it/s]\n 23%|██▎ | 46/200 [00:01<00:06, 24.30it/s]\n 25%|██▌ | 50/200 [00:02<00:06, 24.30it/s]\n 26%|██▋ | 53/200 [00:02<00:06, 24.09it/s]\n 28%|██▊ | 56/200 [00:02<00:05, 24.26it/s]\n 30%|██▉ | 59/200 [00:02<00:06, 22.24it/s]\n 32%|███▏ | 63/200 [00:02<00:05, 25.67it/s]\n 33%|███▎ | 66/200 [00:02<00:05, 26.17it/s]\n 35%|███▌ | 70/200 [00:02<00:04, 28.73it/s]\n 37%|███▋ | 74/200 [00:02<00:04, 27.73it/s]\n 38%|███▊ | 77/200 [00:03<00:04, 27.82it/s]\n 40%|████ | 80/200 [00:03<00:04, 27.97it/s]\n 42%|████▏ | 83/200 [00:03<00:04, 27.62it/s]\n 43%|████▎ | 86/200 [00:03<00:04, 27.67it/s]\n 44%|████▍ | 89/200 [00:03<00:03, 27.86it/s]\n 46%|████▋ | 93/200 [00:03<00:03, 30.17it/s]\n 48%|████▊ | 97/200 [00:03<00:03, 29.12it/s]\n 50%|█████ | 100/200 [00:03<00:03, 28.70it/s]\n 52%|█████▏ | 104/200 [00:03<00:03, 31.47it/s]\n 54%|█████▍ | 108/200 [00:04<00:02, 31.12it/s]\n 56%|█████▌ | 112/200 [00:04<00:03, 27.76it/s]\n 58%|█████▊ | 116/200 [00:04<00:02, 29.96it/s]\n 60%|██████ | 120/200 [00:04<00:02, 27.58it/s]\n 62%|██████▏ | 123/200 [00:04<00:02, 27.34it/s]\n 64%|██████▎ | 127/200 [00:04<00:02, 29.93it/s]\n 66%|██████▌ | 131/200 [00:04<00:02, 31.97it/s]\n 68%|██████▊ | 135/200 [00:05<00:02, 28.57it/s]\n 70%|██████▉ | 139/200 [00:05<00:02, 30.50it/s]\n 72%|███████▏ | 143/200 [00:05<00:01, 30.57it/s]\n 74%|███████▎ | 147/200 [00:05<00:01, 27.26it/s]\n 76%|███████▌ | 151/200 [00:05<00:01, 29.56it/s]\n 78%|███████▊ | 155/200 [00:05<00:01, 26.93it/s]\n 80%|███████▉ | 159/200 [00:05<00:01, 29.35it/s]\n 82%|████████▏ | 163/200 [00:06<00:01, 26.59it/s]\n 83%|████████▎ | 166/200 [00:06<00:01, 26.97it/s]\n 84%|████████▍ | 169/200 [00:06<00:01, 26.81it/s]\n 87%|████████▋ | 174/200 [00:06<00:00, 31.68it/s]\n 89%|████████▉ | 178/200 [00:06<00:00, 28.25it/s]\n 91%|█████████ | 182/200 [00:06<00:00, 30.39it/s]\n 94%|█████████▎| 187/200 [00:06<00:00, 34.49it/s]\n 96%|█████████▌| 191/200 [00:06<00:00, 35.35it/s]\n 98%|█████████▊| 196/200 [00:06<00:00, 38.66it/s]\n100%|██████████| 200/200 [00:07<00:00, 28.37it/s]\nExtract a triangle mesh from the volume and export it.\n[Open3D DEBUG] [ClusterConnectedTriangles] Compute triangle adjacency\n[Open3D DEBUG] [ClusterConnectedTriangles] Done computing triangle adjacency\n[Open3D DEBUG] [ClusterConnectedTriangles] Done clustering, #clusters=31665\n[Mesh loading] v: torch.Size([74481, 3]), f: torch.Size([148655, 3])\n[Mesh loading] vn: torch.Size([74481, 3]), fn: torch.Size([148655, 3])\n/content/GRM/webui/base_mesh.py:350: UserWarning: Using torch.cross without specifying the dim arg is deprecated.\nPlease either pass the dim explicitly or simply use torch.linalg.cross.\nThe default value of dim will change to agree with that of linalg.cross in a future release. (Triggered internally at ../aten/src/ATen/native/Cross.cpp:63.)\nface_normals = torch.cross(v1 - v0, v2 - v0)\ntensor(0.2745, device='cuda:0') tensor(0.7739, device='cuda:0')",
"metrics": {
"predict_time": 34.091535,
"total_time": 300.04344
},
"output": [
"https://replicate.delivery/pbxt/pkdZKckh8gZcBBu1Iz9EeJtlNBKfMRW1XPQWDdcsphGpTfKlA/gs.mp4",
"https://replicate.delivery/pbxt/koApD8dcM8K2NB929Of3atPPKUrIR7dwilgXk1sQosa1pvSJA/mesh.glb",
"https://replicate.delivery/pbxt/leb61P8krIUjXKD0QpRS99fdQMbqmBEIvvUSNf1zGIfoO9VKB/gs_vis.ply",
"https://replicate.delivery/pbxt/Nnkn1PFP2TqGIdszMJUMlt2Ls12k1DkLESCpobdyydt60XpE/gs.ply"
],
"started_at": "2024-03-30T16:50:16.545462Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/o3rwugzbhwu64rem6jh6nhux4y",
"cancel": "https://api.replicate.com/v1/predictions/o3rwugzbhwu64rem6jh6nhux4y/cancel"
},
"version": "8c489b23ddc6a9b0484f8b6f55f9b24fd792a84a6715d02f7e3ec63325bae4f0"
}
Running image-to-3d with seed 42...
/usr/local/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py:268: FutureWarning: `_encode_prompt()` is deprecated and it will be removed in a future version. Use `encode_prompt()` instead. Also, be aware that the output format changed from a concatenated tensor to a tuple.
deprecate("_encode_prompt()", "1.0.0", deprecation_message, standard_warn=False)
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:08, 3.39it/s]
7%|▋ | 2/30 [00:00<00:05, 5.39it/s]
13%|█▎ | 4/30 [00:00<00:03, 7.77it/s]
20%|██ | 6/30 [00:00<00:02, 8.50it/s]
27%|██▋ | 8/30 [00:00<00:02, 9.17it/s]
33%|███▎ | 10/30 [00:01<00:02, 9.56it/s]
40%|████ | 12/30 [00:01<00:01, 9.79it/s]
47%|████▋ | 14/30 [00:01<00:01, 9.95it/s]
53%|█████▎ | 16/30 [00:01<00:01, 9.55it/s]
60%|██████ | 18/30 [00:01<00:01, 9.80it/s]
63%|██████▎ | 19/30 [00:02<00:01, 9.80it/s]
70%|███████ | 21/30 [00:02<00:00, 9.94it/s]
77%|███████▋ | 23/30 [00:02<00:00, 10.01it/s]
83%|████████▎ | 25/30 [00:02<00:00, 10.07it/s]
90%|█████████ | 27/30 [00:02<00:00, 9.77it/s]
97%|█████████▋| 29/30 [00:03<00:00, 9.92it/s]
100%|██████████| 30/30 [00:03<00:00, 9.37it/s]
/usr/local/lib/python3.10/site-packages/torch/utils/checkpoint.py:460: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.
warnings.warn(
/usr/local/lib/python3.10/site-packages/torch/utils/checkpoint.py:90: UserWarning: None of the inputs have requires_grad=True. Gradients will be None
warnings.warn(
/usr/local/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Integrate images into the TSDF volume.
0%| | 0/200 [00:00<?, ?it/s]
1%| | 2/200 [00:00<00:14, 13.97it/s]
4%|▎ | 7/200 [00:00<00:06, 31.08it/s]/content/GRM/webui/runner.py:233: RuntimeWarning: invalid value encountered in arcsin
cam_elev = np.rad2deg(np.arcsin(cam_pos[2]))
6%|▌ | 11/200 [00:00<00:07, 23.92it/s]
8%|▊ | 16/200 [00:00<00:07, 25.92it/s]
10%|▉ | 19/200 [00:00<00:07, 24.66it/s]
11%|█ | 22/200 [00:00<00:08, 22.01it/s]
12%|█▎ | 25/200 [00:01<00:07, 22.84it/s]
15%|█▌ | 30/200 [00:01<00:06, 25.17it/s]
16%|█▋ | 33/200 [00:01<00:06, 25.28it/s]
18%|█▊ | 37/200 [00:01<00:05, 27.75it/s]
20%|██ | 40/200 [00:01<00:05, 27.89it/s]
22%|██▏ | 43/200 [00:01<00:06, 24.20it/s]
23%|██▎ | 46/200 [00:01<00:06, 24.30it/s]
25%|██▌ | 50/200 [00:02<00:06, 24.30it/s]
26%|██▋ | 53/200 [00:02<00:06, 24.09it/s]
28%|██▊ | 56/200 [00:02<00:05, 24.26it/s]
30%|██▉ | 59/200 [00:02<00:06, 22.24it/s]
32%|███▏ | 63/200 [00:02<00:05, 25.67it/s]
33%|███▎ | 66/200 [00:02<00:05, 26.17it/s]
35%|███▌ | 70/200 [00:02<00:04, 28.73it/s]
37%|███▋ | 74/200 [00:02<00:04, 27.73it/s]
38%|███▊ | 77/200 [00:03<00:04, 27.82it/s]
40%|████ | 80/200 [00:03<00:04, 27.97it/s]
42%|████▏ | 83/200 [00:03<00:04, 27.62it/s]
43%|████▎ | 86/200 [00:03<00:04, 27.67it/s]
44%|████▍ | 89/200 [00:03<00:03, 27.86it/s]
46%|████▋ | 93/200 [00:03<00:03, 30.17it/s]
48%|████▊ | 97/200 [00:03<00:03, 29.12it/s]
50%|█████ | 100/200 [00:03<00:03, 28.70it/s]
52%|█████▏ | 104/200 [00:03<00:03, 31.47it/s]
54%|█████▍ | 108/200 [00:04<00:02, 31.12it/s]
56%|█████▌ | 112/200 [00:04<00:03, 27.76it/s]
58%|█████▊ | 116/200 [00:04<00:02, 29.96it/s]
60%|██████ | 120/200 [00:04<00:02, 27.58it/s]
62%|██████▏ | 123/200 [00:04<00:02, 27.34it/s]
64%|██████▎ | 127/200 [00:04<00:02, 29.93it/s]
66%|██████▌ | 131/200 [00:04<00:02, 31.97it/s]
68%|██████▊ | 135/200 [00:05<00:02, 28.57it/s]
70%|██████▉ | 139/200 [00:05<00:02, 30.50it/s]
72%|███████▏ | 143/200 [00:05<00:01, 30.57it/s]
74%|███████▎ | 147/200 [00:05<00:01, 27.26it/s]
76%|███████▌ | 151/200 [00:05<00:01, 29.56it/s]
78%|███████▊ | 155/200 [00:05<00:01, 26.93it/s]
80%|███████▉ | 159/200 [00:05<00:01, 29.35it/s]
82%|████████▏ | 163/200 [00:06<00:01, 26.59it/s]
83%|████████▎ | 166/200 [00:06<00:01, 26.97it/s]
84%|████████▍ | 169/200 [00:06<00:01, 26.81it/s]
87%|████████▋ | 174/200 [00:06<00:00, 31.68it/s]
89%|████████▉ | 178/200 [00:06<00:00, 28.25it/s]
91%|█████████ | 182/200 [00:06<00:00, 30.39it/s]
94%|█████████▎| 187/200 [00:06<00:00, 34.49it/s]
96%|█████████▌| 191/200 [00:06<00:00, 35.35it/s]
98%|█████████▊| 196/200 [00:06<00:00, 38.66it/s]
100%|██████████| 200/200 [00:07<00:00, 28.37it/s]
Extract a triangle mesh from the volume and export it.
[Open3D DEBUG] [ClusterConnectedTriangles] Compute triangle adjacency
[Open3D DEBUG] [ClusterConnectedTriangles] Done computing triangle adjacency
[Open3D DEBUG] [ClusterConnectedTriangles] Done clustering, #clusters=31665
[Mesh loading] v: torch.Size([74481, 3]), f: torch.Size([148655, 3])
[Mesh loading] vn: torch.Size([74481, 3]), fn: torch.Size([148655, 3])
/content/GRM/webui/base_mesh.py:350: UserWarning: Using torch.cross without specifying the dim arg is deprecated.
Please either pass the dim explicitly or simply use torch.linalg.cross.
The default value of dim will change to agree with that of linalg.cross in a future release. (Triggered internally at ../aten/src/ATen/native/Cross.cpp:63.)
face_normals = torch.cross(v1 - v0, v2 - v0)
tensor(0.2745, device='cuda:0') tensor(0.7739, device='cuda:0')