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 /flux.1-turbo-alpha:0a1455f6
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 lucataco/flux.1-turbo-alpha using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/flux.1-turbo-alpha:0a1455f62355121add4f2a90e7cc3cbc3343359c2852f321da7660c101047915",
{
input: {
prompt: "A DSLR photo of a shiny VW van that has a cityscape painted on it. A smiling sloth stands on grass in front of the van and is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book",
num_outputs: 1,
aspect_ratio: "1:1",
output_format: "webp",
guidance_scale: 3.5,
output_quality: 80,
num_inference_steps: 8
}
}
);
// 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/flux.1-turbo-alpha using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/flux.1-turbo-alpha:0a1455f62355121add4f2a90e7cc3cbc3343359c2852f321da7660c101047915",
input={
"prompt": "A DSLR photo of a shiny VW van that has a cityscape painted on it. A smiling sloth stands on grass in front of the van and is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book",
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "webp",
"guidance_scale": 3.5,
"output_quality": 80,
"num_inference_steps": 8
}
)
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/flux.1-turbo-alpha 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/flux.1-turbo-alpha:0a1455f62355121add4f2a90e7cc3cbc3343359c2852f321da7660c101047915",
"input": {
"prompt": "A DSLR photo of a shiny VW van that has a cityscape painted on it. A smiling sloth stands on grass in front of the van and is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book",
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "webp",
"guidance_scale": 3.5,
"output_quality": 80,
"num_inference_steps": 8
}
}' \
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-16T03:45:27.833662Z",
"created_at": "2024-10-16T03:45:23.804000Z",
"data_removed": false,
"error": null,
"id": "cndjm69bbhrj40cjjdq9x49x0r",
"input": {
"prompt": "A DSLR photo of a shiny VW van that has a cityscape painted on it. A smiling sloth stands on grass in front of the van and is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book",
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "webp",
"guidance_scale": 3.5,
"output_quality": 80,
"num_inference_steps": 8
},
"logs": "Using seed: 18200\nPrompt: A DSLR photo of a shiny VW van that has a cityscape painted on it. A smiling sloth stands on grass in front of the van and is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book\ntxt2img mode\n 0%| | 0/8 [00:00<?, ?it/s]\n 12%|█▎ | 1/8 [00:00<00:03, 2.20it/s]\n 25%|██▌ | 2/8 [00:00<00:02, 2.88it/s]\n 38%|███▊ | 3/8 [00:01<00:01, 2.52it/s]\n 50%|█████ | 4/8 [00:01<00:01, 2.38it/s]\n 62%|██████▎ | 5/8 [00:02<00:01, 2.31it/s]\n 75%|███████▌ | 6/8 [00:02<00:00, 2.27it/s]\n 88%|████████▊ | 7/8 [00:03<00:00, 2.24it/s]\n100%|██████████| 8/8 [00:03<00:00, 2.23it/s]\n100%|██████████| 8/8 [00:03<00:00, 2.31it/s]",
"metrics": {
"predict_time": 4.020021036,
"total_time": 4.029662
},
"output": [
"https://replicate.delivery/yhqm/DXZXkqVwq5pIIRBPt0FO4VbajbMDfGM1IgWWTXeLI4zXjOnTA/out-0.webp"
],
"started_at": "2024-10-16T03:45:23.813641Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/cndjm69bbhrj40cjjdq9x49x0r",
"cancel": "https://api.replicate.com/v1/predictions/cndjm69bbhrj40cjjdq9x49x0r/cancel"
},
"version": "0a1455f62355121add4f2a90e7cc3cbc3343359c2852f321da7660c101047915"
}
Using seed: 18200
Prompt: A DSLR photo of a shiny VW van that has a cityscape painted on it. A smiling sloth stands on grass in front of the van and is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book
txt2img mode
0%| | 0/8 [00:00<?, ?it/s]
12%|█▎ | 1/8 [00:00<00:03, 2.20it/s]
25%|██▌ | 2/8 [00:00<00:02, 2.88it/s]
38%|███▊ | 3/8 [00:01<00:01, 2.52it/s]
50%|█████ | 4/8 [00:01<00:01, 2.38it/s]
62%|██████▎ | 5/8 [00:02<00:01, 2.31it/s]
75%|███████▌ | 6/8 [00:02<00:00, 2.27it/s]
88%|████████▊ | 7/8 [00:03<00:00, 2.24it/s]
100%|██████████| 8/8 [00:03<00:00, 2.23it/s]
100%|██████████| 8/8 [00:03<00:00, 2.31it/s]