black-forest-labs
/
flux-dev
A 12 billion parameter rectified flow transformer capable of generating images from text descriptions
Blog post: Learn about training with Flux Read the blog
Prediction
black-forest-labs/flux-devOfficial modelIDpab8srw8jhrm20cj1e7s0d8kf4StatusSucceededSourceWebTotal durationCreatedInput
- seed
- 17536
- prompt
- womens street skateboarding final in Paris Olympics 2024
- go_fast
- guidance
- 3.5
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- output_quality
- 80
- prompt_strength
- 0.8
- num_inference_steps
- 28
{ "seed": 17536, "prompt": "womens street skateboarding final in Paris Olympics 2024", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { seed: 17536, prompt: "womens street skateboarding final in Paris Olympics 2024", go_fast: true, guidance: 3.5, num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", output_quality: 80, prompt_strength: 0.8, num_inference_steps: 28 }; const output = await replicate.run("black-forest-labs/flux-dev", { input }); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-dev", input={ "seed": 17536, "prompt": "womens street skateboarding final in Paris Olympics 2024", "go_fast": True, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-dev 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 $'{ "input": { "seed": 17536, "prompt": "womens street skateboarding final in Paris Olympics 2024", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-09-19T18:33:33.744490Z", "created_at": "2024-09-19T18:33:28.980000Z", "data_removed": false, "error": null, "id": "pab8srw8jhrm20cj1e7s0d8kf4", "input": { "seed": 17536, "prompt": "womens street skateboarding final in Paris Olympics 2024", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }, "logs": "running quantized prediction\ngenerating\nUsing seed: 17536\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|▋ | 2/28 [00:00<00:01, 17.40it/s]\n 14%|█▍ | 4/28 [00:00<00:01, 12.68it/s]\n 21%|██▏ | 6/28 [00:00<00:01, 11.66it/s]\n 29%|██▊ | 8/28 [00:00<00:01, 11.23it/s]\n 36%|███▌ | 10/28 [00:00<00:01, 10.96it/s]\n 43%|████▎ | 12/28 [00:01<00:01, 10.67it/s]\n 50%|█████ | 14/28 [00:01<00:01, 10.65it/s]\n 57%|█████▋ | 16/28 [00:01<00:01, 10.65it/s]\n 64%|██████▍ | 18/28 [00:01<00:00, 10.63it/s]\n 71%|███████▏ | 20/28 [00:01<00:00, 10.61it/s]\n 79%|███████▊ | 22/28 [00:02<00:00, 10.53it/s]\n 86%|████████▌ | 24/28 [00:02<00:00, 10.52it/s]\n 93%|█████████▎| 26/28 [00:02<00:00, 10.56it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.57it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.85it/s]\nTotal safe images: 1 out of 1", "metrics": { "image_count": 1, "predict_time": 3.160179952, "total_time": 4.76449 }, "output": [ "https://replicate.delivery/yhqm/LhahE53ikx7ROteqIZ7Bgzc9wIoS76oQU8WLPPeUiCL9BiemA/out-0.webp" ], "started_at": "2024-09-19T18:33:30.584310Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/pab8srw8jhrm20cj1e7s0d8kf4", "cancel": "https://api.replicate.com/v1/predictions/pab8srw8jhrm20cj1e7s0d8kf4/cancel" }, "version": "hidden" }
Generated inrunning quantized prediction generating Using seed: 17536 0%| | 0/28 [00:00<?, ?it/s] 7%|▋ | 2/28 [00:00<00:01, 17.40it/s] 14%|█▍ | 4/28 [00:00<00:01, 12.68it/s] 21%|██▏ | 6/28 [00:00<00:01, 11.66it/s] 29%|██▊ | 8/28 [00:00<00:01, 11.23it/s] 36%|███▌ | 10/28 [00:00<00:01, 10.96it/s] 43%|████▎ | 12/28 [00:01<00:01, 10.67it/s] 50%|█████ | 14/28 [00:01<00:01, 10.65it/s] 57%|█████▋ | 16/28 [00:01<00:01, 10.65it/s] 64%|██████▍ | 18/28 [00:01<00:00, 10.63it/s] 71%|███████▏ | 20/28 [00:01<00:00, 10.61it/s] 79%|███████▊ | 22/28 [00:02<00:00, 10.53it/s] 86%|████████▌ | 24/28 [00:02<00:00, 10.52it/s] 93%|█████████▎| 26/28 [00:02<00:00, 10.56it/s] 100%|██████████| 28/28 [00:02<00:00, 10.57it/s] 100%|██████████| 28/28 [00:02<00:00, 10.85it/s] Total safe images: 1 out of 1
Prediction
black-forest-labs/flux-devOfficial modelIDnq7khvc4xdrm00cj1e6a72njbrStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- a tiny astronaut hatching from an egg on the moon
- go_fast
- guidance
- 3.5
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- output_quality
- 80
- prompt_strength
- 0.8
- num_inference_steps
- 28
{ "prompt": "a tiny astronaut hatching from an egg on the moon", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "a tiny astronaut hatching from an egg on the moon", go_fast: true, guidance: 3.5, num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", output_quality: 80, prompt_strength: 0.8, num_inference_steps: 28 }; const output = await replicate.run("black-forest-labs/flux-dev", { input }); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-dev", input={ "prompt": "a tiny astronaut hatching from an egg on the moon", "go_fast": True, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-dev 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 $'{ "input": { "prompt": "a tiny astronaut hatching from an egg on the moon", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-09-19T18:30:14.596885Z", "created_at": "2024-09-19T18:30:11.435000Z", "data_removed": false, "error": null, "id": "nq7khvc4xdrm00cj1e6a72njbr", "input": { "prompt": "a tiny astronaut hatching from an egg on the moon", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }, "logs": "running quantized prediction\ngenerating\nUsing seed: 60344\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|▋ | 2/28 [00:00<00:01, 17.83it/s]\n 14%|█▍ | 4/28 [00:00<00:01, 12.77it/s]\n 21%|██▏ | 6/28 [00:00<00:01, 11.75it/s]\n 29%|██▊ | 8/28 [00:00<00:01, 11.30it/s]\n 36%|███▌ | 10/28 [00:00<00:01, 11.05it/s]\n 43%|████▎ | 12/28 [00:01<00:01, 10.70it/s]\n 50%|█████ | 14/28 [00:01<00:01, 10.66it/s]\n 57%|█████▋ | 16/28 [00:01<00:01, 10.66it/s]\n 64%|██████▍ | 18/28 [00:01<00:00, 10.65it/s]\n 71%|███████▏ | 20/28 [00:01<00:00, 10.64it/s]\n 79%|███████▊ | 22/28 [00:02<00:00, 10.55it/s]\n 86%|████████▌ | 24/28 [00:02<00:00, 10.54it/s]\n 93%|█████████▎| 26/28 [00:02<00:00, 10.57it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.59it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.88it/s]\nTotal safe images: 1 out of 1", "metrics": { "image_count": 1, "predict_time": 3.15621103, "total_time": 3.161885 }, "output": [ "https://replicate.delivery/yhqm/eGnzS3AVsry6VCfRTZEvI7aIe7Vdp2WzCgzfeWLHhGbz2P0bC/out-0.webp" ], "started_at": "2024-09-19T18:30:11.440674Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/nq7khvc4xdrm00cj1e6a72njbr", "cancel": "https://api.replicate.com/v1/predictions/nq7khvc4xdrm00cj1e6a72njbr/cancel" }, "version": "hidden" }
Generated inrunning quantized prediction generating Using seed: 60344 0%| | 0/28 [00:00<?, ?it/s] 7%|▋ | 2/28 [00:00<00:01, 17.83it/s] 14%|█▍ | 4/28 [00:00<00:01, 12.77it/s] 21%|██▏ | 6/28 [00:00<00:01, 11.75it/s] 29%|██▊ | 8/28 [00:00<00:01, 11.30it/s] 36%|███▌ | 10/28 [00:00<00:01, 11.05it/s] 43%|████▎ | 12/28 [00:01<00:01, 10.70it/s] 50%|█████ | 14/28 [00:01<00:01, 10.66it/s] 57%|█████▋ | 16/28 [00:01<00:01, 10.66it/s] 64%|██████▍ | 18/28 [00:01<00:00, 10.65it/s] 71%|███████▏ | 20/28 [00:01<00:00, 10.64it/s] 79%|███████▊ | 22/28 [00:02<00:00, 10.55it/s] 86%|████████▌ | 24/28 [00:02<00:00, 10.54it/s] 93%|█████████▎| 26/28 [00:02<00:00, 10.57it/s] 100%|██████████| 28/28 [00:02<00:00, 10.59it/s] 100%|██████████| 28/28 [00:02<00:00, 10.88it/s] Total safe images: 1 out of 1
Prediction
black-forest-labs/flux-devOfficial modelIDjbwzpaxs71rm40cj1e5rqq33c0StatusSucceededSourceWebTotal durationCreatedInput
- prompt
- black forest gateau cake spelling out the words "FLUX DEV", tasty, food photography, dynamic shot
- go_fast
- guidance
- 3.5
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- output_quality
- 80
- prompt_strength
- 0.8
- num_inference_steps
- 28
{ "prompt": "black forest gateau cake spelling out the words \"FLUX DEV\", tasty, food photography, dynamic shot", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "black forest gateau cake spelling out the words \"FLUX DEV\", tasty, food photography, dynamic shot", go_fast: true, guidance: 3.5, num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", output_quality: 80, prompt_strength: 0.8, num_inference_steps: 28 }; const output = await replicate.run("black-forest-labs/flux-dev", { input }); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-dev", input={ "prompt": "black forest gateau cake spelling out the words \"FLUX DEV\", tasty, food photography, dynamic shot", "go_fast": True, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-dev 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 $'{ "input": { "prompt": "black forest gateau cake spelling out the words \\"FLUX DEV\\", tasty, food photography, dynamic shot", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-09-19T18:29:22.496556Z", "created_at": "2024-09-19T18:29:19.288000Z", "data_removed": false, "error": null, "id": "jbwzpaxs71rm40cj1e5rqq33c0", "input": { "prompt": "black forest gateau cake spelling out the words \"FLUX DEV\", tasty, food photography, dynamic shot", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }, "logs": "running quantized prediction\ngenerating\nUsing seed: 9337\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|▋ | 2/28 [00:00<00:01, 17.38it/s]\n 14%|█▍ | 4/28 [00:00<00:01, 12.53it/s]\n 21%|██▏ | 6/28 [00:00<00:01, 11.49it/s]\n 29%|██▊ | 8/28 [00:00<00:01, 11.06it/s]\n 36%|███▌ | 10/28 [00:00<00:01, 10.76it/s]\n 43%|████▎ | 12/28 [00:01<00:01, 10.50it/s]\n 50%|█████ | 14/28 [00:01<00:01, 10.46it/s]\n 57%|█████▋ | 16/28 [00:01<00:01, 10.46it/s]\n 64%|██████▍ | 18/28 [00:01<00:00, 10.44it/s]\n 71%|███████▏ | 20/28 [00:01<00:00, 10.40it/s]\n 79%|███████▊ | 22/28 [00:02<00:00, 10.26it/s]\n 86%|████████▌ | 24/28 [00:02<00:00, 10.29it/s]\n 93%|█████████▎| 26/28 [00:02<00:00, 10.34it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.37it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.65it/s]\nTotal safe images: 1 out of 1", "metrics": { "image_count": 1, "predict_time": 3.200260047, "total_time": 3.208556 }, "output": [ "https://replicate.delivery/yhqm/xU3wLlAQcGpZLVQipTVxaZMaL4omk9n7d1suU0byMnngfQvJA/out-0.webp" ], "started_at": "2024-09-19T18:29:19.296296Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jbwzpaxs71rm40cj1e5rqq33c0", "cancel": "https://api.replicate.com/v1/predictions/jbwzpaxs71rm40cj1e5rqq33c0/cancel" }, "version": "hidden" }
Generated inrunning quantized prediction generating Using seed: 9337 0%| | 0/28 [00:00<?, ?it/s] 7%|▋ | 2/28 [00:00<00:01, 17.38it/s] 14%|█▍ | 4/28 [00:00<00:01, 12.53it/s] 21%|██▏ | 6/28 [00:00<00:01, 11.49it/s] 29%|██▊ | 8/28 [00:00<00:01, 11.06it/s] 36%|███▌ | 10/28 [00:00<00:01, 10.76it/s] 43%|████▎ | 12/28 [00:01<00:01, 10.50it/s] 50%|█████ | 14/28 [00:01<00:01, 10.46it/s] 57%|█████▋ | 16/28 [00:01<00:01, 10.46it/s] 64%|██████▍ | 18/28 [00:01<00:00, 10.44it/s] 71%|███████▏ | 20/28 [00:01<00:00, 10.40it/s] 79%|███████▊ | 22/28 [00:02<00:00, 10.26it/s] 86%|████████▌ | 24/28 [00:02<00:00, 10.29it/s] 93%|█████████▎| 26/28 [00:02<00:00, 10.34it/s] 100%|██████████| 28/28 [00:02<00:00, 10.37it/s] 100%|██████████| 28/28 [00:02<00:00, 10.65it/s] Total safe images: 1 out of 1
Prediction
black-forest-labs/flux-devOfficial modelIDgeeqkz2kthrm60cj1jcrgrs43gStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- a cat holding a sign that says hello world
- go_fast
- guidance
- 3.5
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- output_quality
- 80
- prompt_strength
- 0.8
- num_inference_steps
- 28
{ "prompt": "a cat holding a sign that says hello world", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "a cat holding a sign that says hello world", go_fast: true, guidance: 3.5, num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", output_quality: 80, prompt_strength: 0.8, num_inference_steps: 28 }; const output = await replicate.run("black-forest-labs/flux-dev", { input }); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-dev", input={ "prompt": "a cat holding a sign that says hello world", "go_fast": True, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-dev 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 $'{ "input": { "prompt": "a cat holding a sign that says hello world", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-09-19T23:23:53.312553Z", "created_at": "2024-09-19T23:23:48.052000Z", "data_removed": false, "error": null, "id": "geeqkz2kthrm60cj1jcrgrs43g", "input": { "prompt": "a cat holding a sign that says hello world", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }, "logs": "running quantized prediction\ngenerating\nUsing seed: 32291\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|▋ | 2/28 [00:00<00:01, 17.74it/s]\n 14%|█▍ | 4/28 [00:00<00:01, 12.85it/s]\n 21%|██▏ | 6/28 [00:00<00:01, 11.82it/s]\n 29%|██▊ | 8/28 [00:00<00:01, 11.37it/s]\n 36%|███▌ | 10/28 [00:00<00:01, 11.13it/s]\n 43%|████▎ | 12/28 [00:01<00:01, 10.79it/s]\n 50%|█████ | 14/28 [00:01<00:01, 10.76it/s]\n 57%|█████▋ | 16/28 [00:01<00:01, 10.74it/s]\n 64%|██████▍ | 18/28 [00:01<00:00, 10.75it/s]\n 71%|███████▏ | 20/28 [00:01<00:00, 10.74it/s]\n 79%|███████▊ | 22/28 [00:01<00:00, 10.63it/s]\n 86%|████████▌ | 24/28 [00:02<00:00, 10.62it/s]\n 93%|█████████▎| 26/28 [00:02<00:00, 10.65it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.66it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.96it/s]\nTotal safe images: 1 out of 1", "metrics": { "image_count": 1, "predict_time": 3.093486658, "total_time": 5.260553 }, "output": [ "https://replicate.delivery/yhqm/jg3hiwcxfD2IaSemC8KFWrTEfZc55GnDKiKqkkYTncfnIZ6NB/out-0.webp" ], "started_at": "2024-09-19T23:23:50.219066Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/geeqkz2kthrm60cj1jcrgrs43g", "cancel": "https://api.replicate.com/v1/predictions/geeqkz2kthrm60cj1jcrgrs43g/cancel" }, "version": "hidden" }
Generated inrunning quantized prediction generating Using seed: 32291 0%| | 0/28 [00:00<?, ?it/s] 7%|▋ | 2/28 [00:00<00:01, 17.74it/s] 14%|█▍ | 4/28 [00:00<00:01, 12.85it/s] 21%|██▏ | 6/28 [00:00<00:01, 11.82it/s] 29%|██▊ | 8/28 [00:00<00:01, 11.37it/s] 36%|███▌ | 10/28 [00:00<00:01, 11.13it/s] 43%|████▎ | 12/28 [00:01<00:01, 10.79it/s] 50%|█████ | 14/28 [00:01<00:01, 10.76it/s] 57%|█████▋ | 16/28 [00:01<00:01, 10.74it/s] 64%|██████▍ | 18/28 [00:01<00:00, 10.75it/s] 71%|███████▏ | 20/28 [00:01<00:00, 10.74it/s] 79%|███████▊ | 22/28 [00:01<00:00, 10.63it/s] 86%|████████▌ | 24/28 [00:02<00:00, 10.62it/s] 93%|█████████▎| 26/28 [00:02<00:00, 10.65it/s] 100%|██████████| 28/28 [00:02<00:00, 10.66it/s] 100%|██████████| 28/28 [00:02<00:00, 10.96it/s] Total safe images: 1 out of 1
Prediction
black-forest-labs/flux-devOfficial modelIDytx0wmwensrm00cj1jdax25r80StatusSucceededSourceWebTotal durationCreatedInput
- prompt
- Three magical wizards standing on a yellow table, each holding a sign. On the left, a wizard in black robes holds a sign that says ‘AI’; in the middle, a witch in red robes holds a sign that says ‘is’; and on the right, a wizard in blue robes holds a sign that says ‘cool’
- go_fast
- guidance
- 3.5
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- output_quality
- 80
- prompt_strength
- 0.8
- num_inference_steps
- 28
{ "prompt": "Three magical wizards standing on a yellow table, each holding a sign. On the left, a wizard in black robes holds a sign that says ‘AI’; in the middle, a witch in red robes holds a sign that says ‘is’; and on the right, a wizard in blue robes holds a sign that says ‘cool’", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "Three magical wizards standing on a yellow table, each holding a sign. On the left, a wizard in black robes holds a sign that says ‘AI’; in the middle, a witch in red robes holds a sign that says ‘is’; and on the right, a wizard in blue robes holds a sign that says ‘cool’", go_fast: true, guidance: 3.5, num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", output_quality: 80, prompt_strength: 0.8, num_inference_steps: 28 }; const output = await replicate.run("black-forest-labs/flux-dev", { input }); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-dev", input={ "prompt": "Three magical wizards standing on a yellow table, each holding a sign. On the left, a wizard in black robes holds a sign that says ‘AI’; in the middle, a witch in red robes holds a sign that says ‘is’; and on the right, a wizard in blue robes holds a sign that says ‘cool’", "go_fast": True, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-dev 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 $'{ "input": { "prompt": "Three magical wizards standing on a yellow table, each holding a sign. On the left, a wizard in black robes holds a sign that says ‘AI’; in the middle, a witch in red robes holds a sign that says ‘is’; and on the right, a wizard in blue robes holds a sign that says ‘cool’", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-09-19T23:25:11.747278Z", "created_at": "2024-09-19T23:25:08.654000Z", "data_removed": false, "error": null, "id": "ytx0wmwensrm00cj1jdax25r80", "input": { "prompt": "Three magical wizards standing on a yellow table, each holding a sign. On the left, a wizard in black robes holds a sign that says ‘AI’; in the middle, a witch in red robes holds a sign that says ‘is’; and on the right, a wizard in blue robes holds a sign that says ‘cool’", "go_fast": true, "guidance": 3.5, "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 80, "prompt_strength": 0.8, "num_inference_steps": 28 }, "logs": "running quantized prediction\ngenerating\nUsing seed: 46780\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|▋ | 2/28 [00:00<00:01, 18.05it/s]\n 14%|█▍ | 4/28 [00:00<00:01, 12.92it/s]\n 21%|██▏ | 6/28 [00:00<00:01, 11.88it/s]\n 29%|██▊ | 8/28 [00:00<00:01, 11.45it/s]\n 36%|███▌ | 10/28 [00:00<00:01, 11.19it/s]\n 43%|████▎ | 12/28 [00:01<00:01, 10.77it/s]\n 50%|█████ | 14/28 [00:01<00:01, 10.76it/s]\n 57%|█████▋ | 16/28 [00:01<00:01, 10.77it/s]\n 64%|██████▍ | 18/28 [00:01<00:00, 10.79it/s]\n 71%|███████▏ | 20/28 [00:01<00:00, 10.76it/s]\n 79%|███████▊ | 22/28 [00:01<00:00, 10.61it/s]\n 86%|████████▌ | 24/28 [00:02<00:00, 10.62it/s]\n 93%|█████████▎| 26/28 [00:02<00:00, 10.66it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.71it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.99it/s]\nTotal safe images: 1 out of 1", "metrics": { "image_count": 1, "predict_time": 3.084407836, "total_time": 3.093278 }, "output": [ "https://replicate.delivery/yhqm/aC8cKHxl6nqfJ6h6ZANs6cjHGKe8BDrT7FqScrslK1QXTmemA/out-0.webp" ], "started_at": "2024-09-19T23:25:08.662870Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ytx0wmwensrm00cj1jdax25r80", "cancel": "https://api.replicate.com/v1/predictions/ytx0wmwensrm00cj1jdax25r80/cancel" }, "version": "hidden" }
Generated inrunning quantized prediction generating Using seed: 46780 0%| | 0/28 [00:00<?, ?it/s] 7%|▋ | 2/28 [00:00<00:01, 18.05it/s] 14%|█▍ | 4/28 [00:00<00:01, 12.92it/s] 21%|██▏ | 6/28 [00:00<00:01, 11.88it/s] 29%|██▊ | 8/28 [00:00<00:01, 11.45it/s] 36%|███▌ | 10/28 [00:00<00:01, 11.19it/s] 43%|████▎ | 12/28 [00:01<00:01, 10.77it/s] 50%|█████ | 14/28 [00:01<00:01, 10.76it/s] 57%|█████▋ | 16/28 [00:01<00:01, 10.77it/s] 64%|██████▍ | 18/28 [00:01<00:00, 10.79it/s] 71%|███████▏ | 20/28 [00:01<00:00, 10.76it/s] 79%|███████▊ | 22/28 [00:01<00:00, 10.61it/s] 86%|████████▌ | 24/28 [00:02<00:00, 10.62it/s] 93%|█████████▎| 26/28 [00:02<00:00, 10.66it/s] 100%|██████████| 28/28 [00:02<00:00, 10.71it/s] 100%|██████████| 28/28 [00:02<00:00, 10.99it/s] Total safe images: 1 out of 1
Want to make some of these yourself?
Run this model