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.
lucataco /lcm-ssd-1b:20cc3ee0
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 lucataco/lcm-ssd-1b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/lcm-ssd-1b:20cc3ee02945dee481e386ac2a3212654c3801aa5992ee74c78cf81565f8ff4c",
{
input: {
seed: 13271235,
prompt: "a close-up picture of an old man standing in the rain",
num_outputs: 1,
guidance_scale: 8,
negative_prompt: "",
num_inference_steps: 2
}
}
);
// 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 lucataco/lcm-ssd-1b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/lcm-ssd-1b:20cc3ee02945dee481e386ac2a3212654c3801aa5992ee74c78cf81565f8ff4c",
input={
"seed": 13271235,
"prompt": "a close-up picture of an old man standing in the rain",
"num_outputs": 1,
"guidance_scale": 8,
"negative_prompt": "",
"num_inference_steps": 2
}
)
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 lucataco/lcm-ssd-1b 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": "lucataco/lcm-ssd-1b:20cc3ee02945dee481e386ac2a3212654c3801aa5992ee74c78cf81565f8ff4c",
"input": {
"seed": 13271235,
"prompt": "a close-up picture of an old man standing in the rain",
"num_outputs": 1,
"guidance_scale": 8,
"negative_prompt": "",
"num_inference_steps": 2
}
}' \
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-16T22:08:06.206844Z",
"created_at": "2023-11-16T22:08:04.017975Z",
"data_removed": false,
"error": null,
"id": "jdplu5lb4g6ubdsdz4fzsmnfce",
"input": {
"seed": 13271235,
"prompt": "a close-up picture of an old man standing in the rain",
"num_outputs": 1,
"guidance_scale": 8,
"negative_prompt": "",
"num_inference_steps": 2
},
"logs": "Using seed: 13271235\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/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 12.94it/s]\n100%|██████████| 2/2 [00:00<00:00, 12.92it/s]",
"metrics": {
"predict_time": 2.150383,
"total_time": 2.188869
},
"output": [
"https://replicate.delivery/pbxt/FY58fJZ00UX7RSQaMqSTU6NKw9nXdTEff29a1wAJsT1LmIyjA/out-0.png"
],
"started_at": "2023-11-16T22:08:04.056461Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/jdplu5lb4g6ubdsdz4fzsmnfce",
"cancel": "https://api.replicate.com/v1/predictions/jdplu5lb4g6ubdsdz4fzsmnfce/cancel"
},
"version": "20cc3ee02945dee481e386ac2a3212654c3801aa5992ee74c78cf81565f8ff4c"
}
Using seed: 13271235
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/2 [00:00<?, ?it/s]
100%|██████████| 2/2 [00:00<00:00, 12.94it/s]
100%|██████████| 2/2 [00:00<00:00, 12.92it/s]