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.
dhanushreddy291 /ssd-1b-lcm:83d41b91
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 dhanushreddy291/ssd-1b-lcm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"dhanushreddy291/ssd-1b-lcm:83d41b91c2fe92a7b58beb108f7c6392e151178d53e85512a8a83550e4b50acc",
{
input: {
prompt: "a close-up picture of an old man standing in the forest",
num_outputs: 2,
guidance_scale: 8,
negative_prompt: "",
num_inference_steps: 4
}
}
);
// 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 dhanushreddy291/ssd-1b-lcm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"dhanushreddy291/ssd-1b-lcm:83d41b91c2fe92a7b58beb108f7c6392e151178d53e85512a8a83550e4b50acc",
input={
"prompt": "a close-up picture of an old man standing in the forest",
"num_outputs": 2,
"guidance_scale": 8,
"negative_prompt": "",
"num_inference_steps": 4
}
)
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 dhanushreddy291/ssd-1b-lcm 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": "dhanushreddy291/ssd-1b-lcm:83d41b91c2fe92a7b58beb108f7c6392e151178d53e85512a8a83550e4b50acc",
"input": {
"prompt": "a close-up picture of an old man standing in the forest",
"num_outputs": 2,
"guidance_scale": 8,
"negative_prompt": "",
"num_inference_steps": 4
}
}' \
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": "2023-11-11T14:56:59.693441Z",
"created_at": "2023-11-11T14:51:56.967077Z",
"data_removed": false,
"error": null,
"id": "vdfkhubbqmntbfjddlvkwp3sxa",
"input": {
"prompt": "a close-up picture of an old man standing in the forest",
"num_outputs": 2,
"guidance_scale": 8,
"negative_prompt": "",
"num_inference_steps": 4
},
"logs": "Using seed: 6224263\nThe config attributes {'skip_prk_steps': True} were passed to LCMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:01<00:03, 1.01s/it]\n 50%|█████ | 2/4 [00:01<00:01, 1.44it/s]\n 75%|███████▌ | 3/4 [00:01<00:00, 1.65it/s]\n100%|██████████| 4/4 [00:02<00:00, 1.79it/s]\n100%|██████████| 4/4 [00:02<00:00, 1.62it/s]",
"metrics": {
"predict_time": 10.544043,
"total_time": 302.726364
},
"output": [
"https://replicate.delivery/pbxt/UDzHO3BTtlZWAp8fpJLdeeBCQocdmXVwfSfvJoDibGJWHk6OC/out-0.png",
"https://replicate.delivery/pbxt/zp0YQs0fjb2iGayGhLlYAhr5K0FbKXEWGnJDf2NGuLS7gU3RA/out-1.png"
],
"started_at": "2023-11-11T14:56:49.149398Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/vdfkhubbqmntbfjddlvkwp3sxa",
"cancel": "https://api.replicate.com/v1/predictions/vdfkhubbqmntbfjddlvkwp3sxa/cancel"
},
"version": "83d41b91c2fe92a7b58beb108f7c6392e151178d53e85512a8a83550e4b50acc"
}
Using seed: 6224263
The config attributes {'skip_prk_steps': True} were passed to LCMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
0%| | 0/4 [00:00<?, ?it/s]
25%|██▌ | 1/4 [00:01<00:03, 1.01s/it]
50%|█████ | 2/4 [00:01<00:01, 1.44it/s]
75%|███████▌ | 3/4 [00:01<00:00, 1.65it/s]
100%|██████████| 4/4 [00:02<00:00, 1.79it/s]
100%|██████████| 4/4 [00:02<00:00, 1.62it/s]