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.
andreasjansson /flux-schnell-redux-layers:f6f727a0
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 andreasjansson/flux-schnell-redux-layers using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"andreasjansson/flux-schnell-redux-layers:f6f727a0b9b86a45eed5497a8a8877858dc9bc8710ea7e044b0c277b4e875e65",
{
input: {
prompt: "A watercolor painting",
megapixels: "1",
num_outputs: 4,
redux_image: "https://replicate.delivery/pbxt/M1lKeCcsHPvzb5wNNsajPvKD4l87ESgJv0a6EmEWzHl9QUdk/0_1.webp",
aspect_ratio: "1:1",
output_format: "webp",
output_quality: 80,
num_inference_steps: 4,
redux_double_layers: [18],
redux_single_layers: [18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]
}
}
);
// 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 andreasjansson/flux-schnell-redux-layers using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"andreasjansson/flux-schnell-redux-layers:f6f727a0b9b86a45eed5497a8a8877858dc9bc8710ea7e044b0c277b4e875e65",
input={
"prompt": "A watercolor painting",
"megapixels": "1",
"num_outputs": 4,
"redux_image": "https://replicate.delivery/pbxt/M1lKeCcsHPvzb5wNNsajPvKD4l87ESgJv0a6EmEWzHl9QUdk/0_1.webp",
"aspect_ratio": "1:1",
"output_format": "webp",
"output_quality": 80,
"num_inference_steps": 4,
"redux_double_layers": [18],
"redux_single_layers": [18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]
}
)
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 andreasjansson/flux-schnell-redux-layers 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": "andreasjansson/flux-schnell-redux-layers:f6f727a0b9b86a45eed5497a8a8877858dc9bc8710ea7e044b0c277b4e875e65",
"input": {
"prompt": "A watercolor painting",
"megapixels": "1",
"num_outputs": 4,
"redux_image": "https://replicate.delivery/pbxt/M1lKeCcsHPvzb5wNNsajPvKD4l87ESgJv0a6EmEWzHl9QUdk/0_1.webp",
"aspect_ratio": "1:1",
"output_format": "webp",
"output_quality": 80,
"num_inference_steps": 4,
"redux_double_layers": [18],
"redux_single_layers": [18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]
}
}' \
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-11-24T09:40:06.088083Z",
"created_at": "2024-11-24T09:40:01.134000Z",
"data_removed": false,
"error": null,
"id": "ezd9x3psxsrmc0ckbp596aqrpm",
"input": {
"prompt": "A watercolor painting",
"megapixels": "1",
"num_outputs": 4,
"redux_image": "https://replicate.delivery/pbxt/M1lKeCcsHPvzb5wNNsajPvKD4l87ESgJv0a6EmEWzHl9QUdk/0_1.webp",
"aspect_ratio": "1:1",
"output_format": "webp",
"output_quality": 80,
"num_inference_steps": 4,
"redux_double_layers": [
18
],
"redux_single_layers": [
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37
]
},
"logs": "running bf16 model, fp8 disabled\nUsing seed: 21492\n0it [00:00, ?it/s]\n1it [00:00, 6.57it/s]\n2it [00:00, 4.78it/s]\n3it [00:00, 4.40it/s]\n4it [00:00, 4.24it/s]\n4it [00:00, 4.45it/s]\n0it [00:00, ?it/s]\n1it [00:00, 3.98it/s]\n2it [00:00, 3.99it/s]\n3it [00:00, 4.00it/s]\n4it [00:01, 4.00it/s]\n4it [00:01, 4.00it/s]\n0it [00:00, ?it/s]\n1it [00:00, 3.99it/s]\n2it [00:00, 3.99it/s]\n3it [00:00, 3.99it/s]\n4it [00:01, 4.00it/s]\n4it [00:01, 3.99it/s]\n0it [00:00, ?it/s]\n1it [00:00, 3.99it/s]\n2it [00:00, 4.00it/s]\n3it [00:00, 3.99it/s]\n4it [00:01, 3.99it/s]\n4it [00:01, 3.99it/s]\nTotal safe images: 4 out of 4",
"metrics": {
"predict_time": 4.946641349,
"total_time": 4.954083
},
"output": [
"https://replicate.delivery/xezq/ShiMfqpnk3Wxe0NgDsErp8mft7cdGS0fbIsbwwZUKCeyOTheE/out-0.webp",
"https://replicate.delivery/xezq/9JMZmtlXFfxPJqeihP6hQj8UccMjfJYJ7FPJo69wOwSszUonA/out-1.webp",
"https://replicate.delivery/xezq/DEShubetRwUnHKzoiuxvjsIcMCseK4DOre7fJkviVH4ZnpQPB/out-2.webp",
"https://replicate.delivery/xezq/lSrNGH5SZE4xJpY3i7WDwcwynzeGYzbFCMnUYCqpUKW7MF6JA/out-3.webp"
],
"started_at": "2024-11-24T09:40:01.141441Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-zr25doetrnzhvc7gef4s27qpf5yr73evqufepcfglaesgqjcd7hq",
"get": "https://api.replicate.com/v1/predictions/ezd9x3psxsrmc0ckbp596aqrpm",
"cancel": "https://api.replicate.com/v1/predictions/ezd9x3psxsrmc0ckbp596aqrpm/cancel"
},
"version": "f6f727a0b9b86a45eed5497a8a8877858dc9bc8710ea7e044b0c277b4e875e65"
}
running bf16 model, fp8 disabled
Using seed: 21492
0it [00:00, ?it/s]
1it [00:00, 6.57it/s]
2it [00:00, 4.78it/s]
3it [00:00, 4.40it/s]
4it [00:00, 4.24it/s]
4it [00:00, 4.45it/s]
0it [00:00, ?it/s]
1it [00:00, 3.98it/s]
2it [00:00, 3.99it/s]
3it [00:00, 4.00it/s]
4it [00:01, 4.00it/s]
4it [00:01, 4.00it/s]
0it [00:00, ?it/s]
1it [00:00, 3.99it/s]
2it [00:00, 3.99it/s]
3it [00:00, 3.99it/s]
4it [00:01, 4.00it/s]
4it [00:01, 3.99it/s]
0it [00:00, ?it/s]
1it [00:00, 3.99it/s]
2it [00:00, 4.00it/s]
3it [00:00, 3.99it/s]
4it [00:01, 3.99it/s]
4it [00:01, 3.99it/s]
Total safe images: 4 out of 4