Skip to main content
FluxPipeline provides support for multiple image generation pipelines with and without control nets including text-to-image (txt2img), image-to-image (img2img), and inpainting.
Ensure that a volume mount is added to the deployment, as all images generated are dumped inside the /data/outputs directory in the container.

Optimization Settings

For optimization, under the optimization config, use:
  • Higher threshold values result in greater speed gains but may degrade image generation accuracy.
  • We recommend a threshold of 0.1, which can provide up to a 40% speed improvement during inference while maintaining reasonable quality.

Pipeline Settings

For optimization, under the optimization config, use:

  • Multi-mode ControlNet model can be added under the controlnets section.
  • Each ControlNet model requires a name, source, and authentication details if needed.
  • Instead of using multiple single-mode ControlNets, all conditioning sources are unified within a single model.

Current Limitations

  • Supports only one multi-mode ControlNet model.
  • Does not support multi-mode ControlNet with additional single-mode ControlNets.
  • This means if using a multi-mode model (FLUX.1-dev-ControlNet-Union-Pro), you cannot combine it with other standalone ControlNets.

Understanding ControlNet Parameters

When using MultiMode Controlnet, these parameters define the multi-mode behavior:

Supported Pipelines

  1. txt2img - Generates an image from text input.
  2. txt2img_controlnet - Generates an image based on an input image and a given prompt.
  3. img2img - Modifies specific regions of an image based on a mask and a given prompt.
  4. img2img_controlnet - Generates an image based on an input image and a given prompt with controlnet support.
  5. inpaint - Modifies specific regions of an image based on a mask and a given prompt.
  6. inpaint_controlnet - Modifies specific regions of an image based on a mask and a given prompt with controlnet support.

Example Requests

txt2img

txt2img_controlnet

img2img

img2img_controlnet

Note : Currently num_images_per_prompt = 1 is supported.

inpaint

inpaint_controlnet

Note : Currently num_images_per_prompt = 1 is supported.

Example Response

Key Notes

  • Ensure volume mounting in deployment for image storage.
  • ControlNet models are not loaded by default.
  • Ensure all 3 control_ params are sent out in request.
  • Supports multiple pipelines for text-to-image, image-to-image, and inpainting.