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/lgm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"camenduru/lgm:d2870893aa115773465a823fe70fd446673604189843f39a99642dd9171e05e2",
{
input: {
seed: 42,
prompt: "a songbird",
input_image: "https://replicate.delivery/pbxt/KN0hQI9pYB3NOpHLqktkkQIblwpXt0IG7qI90n5hEnmV9kvo/bird_rgba.png",
negative_prompt: "ugly, blurry, pixelated obscure, unnatural colors, poor lighting, dull, unclear, cropped, lowres, low quality, artifacts, duplicate"
}
}
);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run camenduru/lgm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"camenduru/lgm:d2870893aa115773465a823fe70fd446673604189843f39a99642dd9171e05e2",
input={
"seed": 42,
"prompt": "a songbird",
"input_image": "https://replicate.delivery/pbxt/KN0hQI9pYB3NOpHLqktkkQIblwpXt0IG7qI90n5hEnmV9kvo/bird_rgba.png",
"negative_prompt": "ugly, blurry, pixelated obscure, unnatural colors, poor lighting, dull, unclear, cropped, lowres, low quality, artifacts, duplicate"
}
)
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/lgm 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": "d2870893aa115773465a823fe70fd446673604189843f39a99642dd9171e05e2",
"input": {
"seed": 42,
"prompt": "a songbird",
"input_image": "https://replicate.delivery/pbxt/KN0hQI9pYB3NOpHLqktkkQIblwpXt0IG7qI90n5hEnmV9kvo/bird_rgba.png",
"negative_prompt": "ugly, blurry, pixelated obscure, unnatural colors, poor lighting, dull, unclear, cropped, lowres, low quality, artifacts, duplicate"
}
}' \
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-02-08T22:14:43.356946Z",
"created_at": "2024-02-08T22:10:43.378888Z",
"data_removed": false,
"error": null,
"id": "jcmtajlb7eqex4as4ic3dpo4xi",
"input": {
"seed": 42,
"prompt": "a songbird",
"input_image": "https://replicate.delivery/pbxt/KN0hQI9pYB3NOpHLqktkkQIblwpXt0IG7qI90n5hEnmV9kvo/bird_rgba.png",
"negative_prompt": "ugly, blurry, pixelated obscure, unnatural colors, poor lighting, dull, unclear, cropped, lowres, low quality, artifacts, duplicate"
},
"logs": "0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:03, 8.91it/s]\n 13%|█▎ | 4/30 [00:00<00:01, 17.00it/s]\n 23%|██▎ | 7/30 [00:00<00:01, 18.69it/s]\n 33%|███▎ | 10/30 [00:00<00:01, 19.76it/s]\n 43%|████▎ | 13/30 [00:00<00:00, 20.31it/s]\n 53%|█████▎ | 16/30 [00:00<00:00, 20.64it/s]\n 63%|██████▎ | 19/30 [00:00<00:00, 20.87it/s]\n 73%|███████▎ | 22/30 [00:01<00:00, 21.00it/s]\n 83%|████████▎ | 25/30 [00:01<00:00, 21.11it/s]\n 93%|█████████▎| 28/30 [00:01<00:00, 21.13it/s]\n100%|██████████| 30/30 [00:01<00:00, 20.29it/s]\n 0%| | 0/180 [00:00<?, ?it/s]\n 1%| | 1/180 [00:00<00:31, 5.70it/s]\n 22%|██▏ | 40/180 [00:00<00:00, 176.49it/s]\n 43%|████▎ | 77/180 [00:00<00:00, 250.29it/s]\n 63%|██████▎ | 114/180 [00:00<00:00, 292.23it/s]\n 82%|████████▏ | 147/180 [00:00<00:00, 298.27it/s]\n100%|██████████| 180/180 [00:00<00:00, 265.13it/s]",
"metrics": {
"predict_time": 19.012171,
"total_time": 239.978058
},
"output": [
"https://replicate.delivery/pbxt/UYQDuTakJJYBPtVUbLA8l7ddav3eozIf8xRle0zlefUQJCmSC/gradio_output.mp4",
"https://replicate.delivery/pbxt/UvKKgNj9mT7pIVHzwerhcjkp5cMH4FS5emPVghk2qyzMRwUSA/gradio_output.ply"
],
"started_at": "2024-02-08T22:14:24.344775Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/jcmtajlb7eqex4as4ic3dpo4xi",
"cancel": "https://api.replicate.com/v1/predictions/jcmtajlb7eqex4as4ic3dpo4xi/cancel"
},
"version": "d2870893aa115773465a823fe70fd446673604189843f39a99642dd9171e05e2"
}
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:03, 8.91it/s]
13%|█▎ | 4/30 [00:00<00:01, 17.00it/s]
23%|██▎ | 7/30 [00:00<00:01, 18.69it/s]
33%|███▎ | 10/30 [00:00<00:01, 19.76it/s]
43%|████▎ | 13/30 [00:00<00:00, 20.31it/s]
53%|█████▎ | 16/30 [00:00<00:00, 20.64it/s]
63%|██████▎ | 19/30 [00:00<00:00, 20.87it/s]
73%|███████▎ | 22/30 [00:01<00:00, 21.00it/s]
83%|████████▎ | 25/30 [00:01<00:00, 21.11it/s]
93%|█████████▎| 28/30 [00:01<00:00, 21.13it/s]
100%|██████████| 30/30 [00:01<00:00, 20.29it/s]
0%| | 0/180 [00:00<?, ?it/s]
1%| | 1/180 [00:00<00:31, 5.70it/s]
22%|██▏ | 40/180 [00:00<00:00, 176.49it/s]
43%|████▎ | 77/180 [00:00<00:00, 250.29it/s]
63%|██████▎ | 114/180 [00:00<00:00, 292.23it/s]
82%|████████▏ | 147/180 [00:00<00:00, 298.27it/s]
100%|██████████| 180/180 [00:00<00:00, 265.13it/s]