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";
import fs from "node:fs";
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 pink car",
input_image: "https://replicate.delivery/pbxt/KN14YLOaJiksLEjNiUuw4IIIEO6GyzG0uBRq1rsnBCHWFa99/replicate-prediction-c63rmnjbucdvy5vpmjhtndgdhm.png",
negative_prompt: "ugly, blurry, pixelated obscure, unnatural colors, poor lighting, dull, unclear, cropped, lowres, low quality, artifacts, duplicate"
}
}
);
// 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/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 pink car",
"input_image": "https://replicate.delivery/pbxt/KN14YLOaJiksLEjNiUuw4IIIEO6GyzG0uBRq1rsnBCHWFa99/replicate-prediction-c63rmnjbucdvy5vpmjhtndgdhm.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": "camenduru/lgm:d2870893aa115773465a823fe70fd446673604189843f39a99642dd9171e05e2",
"input": {
"seed": 42,
"prompt": "a pink car",
"input_image": "https://replicate.delivery/pbxt/KN14YLOaJiksLEjNiUuw4IIIEO6GyzG0uBRq1rsnBCHWFa99/replicate-prediction-c63rmnjbucdvy5vpmjhtndgdhm.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:30:53.585576Z",
"created_at": "2024-02-08T22:28:55.938400Z",
"data_removed": false,
"error": null,
"id": "zg7n2pdbzu3zo4yct7xr7g7qei",
"input": {
"seed": 42,
"prompt": "a pink car",
"input_image": "https://replicate.delivery/pbxt/KN14YLOaJiksLEjNiUuw4IIIEO6GyzG0uBRq1rsnBCHWFa99/replicate-prediction-c63rmnjbucdvy5vpmjhtndgdhm.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.77it/s]\n 13%|█▎ | 4/30 [00:00<00:01, 16.87it/s]\n 23%|██▎ | 7/30 [00:00<00:01, 19.07it/s]\n 33%|███▎ | 10/30 [00:00<00:00, 20.06it/s]\n 43%|████▎ | 13/30 [00:00<00:00, 20.57it/s]\n 53%|█████▎ | 16/30 [00:00<00:00, 20.83it/s]\n 63%|██████▎ | 19/30 [00:00<00:00, 21.01it/s]\n 73%|███████▎ | 22/30 [00:01<00:00, 21.13it/s]\n 83%|████████▎ | 25/30 [00:01<00:00, 21.20it/s]\n 93%|█████████▎| 28/30 [00:01<00:00, 21.22it/s]\n100%|██████████| 30/30 [00:01<00:00, 20.42it/s]\n 0%| | 0/180 [00:00<?, ?it/s]\n 1%| | 1/180 [00:00<00:29, 6.12it/s]\n 19%|█▉ | 34/180 [00:00<00:00, 155.39it/s]\n 37%|███▋ | 67/180 [00:00<00:00, 223.51it/s]\n 56%|█████▌ | 100/180 [00:00<00:00, 260.45it/s]\n 74%|███████▍ | 134/180 [00:00<00:00, 286.54it/s]\n 93%|█████████▎| 168/180 [00:00<00:00, 302.15it/s]\n100%|██████████| 180/180 [00:00<00:00, 253.49it/s]",
"metrics": {
"predict_time": 11.661531,
"total_time": 117.647176
},
"output": [
"https://replicate.delivery/pbxt/aWv659ehhSUnTqEEePCts4mW522VVzffRuRnydWKZ29xBCTJB/gradio_output.mp4",
"https://replicate.delivery/pbxt/hfjpJJ3fFDktFUoejVtMS7FGxz1nEnMPTQeqBNXoBpOxBCTJB/gradio_output.ply"
],
"started_at": "2024-02-08T22:30:41.924045Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/zg7n2pdbzu3zo4yct7xr7g7qei",
"cancel": "https://api.replicate.com/v1/predictions/zg7n2pdbzu3zo4yct7xr7g7qei/cancel"
},
"version": "d2870893aa115773465a823fe70fd446673604189843f39a99642dd9171e05e2"
}
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:03, 8.77it/s]
13%|█▎ | 4/30 [00:00<00:01, 16.87it/s]
23%|██▎ | 7/30 [00:00<00:01, 19.07it/s]
33%|███▎ | 10/30 [00:00<00:00, 20.06it/s]
43%|████▎ | 13/30 [00:00<00:00, 20.57it/s]
53%|█████▎ | 16/30 [00:00<00:00, 20.83it/s]
63%|██████▎ | 19/30 [00:00<00:00, 21.01it/s]
73%|███████▎ | 22/30 [00:01<00:00, 21.13it/s]
83%|████████▎ | 25/30 [00:01<00:00, 21.20it/s]
93%|█████████▎| 28/30 [00:01<00:00, 21.22it/s]
100%|██████████| 30/30 [00:01<00:00, 20.42it/s]
0%| | 0/180 [00:00<?, ?it/s]
1%| | 1/180 [00:00<00:29, 6.12it/s]
19%|█▉ | 34/180 [00:00<00:00, 155.39it/s]
37%|███▋ | 67/180 [00:00<00:00, 223.51it/s]
56%|█████▌ | 100/180 [00:00<00:00, 260.45it/s]
74%|███████▍ | 134/180 [00:00<00:00, 286.54it/s]
93%|█████████▎| 168/180 [00:00<00:00, 302.15it/s]
100%|██████████| 180/180 [00:00<00:00, 253.49it/s]