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.
jyoung105 /sdxl-turbo:521267bc
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 jyoung105/sdxl-turbo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jyoung105/sdxl-turbo:521267bca99a59f8b16b812755603e23b7a5412767568d47c915920eabd9ef90",
{
input: {
eta: 0,
steps: 1,
width: 1024,
height: 1024,
prompt: "A man with hoodie on, illustration",
clip_skip: 0,
num_images: 1,
guidance_scale: 0
}
}
);
// 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 jyoung105/sdxl-turbo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jyoung105/sdxl-turbo:521267bca99a59f8b16b812755603e23b7a5412767568d47c915920eabd9ef90",
input={
"eta": 0,
"steps": 1,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 0
}
)
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 jyoung105/sdxl-turbo 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": "521267bca99a59f8b16b812755603e23b7a5412767568d47c915920eabd9ef90",
"input": {
"eta": 0,
"steps": 1,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 0
}
}' \
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-10-28T18:30:00.337889Z",
"created_at": "2024-10-28T18:27:53.501000Z",
"data_removed": false,
"error": null,
"id": "z7q0r9ke3nrgj0cjthh8fjr71m",
"input": {
"eta": 0,
"steps": 1,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 0
},
"logs": "DEVICE: cuda\nDTYPE: torch.float16\nUsing seed: 59385\nFinish setup in 2.47955322265625e-05 secs.\n[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 3.11it/s]\n100%|██████████| 1/1 [00:00<00:00, 3.11it/s]\nFinish generation in 1.8207151889801025 secs.",
"metrics": {
"predict_time": 2.711686834,
"total_time": 126.836889
},
"output": [
"https://replicate.delivery/pbxt/z6BXepA0WXTfgU8SOrNHAjBFqVZ1IENEoitxO8iN04vnoYrTA/out_0.png"
],
"started_at": "2024-10-28T18:29:57.626203Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/z7q0r9ke3nrgj0cjthh8fjr71m",
"cancel": "https://api.replicate.com/v1/predictions/z7q0r9ke3nrgj0cjthh8fjr71m/cancel"
},
"version": "521267bca99a59f8b16b812755603e23b7a5412767568d47c915920eabd9ef90"
}
DEVICE: cuda
DTYPE: torch.float16
Using seed: 59385
Finish setup in 2.47955322265625e-05 secs.
[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:00<00:00, 3.11it/s]
100%|██████████| 1/1 [00:00<00:00, 3.11it/s]
Finish generation in 1.8207151889801025 secs.