bxclib2
/
flux_img2img
A ready to use image to image workflow of flux
- Public
- 53.9K runs
-
L40S
Prediction
bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5IDctkpdnrw3nrgp0ch89hvjbs92rStatusSucceededSourceWebHardwareA40Total durationCreatedInput
{ "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" }
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", { input: { seed: 0, image: "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", steps: 20, denoising: 0.75, scheduler: "simple", sampler_name: "euler", positive_prompt: "anime style" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", input={ "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run bxclib2/flux_img2img 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": "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-08-11T17:03:04.276728Z", "created_at": "2024-08-11T17:01:17.213000Z", "data_removed": false, "error": null, "id": "ctkpdnrw3nrgp0ch89hvjbs92r", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" }, "logs": "13651017568519226869\nRequested to load FluxClipModel_\nLoading 1 new model\nRequested to load AutoencodingEngine\nLoading 1 new model\nRequested to load Flux\nLoading 1 new model\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:12, 1.51it/s]\n 10%|█ | 2/20 [00:01<00:14, 1.21it/s]\n 15%|█▌ | 3/20 [00:02<00:14, 1.14it/s]\n 20%|██ | 4/20 [00:03<00:14, 1.11it/s]\n 25%|██▌ | 5/20 [00:04<00:13, 1.10it/s]\n 30%|███ | 6/20 [00:05<00:12, 1.09it/s]\n 35%|███▌ | 7/20 [00:06<00:12, 1.08it/s]\n 40%|████ | 8/20 [00:07<00:11, 1.08it/s]\n 45%|████▌ | 9/20 [00:08<00:10, 1.07it/s]\n 50%|█████ | 10/20 [00:09<00:09, 1.07it/s]\n 55%|█████▌ | 11/20 [00:10<00:08, 1.07it/s]\n 60%|██████ | 12/20 [00:10<00:07, 1.07it/s]\n 65%|██████▌ | 13/20 [00:11<00:06, 1.07it/s]\n 70%|███████ | 14/20 [00:12<00:05, 1.07it/s]\n 75%|███████▌ | 15/20 [00:13<00:04, 1.07it/s]\n 80%|████████ | 16/20 [00:14<00:03, 1.07it/s]\n 85%|████████▌ | 17/20 [00:15<00:02, 1.07it/s]\n 90%|█████████ | 18/20 [00:16<00:01, 1.07it/s]\n 95%|█████████▌| 19/20 [00:17<00:00, 1.07it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.07it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.08it/s]", "metrics": { "predict_time": 23.234329978, "total_time": 107.063728 }, "output": "https://replicate.delivery/pbxt/fdPekq6sFeKdkobDZaIgdey8OZD43nYBYPw5npcG78ScMoGNB/out.png", "started_at": "2024-08-11T17:02:41.042398Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ctkpdnrw3nrgp0ch89hvjbs92r", "cancel": "https://api.replicate.com/v1/predictions/ctkpdnrw3nrgp0ch89hvjbs92r/cancel" }, "version": "0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5" }
Generated in13651017568519226869 Requested to load FluxClipModel_ Loading 1 new model Requested to load AutoencodingEngine Loading 1 new model Requested to load Flux Loading 1 new model 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:00<00:12, 1.51it/s] 10%|█ | 2/20 [00:01<00:14, 1.21it/s] 15%|█▌ | 3/20 [00:02<00:14, 1.14it/s] 20%|██ | 4/20 [00:03<00:14, 1.11it/s] 25%|██▌ | 5/20 [00:04<00:13, 1.10it/s] 30%|███ | 6/20 [00:05<00:12, 1.09it/s] 35%|███▌ | 7/20 [00:06<00:12, 1.08it/s] 40%|████ | 8/20 [00:07<00:11, 1.08it/s] 45%|████▌ | 9/20 [00:08<00:10, 1.07it/s] 50%|█████ | 10/20 [00:09<00:09, 1.07it/s] 55%|█████▌ | 11/20 [00:10<00:08, 1.07it/s] 60%|██████ | 12/20 [00:10<00:07, 1.07it/s] 65%|██████▌ | 13/20 [00:11<00:06, 1.07it/s] 70%|███████ | 14/20 [00:12<00:05, 1.07it/s] 75%|███████▌ | 15/20 [00:13<00:04, 1.07it/s] 80%|████████ | 16/20 [00:14<00:03, 1.07it/s] 85%|████████▌ | 17/20 [00:15<00:02, 1.07it/s] 90%|█████████ | 18/20 [00:16<00:01, 1.07it/s] 95%|█████████▌| 19/20 [00:17<00:00, 1.07it/s] 100%|██████████| 20/20 [00:18<00:00, 1.07it/s] 100%|██████████| 20/20 [00:18<00:00, 1.08it/s]
Prediction
bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5Input
{ "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" }
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", { input: { seed: 0, image: "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", steps: 20, denoising: 0.75, scheduler: "simple", sampler_name: "euler", positive_prompt: "anime style" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", input={ "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run bxclib2/flux_img2img 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": "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-08-03T10:04:07.835299Z", "created_at": "2024-08-03T09:58:43.499000Z", "data_removed": false, "error": null, "id": "h3z0sejy5drgj0ch2ypvj7k6g4", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "anime style" }, "logs": "1222009109159122718\nRequested to load FluxClipModel_\nLoading 1 new model\nRequested to load AutoencodingEngine\nLoading 1 new model\nRequested to load Flux\nLoading 1 new model\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:11, 1.59it/s]\n 10%|█ | 2/20 [00:01<00:14, 1.24it/s]\n 15%|█▌ | 3/20 [00:02<00:14, 1.16it/s]\n 20%|██ | 4/20 [00:03<00:14, 1.12it/s]\n 25%|██▌ | 5/20 [00:04<00:13, 1.11it/s]\n 30%|███ | 6/20 [00:05<00:12, 1.09it/s]\n 35%|███▌ | 7/20 [00:06<00:11, 1.09it/s]\n 40%|████ | 8/20 [00:07<00:11, 1.08it/s]\n 45%|████▌ | 9/20 [00:08<00:10, 1.08it/s]\n 50%|█████ | 10/20 [00:09<00:09, 1.07it/s]\n 55%|█████▌ | 11/20 [00:09<00:08, 1.07it/s]\n 60%|██████ | 12/20 [00:10<00:07, 1.07it/s]\n 65%|██████▌ | 13/20 [00:11<00:06, 1.07it/s]\n 70%|███████ | 14/20 [00:12<00:05, 1.07it/s]\n 75%|███████▌ | 15/20 [00:13<00:04, 1.07it/s]\n 80%|████████ | 16/20 [00:14<00:03, 1.07it/s]\n 85%|████████▌ | 17/20 [00:15<00:02, 1.07it/s]\n 90%|█████████ | 18/20 [00:16<00:01, 1.07it/s]\n 95%|█████████▌| 19/20 [00:17<00:00, 1.07it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.07it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.09it/s]", "metrics": { "predict_time": 22.895329983, "total_time": 324.336299 }, "output": "https://replicate.delivery/pbxt/vwtFRvPZCEp4H5cwOzpKrqUuIdNRwC1X17vQj4inubilyuzE/out.png", "started_at": "2024-08-03T10:03:44.939969Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/h3z0sejy5drgj0ch2ypvj7k6g4", "cancel": "https://api.replicate.com/v1/predictions/h3z0sejy5drgj0ch2ypvj7k6g4/cancel" }, "version": "0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5" }
Generated in1222009109159122718 Requested to load FluxClipModel_ Loading 1 new model Requested to load AutoencodingEngine Loading 1 new model Requested to load Flux Loading 1 new model 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:00<00:11, 1.59it/s] 10%|█ | 2/20 [00:01<00:14, 1.24it/s] 15%|█▌ | 3/20 [00:02<00:14, 1.16it/s] 20%|██ | 4/20 [00:03<00:14, 1.12it/s] 25%|██▌ | 5/20 [00:04<00:13, 1.11it/s] 30%|███ | 6/20 [00:05<00:12, 1.09it/s] 35%|███▌ | 7/20 [00:06<00:11, 1.09it/s] 40%|████ | 8/20 [00:07<00:11, 1.08it/s] 45%|████▌ | 9/20 [00:08<00:10, 1.08it/s] 50%|█████ | 10/20 [00:09<00:09, 1.07it/s] 55%|█████▌ | 11/20 [00:09<00:08, 1.07it/s] 60%|██████ | 12/20 [00:10<00:07, 1.07it/s] 65%|██████▌ | 13/20 [00:11<00:06, 1.07it/s] 70%|███████ | 14/20 [00:12<00:05, 1.07it/s] 75%|███████▌ | 15/20 [00:13<00:04, 1.07it/s] 80%|████████ | 16/20 [00:14<00:03, 1.07it/s] 85%|████████▌ | 17/20 [00:15<00:02, 1.07it/s] 90%|█████████ | 18/20 [00:16<00:01, 1.07it/s] 95%|█████████▌| 19/20 [00:17<00:00, 1.07it/s] 100%|██████████| 20/20 [00:18<00:00, 1.07it/s] 100%|██████████| 20/20 [00:18<00:00, 1.09it/s]
Prediction
bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5IDtmms6tbfrxrgg0ch33ca9ygatgStatusSucceededSourceWebHardwareA40Total durationCreatedInput
- seed
- 0
- steps
- 20
- denoising
- 0.85
- scheduler
- simple
- sampler_name
- euler
- positive_prompt
- disney cartoon style, 3d
{ "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.85, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney cartoon style, 3d" }
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", { input: { seed: 0, image: "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", steps: 20, denoising: 0.85, scheduler: "simple", sampler_name: "euler", positive_prompt: "disney cartoon style, 3d" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", input={ "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.85, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney cartoon style, 3d" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run bxclib2/flux_img2img 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": "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.85, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney cartoon style, 3d" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-08-03T15:25:57.924483Z", "created_at": "2024-08-03T15:25:23.271000Z", "data_removed": false, "error": null, "id": "tmms6tbfrxrgg0ch33ca9ygatg", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNejsmEhVDfW7iRdapoqzUhIyctYDkubGPAJKSruGY3XokjO/1.png", "steps": 20, "denoising": 0.85, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney cartoon style, 3d" }, "logs": "3509132950525580272\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:11, 1.63it/s]\n 10%|█ | 2/20 [00:01<00:14, 1.24it/s]\n 15%|█▌ | 3/20 [00:02<00:14, 1.15it/s]\n 20%|██ | 4/20 [00:03<00:14, 1.11it/s]\n 25%|██▌ | 5/20 [00:04<00:13, 1.09it/s]\n 30%|███ | 6/20 [00:05<00:12, 1.08it/s]\n 35%|███▌ | 7/20 [00:06<00:12, 1.07it/s]\n 40%|████ | 8/20 [00:07<00:11, 1.07it/s]\n 45%|████▌ | 9/20 [00:08<00:10, 1.06it/s]\n 50%|█████ | 10/20 [00:09<00:09, 1.06it/s]\n 55%|█████▌ | 11/20 [00:10<00:08, 1.06it/s]\n 60%|██████ | 12/20 [00:11<00:07, 1.06it/s]\n 65%|██████▌ | 13/20 [00:11<00:06, 1.06it/s]\n 70%|███████ | 14/20 [00:12<00:05, 1.06it/s]\n 75%|███████▌ | 15/20 [00:13<00:04, 1.06it/s]\n 80%|████████ | 16/20 [00:14<00:03, 1.06it/s]\n 85%|████████▌ | 17/20 [00:15<00:02, 1.06it/s]\n 90%|█████████ | 18/20 [00:16<00:01, 1.06it/s]\n 95%|█████████▌| 19/20 [00:17<00:00, 1.06it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.06it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.08it/s]", "metrics": { "predict_time": 20.348580908, "total_time": 34.653483 }, "output": "https://replicate.delivery/pbxt/fCW2zC7Bt90ua6PfjQ9NMK1e2iBWWXeR6HyOb1bZC7HVgf3ZC/out.png", "started_at": "2024-08-03T15:25:37.575902Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tmms6tbfrxrgg0ch33ca9ygatg", "cancel": "https://api.replicate.com/v1/predictions/tmms6tbfrxrgg0ch33ca9ygatg/cancel" }, "version": "0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5" }
Generated in3509132950525580272 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:00<00:11, 1.63it/s] 10%|█ | 2/20 [00:01<00:14, 1.24it/s] 15%|█▌ | 3/20 [00:02<00:14, 1.15it/s] 20%|██ | 4/20 [00:03<00:14, 1.11it/s] 25%|██▌ | 5/20 [00:04<00:13, 1.09it/s] 30%|███ | 6/20 [00:05<00:12, 1.08it/s] 35%|███▌ | 7/20 [00:06<00:12, 1.07it/s] 40%|████ | 8/20 [00:07<00:11, 1.07it/s] 45%|████▌ | 9/20 [00:08<00:10, 1.06it/s] 50%|█████ | 10/20 [00:09<00:09, 1.06it/s] 55%|█████▌ | 11/20 [00:10<00:08, 1.06it/s] 60%|██████ | 12/20 [00:11<00:07, 1.06it/s] 65%|██████▌ | 13/20 [00:11<00:06, 1.06it/s] 70%|███████ | 14/20 [00:12<00:05, 1.06it/s] 75%|███████▌ | 15/20 [00:13<00:04, 1.06it/s] 80%|████████ | 16/20 [00:14<00:03, 1.06it/s] 85%|████████▌ | 17/20 [00:15<00:02, 1.06it/s] 90%|█████████ | 18/20 [00:16<00:01, 1.06it/s] 95%|█████████▌| 19/20 [00:17<00:00, 1.06it/s] 100%|██████████| 20/20 [00:18<00:00, 1.06it/s] 100%|██████████| 20/20 [00:18<00:00, 1.08it/s]
Prediction
bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5ID62csz5kschrgm0ch33r9pg47zwStatusSucceededSourceWebHardwareA40Total durationCreatedInput
{ "seed": 0, "image": "https://replicate.delivery/pbxt/LNkI6j04QLGDoorrdb1xBa5NgIjcsoDMVbcD808a1RN14zmX/download.jpeg", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney 3d, a man" }
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", { input: { seed: 0, image: "https://replicate.delivery/pbxt/LNkI6j04QLGDoorrdb1xBa5NgIjcsoDMVbcD808a1RN14zmX/download.jpeg", steps: 20, denoising: 0.75, scheduler: "simple", sampler_name: "euler", positive_prompt: "disney 3d, a man" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
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 bxclib2/flux_img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", input={ "seed": 0, "image": "https://replicate.delivery/pbxt/LNkI6j04QLGDoorrdb1xBa5NgIjcsoDMVbcD808a1RN14zmX/download.jpeg", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney 3d, a man" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run bxclib2/flux_img2img 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": "bxclib2/flux_img2img:0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNkI6j04QLGDoorrdb1xBa5NgIjcsoDMVbcD808a1RN14zmX/download.jpeg", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney 3d, a man" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-08-03T15:52:00.087212Z", "created_at": "2024-08-03T15:51:38.596000Z", "data_removed": false, "error": null, "id": "62csz5kschrgm0ch33r9pg47zw", "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/LNkI6j04QLGDoorrdb1xBa5NgIjcsoDMVbcD808a1RN14zmX/download.jpeg", "steps": 20, "denoising": 0.75, "scheduler": "simple", "sampler_name": "euler", "positive_prompt": "disney 3d, a man" }, "logs": "3463109636160754820\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:11, 1.64it/s]\n 10%|█ | 2/20 [00:01<00:14, 1.25it/s]\n 15%|█▌ | 3/20 [00:02<00:14, 1.16it/s]\n 20%|██ | 4/20 [00:03<00:14, 1.12it/s]\n 25%|██▌ | 5/20 [00:04<00:13, 1.10it/s]\n 30%|███ | 6/20 [00:05<00:12, 1.09it/s]\n 35%|███▌ | 7/20 [00:06<00:12, 1.08it/s]\n 40%|████ | 8/20 [00:07<00:11, 1.08it/s]\n 45%|████▌ | 9/20 [00:08<00:10, 1.07it/s]\n 50%|█████ | 10/20 [00:09<00:09, 1.07it/s]\n 55%|█████▌ | 11/20 [00:09<00:08, 1.07it/s]\n 60%|██████ | 12/20 [00:10<00:07, 1.07it/s]\n 65%|██████▌ | 13/20 [00:11<00:06, 1.07it/s]\n 70%|███████ | 14/20 [00:12<00:05, 1.07it/s]\n 75%|███████▌ | 15/20 [00:13<00:04, 1.07it/s]\n 80%|████████ | 16/20 [00:14<00:03, 1.07it/s]\n 85%|████████▌ | 17/20 [00:15<00:02, 1.07it/s]\n 90%|█████████ | 18/20 [00:16<00:01, 1.07it/s]\n 95%|█████████▌| 19/20 [00:17<00:00, 1.06it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.06it/s]\n100%|██████████| 20/20 [00:18<00:00, 1.09it/s]", "metrics": { "predict_time": 21.395401366, "total_time": 21.491212 }, "output": "https://replicate.delivery/pbxt/727cSg3lKkImHtae8VIWDExmeMgTbnx3sYVhCliz5KHegAeMB/out.png", "started_at": "2024-08-03T15:51:38.691810Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/62csz5kschrgm0ch33r9pg47zw", "cancel": "https://api.replicate.com/v1/predictions/62csz5kschrgm0ch33r9pg47zw/cancel" }, "version": "0ce45202d83c6bd379dfe58f4c0c41e6cadf93ebbd9d938cc63cc0f2fcb729a5" }
Generated in3463109636160754820 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:00<00:11, 1.64it/s] 10%|█ | 2/20 [00:01<00:14, 1.25it/s] 15%|█▌ | 3/20 [00:02<00:14, 1.16it/s] 20%|██ | 4/20 [00:03<00:14, 1.12it/s] 25%|██▌ | 5/20 [00:04<00:13, 1.10it/s] 30%|███ | 6/20 [00:05<00:12, 1.09it/s] 35%|███▌ | 7/20 [00:06<00:12, 1.08it/s] 40%|████ | 8/20 [00:07<00:11, 1.08it/s] 45%|████▌ | 9/20 [00:08<00:10, 1.07it/s] 50%|█████ | 10/20 [00:09<00:09, 1.07it/s] 55%|█████▌ | 11/20 [00:09<00:08, 1.07it/s] 60%|██████ | 12/20 [00:10<00:07, 1.07it/s] 65%|██████▌ | 13/20 [00:11<00:06, 1.07it/s] 70%|███████ | 14/20 [00:12<00:05, 1.07it/s] 75%|███████▌ | 15/20 [00:13<00:04, 1.07it/s] 80%|████████ | 16/20 [00:14<00:03, 1.07it/s] 85%|████████▌ | 17/20 [00:15<00:02, 1.07it/s] 90%|█████████ | 18/20 [00:16<00:01, 1.07it/s] 95%|█████████▌| 19/20 [00:17<00:00, 1.06it/s] 100%|██████████| 20/20 [00:18<00:00, 1.06it/s] 100%|██████████| 20/20 [00:18<00:00, 1.09it/s]
Want to make some of these yourself?
Run this model