fermatresearch
/
flux-controlnet-inpaint
Run inpainting with Flux, compatible with Canny ControlNet, LoRAs and HyperFlux_8step
- Public
- 16.6K runs
-
A100 (80GB)
- GitHub
Prediction
fermatresearch/flux-controlnet-inpaint:46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8fID9gv8ma1xzxrj60cj0jdrjsgp9cStatusSucceededSourceWebHardwareA100 (80GB)Total durationCreatedInput
- prompt
- Professional photography of a fox sitting on a bench
- strength
- 0.8
- lora_scale
- 0.8
- output_format
- jpg
- guidance_scale
- 3.5
- output_quality
- 100
- conditioning_scale
- 0.5
- num_inference_steps
- 8
- enable_hyper_flux_8_step
{ "mask": "https://replicate.delivery/pbxt/LdzOC0eYgmiQxsZntL8aUwyQlLjtXQuhmMrXrOUbpMESw11v/output%20%282%29.png", "image": "https://replicate.delivery/pbxt/LdzOC2USRj4omEK2igawxoYUPG6hJ2RfRZS2TZXiqSEkybYs/output%20%283%29.png", "prompt": "Professional photography of a fox sitting on a bench", "strength": 0.8, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzOBqGI9FyIIPZOyOBYToYndRLXelYBSqOP1XJlE5Tq5up9/output%20%283%29.png", "output_format": "jpg", "guidance_scale": 3.5, "output_quality": 100, "conditioning_scale": 0.5, "num_inference_steps": 8, "enable_hyper_flux_8_step": true }
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 fermatresearch/flux-controlnet-inpaint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fermatresearch/flux-controlnet-inpaint:46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f", { input: { mask: "https://replicate.delivery/pbxt/LdzOC0eYgmiQxsZntL8aUwyQlLjtXQuhmMrXrOUbpMESw11v/output%20%282%29.png", image: "https://replicate.delivery/pbxt/LdzOC2USRj4omEK2igawxoYUPG6hJ2RfRZS2TZXiqSEkybYs/output%20%283%29.png", prompt: "Professional photography of a fox sitting on a bench", strength: 0.8, lora_scale: 0.8, control_image: "https://replicate.delivery/pbxt/LdzOBqGI9FyIIPZOyOBYToYndRLXelYBSqOP1XJlE5Tq5up9/output%20%283%29.png", output_format: "jpg", guidance_scale: 3.5, output_quality: 100, conditioning_scale: 0.5, num_inference_steps: 8, enable_hyper_flux_8_step: true } } ); // 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 fermatresearch/flux-controlnet-inpaint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "fermatresearch/flux-controlnet-inpaint:46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f", input={ "mask": "https://replicate.delivery/pbxt/LdzOC0eYgmiQxsZntL8aUwyQlLjtXQuhmMrXrOUbpMESw11v/output%20%282%29.png", "image": "https://replicate.delivery/pbxt/LdzOC2USRj4omEK2igawxoYUPG6hJ2RfRZS2TZXiqSEkybYs/output%20%283%29.png", "prompt": "Professional photography of a fox sitting on a bench", "strength": 0.8, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzOBqGI9FyIIPZOyOBYToYndRLXelYBSqOP1XJlE5Tq5up9/output%20%283%29.png", "output_format": "jpg", "guidance_scale": 3.5, "output_quality": 100, "conditioning_scale": 0.5, "num_inference_steps": 8, "enable_hyper_flux_8_step": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run fermatresearch/flux-controlnet-inpaint 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": "46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f", "input": { "mask": "https://replicate.delivery/pbxt/LdzOC0eYgmiQxsZntL8aUwyQlLjtXQuhmMrXrOUbpMESw11v/output%20%282%29.png", "image": "https://replicate.delivery/pbxt/LdzOC2USRj4omEK2igawxoYUPG6hJ2RfRZS2TZXiqSEkybYs/output%20%283%29.png", "prompt": "Professional photography of a fox sitting on a bench", "strength": 0.8, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzOBqGI9FyIIPZOyOBYToYndRLXelYBSqOP1XJlE5Tq5up9/output%20%283%29.png", "output_format": "jpg", "guidance_scale": 3.5, "output_quality": 100, "conditioning_scale": 0.5, "num_inference_steps": 8, "enable_hyper_flux_8_step": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-09-18T10:10:27.646617Z", "created_at": "2024-09-18T10:08:55.807000Z", "data_removed": false, "error": null, "id": "9gv8ma1xzxrj60cj0jdrjsgp9c", "input": { "mask": "https://replicate.delivery/pbxt/LdzOC0eYgmiQxsZntL8aUwyQlLjtXQuhmMrXrOUbpMESw11v/output%20%282%29.png", "image": "https://replicate.delivery/pbxt/LdzOC2USRj4omEK2igawxoYUPG6hJ2RfRZS2TZXiqSEkybYs/output%20%283%29.png", "prompt": "Professional photography of a fox sitting on a bench", "strength": 0.8, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzOBqGI9FyIIPZOyOBYToYndRLXelYBSqOP1XJlE5Tq5up9/output%20%283%29.png", "output_format": "jpg", "guidance_scale": 3.5, "output_quality": 100, "conditioning_scale": 0.5, "num_inference_steps": 8, "enable_hyper_flux_8_step": true }, "logs": "Using seed: 28712\n 0%| | 0/7 [00:00<?, ?it/s]\n 14%|█▍ | 1/7 [00:00<00:04, 1.37it/s]\n 29%|██▊ | 2/7 [00:01<00:03, 1.53it/s]\n 43%|████▎ | 3/7 [00:01<00:02, 1.58it/s]\n 57%|█████▋ | 4/7 [00:02<00:01, 1.61it/s]\n 71%|███████▏ | 5/7 [00:03<00:01, 1.62it/s]\n 86%|████████▌ | 6/7 [00:03<00:00, 1.63it/s]\n100%|██████████| 7/7 [00:04<00:00, 1.75it/s]\n100%|██████████| 7/7 [00:04<00:00, 1.65it/s]", "metrics": { "predict_time": 10.94193154, "total_time": 91.839617 }, "output": [ "https://replicate.delivery/yhqm/xhIBrigTM8LAGt3lqX0U6H4adPPU7JBSPN22ehX1bYsJyCvJA/out-0.jpg" ], "started_at": "2024-09-18T10:10:16.704686Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/9gv8ma1xzxrj60cj0jdrjsgp9c", "cancel": "https://api.replicate.com/v1/predictions/9gv8ma1xzxrj60cj0jdrjsgp9c/cancel" }, "version": "46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f" }
Generated inUsing seed: 28712 0%| | 0/7 [00:00<?, ?it/s] 14%|█▍ | 1/7 [00:00<00:04, 1.37it/s] 29%|██▊ | 2/7 [00:01<00:03, 1.53it/s] 43%|████▎ | 3/7 [00:01<00:02, 1.58it/s] 57%|█████▋ | 4/7 [00:02<00:01, 1.61it/s] 71%|███████▏ | 5/7 [00:03<00:01, 1.62it/s] 86%|████████▌ | 6/7 [00:03<00:00, 1.63it/s] 100%|██████████| 7/7 [00:04<00:00, 1.75it/s] 100%|██████████| 7/7 [00:04<00:00, 1.65it/s]
Prediction
fermatresearch/flux-controlnet-inpaint:46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8fIDan7n0term9rj40cj0jnr0p4g1rStatusSucceededSourceWebHardwareA100 (80GB)Total durationCreatedInput
- prompt
- Product photography of a puffy jacket with a logo of a high quality red flower in the chest.
- strength
- 0.99
- lora_scale
- 0.8
- output_format
- jpg
- guidance_scale
- 2.5
- output_quality
- 100
- conditioning_scale
- 0.4
- num_inference_steps
- 28
- enable_hyper_flux_8_step
{ "mask": "https://replicate.delivery/pbxt/LdzfKF7Xj9JJnOjnEwx6DpOPQ6ZwIGlopaGAe2xCwWUYafak/output%202.png", "image": "https://replicate.delivery/pbxt/LdzfJhIScoFTFBGfXNZbO6e7zuBJnZFn0YSs0Kd17BuyhHc4/test.png", "prompt": "Product photography of a puffy jacket with a logo of a high quality red flower in the chest.", "strength": 0.99, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzfJozitU8Ldhv0ELr2mvJw9UlYSbs1pwpnRh9Z6c8RXMna/test.png", "output_format": "jpg", "guidance_scale": 2.5, "output_quality": 100, "conditioning_scale": 0.4, "num_inference_steps": 28, "enable_hyper_flux_8_step": false }
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 fermatresearch/flux-controlnet-inpaint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fermatresearch/flux-controlnet-inpaint:46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f", { input: { mask: "https://replicate.delivery/pbxt/LdzfKF7Xj9JJnOjnEwx6DpOPQ6ZwIGlopaGAe2xCwWUYafak/output%202.png", image: "https://replicate.delivery/pbxt/LdzfJhIScoFTFBGfXNZbO6e7zuBJnZFn0YSs0Kd17BuyhHc4/test.png", prompt: "Product photography of a puffy jacket with a logo of a high quality red flower in the chest.", strength: 0.99, lora_scale: 0.8, control_image: "https://replicate.delivery/pbxt/LdzfJozitU8Ldhv0ELr2mvJw9UlYSbs1pwpnRh9Z6c8RXMna/test.png", output_format: "jpg", guidance_scale: 2.5, output_quality: 100, conditioning_scale: 0.4, num_inference_steps: 28, enable_hyper_flux_8_step: false } } ); // 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 fermatresearch/flux-controlnet-inpaint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "fermatresearch/flux-controlnet-inpaint:46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f", input={ "mask": "https://replicate.delivery/pbxt/LdzfKF7Xj9JJnOjnEwx6DpOPQ6ZwIGlopaGAe2xCwWUYafak/output%202.png", "image": "https://replicate.delivery/pbxt/LdzfJhIScoFTFBGfXNZbO6e7zuBJnZFn0YSs0Kd17BuyhHc4/test.png", "prompt": "Product photography of a puffy jacket with a logo of a high quality red flower in the chest.", "strength": 0.99, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzfJozitU8Ldhv0ELr2mvJw9UlYSbs1pwpnRh9Z6c8RXMna/test.png", "output_format": "jpg", "guidance_scale": 2.5, "output_quality": 100, "conditioning_scale": 0.4, "num_inference_steps": 28, "enable_hyper_flux_8_step": False } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run fermatresearch/flux-controlnet-inpaint 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": "46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f", "input": { "mask": "https://replicate.delivery/pbxt/LdzfKF7Xj9JJnOjnEwx6DpOPQ6ZwIGlopaGAe2xCwWUYafak/output%202.png", "image": "https://replicate.delivery/pbxt/LdzfJhIScoFTFBGfXNZbO6e7zuBJnZFn0YSs0Kd17BuyhHc4/test.png", "prompt": "Product photography of a puffy jacket with a logo of a high quality red flower in the chest.", "strength": 0.99, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzfJozitU8Ldhv0ELr2mvJw9UlYSbs1pwpnRh9Z6c8RXMna/test.png", "output_format": "jpg", "guidance_scale": 2.5, "output_quality": 100, "conditioning_scale": 0.4, "num_inference_steps": 28, "enable_hyper_flux_8_step": false } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-09-18T10:27:28.191020Z", "created_at": "2024-09-18T10:27:03.970000Z", "data_removed": false, "error": null, "id": "an7n0term9rj40cj0jnr0p4g1r", "input": { "mask": "https://replicate.delivery/pbxt/LdzfKF7Xj9JJnOjnEwx6DpOPQ6ZwIGlopaGAe2xCwWUYafak/output%202.png", "image": "https://replicate.delivery/pbxt/LdzfJhIScoFTFBGfXNZbO6e7zuBJnZFn0YSs0Kd17BuyhHc4/test.png", "prompt": "Product photography of a puffy jacket with a logo of a high quality red flower in the chest.", "strength": 0.99, "lora_scale": 0.8, "control_image": "https://replicate.delivery/pbxt/LdzfJozitU8Ldhv0ELr2mvJw9UlYSbs1pwpnRh9Z6c8RXMna/test.png", "output_format": "jpg", "guidance_scale": 2.5, "output_quality": 100, "conditioning_scale": 0.4, "num_inference_steps": 28, "enable_hyper_flux_8_step": false }, "logs": "Using seed: 23149\n 0%| | 0/28 [00:00<?, ?it/s]\n 4%|▎ | 1/28 [00:00<00:18, 1.44it/s]\n 7%|▋ | 2/28 [00:01<00:16, 1.57it/s]\n 11%|█ | 3/28 [00:01<00:15, 1.61it/s]\n 14%|█▍ | 4/28 [00:02<00:14, 1.64it/s]\n 18%|█▊ | 5/28 [00:03<00:13, 1.65it/s]\n 21%|██▏ | 6/28 [00:03<00:13, 1.66it/s]\n 25%|██▌ | 7/28 [00:04<00:12, 1.66it/s]\n 29%|██▊ | 8/28 [00:04<00:12, 1.66it/s]\n 32%|███▏ | 9/28 [00:05<00:11, 1.66it/s]\n 36%|███▌ | 10/28 [00:06<00:10, 1.67it/s]\n 39%|███▉ | 11/28 [00:06<00:10, 1.67it/s]\n 43%|████▎ | 12/28 [00:07<00:09, 1.67it/s]\n 46%|████▋ | 13/28 [00:07<00:09, 1.67it/s]\n 50%|█████ | 14/28 [00:08<00:08, 1.67it/s]\n 54%|█████▎ | 15/28 [00:09<00:07, 1.67it/s]\n 57%|█████▋ | 16/28 [00:09<00:07, 1.67it/s]\n 61%|██████ | 17/28 [00:10<00:06, 1.67it/s]\n 64%|██████▍ | 18/28 [00:10<00:06, 1.66it/s]\n 68%|██████▊ | 19/28 [00:11<00:05, 1.66it/s]\n 71%|███████▏ | 20/28 [00:12<00:04, 1.66it/s]\n 75%|███████▌ | 21/28 [00:12<00:04, 1.67it/s]\n 79%|███████▊ | 22/28 [00:13<00:03, 1.66it/s]\n 82%|████████▏ | 23/28 [00:13<00:03, 1.66it/s]\n 86%|████████▌ | 24/28 [00:14<00:02, 1.66it/s]\n 89%|████████▉ | 25/28 [00:15<00:01, 1.66it/s]\n 93%|█████████▎| 26/28 [00:15<00:01, 1.66it/s]\n 96%|█████████▋| 27/28 [00:16<00:00, 1.66it/s]\n100%|██████████| 28/28 [00:16<00:00, 1.76it/s]\n100%|██████████| 28/28 [00:16<00:00, 1.67it/s]", "metrics": { "predict_time": 24.212186638, "total_time": 24.22102 }, "output": [ "https://replicate.delivery/yhqm/kxUBwVQewGUe30e0Lzf4JfNxrz2rtzKn3RHa2O1uVgx7huwbC/out-0.jpg" ], "started_at": "2024-09-18T10:27:03.978834Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/an7n0term9rj40cj0jnr0p4g1r", "cancel": "https://api.replicate.com/v1/predictions/an7n0term9rj40cj0jnr0p4g1r/cancel" }, "version": "46ae77d1d148dca1bd61c1215e99ee692c4cf01289a2bba681b14a58c04bda8f" }
Generated inUsing seed: 23149 0%| | 0/28 [00:00<?, ?it/s] 4%|▎ | 1/28 [00:00<00:18, 1.44it/s] 7%|▋ | 2/28 [00:01<00:16, 1.57it/s] 11%|█ | 3/28 [00:01<00:15, 1.61it/s] 14%|█▍ | 4/28 [00:02<00:14, 1.64it/s] 18%|█▊ | 5/28 [00:03<00:13, 1.65it/s] 21%|██▏ | 6/28 [00:03<00:13, 1.66it/s] 25%|██▌ | 7/28 [00:04<00:12, 1.66it/s] 29%|██▊ | 8/28 [00:04<00:12, 1.66it/s] 32%|███▏ | 9/28 [00:05<00:11, 1.66it/s] 36%|███▌ | 10/28 [00:06<00:10, 1.67it/s] 39%|███▉ | 11/28 [00:06<00:10, 1.67it/s] 43%|████▎ | 12/28 [00:07<00:09, 1.67it/s] 46%|████▋ | 13/28 [00:07<00:09, 1.67it/s] 50%|█████ | 14/28 [00:08<00:08, 1.67it/s] 54%|█████▎ | 15/28 [00:09<00:07, 1.67it/s] 57%|█████▋ | 16/28 [00:09<00:07, 1.67it/s] 61%|██████ | 17/28 [00:10<00:06, 1.67it/s] 64%|██████▍ | 18/28 [00:10<00:06, 1.66it/s] 68%|██████▊ | 19/28 [00:11<00:05, 1.66it/s] 71%|███████▏ | 20/28 [00:12<00:04, 1.66it/s] 75%|███████▌ | 21/28 [00:12<00:04, 1.67it/s] 79%|███████▊ | 22/28 [00:13<00:03, 1.66it/s] 82%|████████▏ | 23/28 [00:13<00:03, 1.66it/s] 86%|████████▌ | 24/28 [00:14<00:02, 1.66it/s] 89%|████████▉ | 25/28 [00:15<00:01, 1.66it/s] 93%|█████████▎| 26/28 [00:15<00:01, 1.66it/s] 96%|█████████▋| 27/28 [00:16<00:00, 1.66it/s] 100%|██████████| 28/28 [00:16<00:00, 1.76it/s] 100%|██████████| 28/28 [00:16<00:00, 1.67it/s]
Want to make some of these yourself?
Run this model