ControlNet with Flux 



As Flux has been live for nearly two weeks, it’s only a matter of time before we begin to see the tools and workflows we've come to rely on with Stable Diffusion. One of the first exciting developments is the release of the Flux ControlNet model. Today, we’ll explore the Canny ControlNet models and how we can use them with Flux to gain more control over the images we generate.

Installing the ControlNet Models

To begin, you’ll need to install the new ControlNet models, which are available on Hugging Face. There are two versions: XLabs and InstantX. While I’ve primarily used the XLabs version, the installation process is the same for both. Once downloaded, navigate to your ComfyUI folder and place the models in the models/controlnet directory. For better organization, consider renaming the models to something meaningful, such as xlabsAI_ControlNet or instantx_ControlNet, to easily distinguish between them.

Once the models are in place, you can jump into ComfyUI. I’ve set up a simple workflow that incorporates ControlNet, which I’ll walk you through step-by-step. If you prefer to follow along, you can download the base Flux ComfyUI workflow, which we’ll be building upon to add the ControlNet components.

Building the Workflow

In this tutorial, the key nodes are:

  • Load ControlNet Model
  • Apply ControlNet Canny
  • Flux Guidance

You’ll find these components are readily available in the base ComfyUI. Begin by loading the relevant nodes, in this case, Load ControlNet Model Canny, Apply ControlNet, and Flux Guidance. If you already have the Flux guidance node in place, feel free to remove it temporarily as we’ll be adding new steps.

The next step is to connect the Apply ControlNet node to the Flux Guidance node. This allows us to apply any ControlNet model to the image we are generating. Then, connect Load ControlNet Model to Apply ControlNet and input the Canny image output. Finally, link the source image you’re using as a base to the Canny input, which helps define the structure of the final image.

If you’d like, you can also add a preview of the Canny image to check its appearance before proceeding. From there, all that remains is to connect the conditioning output of your prompt into the Apply ControlNet node.

Optimizing Image Quality

Before hitting "Generate," make sure to adjust the guidance strength. I recommend setting it to 4, as this avoids artifacts that tend to appear with lower values. This adjustment often results in more refined, higher-quality images. Once everything is set, go ahead and run the prompt, and you’ll see how the ControlNet model influences the final output.

As you experiment with different poses and styles, you’ll notice how ControlNet retains the structure of your source image while still allowing for creativity in appearance and design.

Enhancing Your Image with PromptCrafters

For further improvements in image quality, such as enhancing photographic detail or refining art styles, I recommend checking out PromptCrafters. PromptCrafters is an outstanding prompt database initially developed for MidJourney, and it now includes support for Flux.

It offers a highly organized table of prompts categorized by style and use case, helping you find the perfect prompt quickly and easily. Even more helpful is the visual database, where you can browse examples of images created with various prompts to inspire your work. Key elements like art style and essential descriptors are separated so you can replicate them in your own prompts.

For instance, to enhance the photographic quality of an image, you might browse the photography category, find a suitable prompt, and modify it to fit your needs. In this case, I was looking for a full-body shot of a woman in a wedding dress, so I made adjustments accordingly, removing unnecessary descriptors while ensuring compatibility with ControlNet.

Final Thoughts

By combining Flux with the power of ControlNet models and PromptCrafters, you can unlock a whole new level of creativity and control in your AI-generated images. The process is simple, and with a bit of experimentation, you’ll quickly see the potential for generating stunning visuals.

If you found this post helpful, please consider subscribing to our YouTube channel and supporting us on Patreon, where you’ll find ad-free videos, exclusive workflows, and access to the PromptCrafters database. All links mentioned in this post are available below.

Thanks for reading, and happy creating!

#Flux #FluxAI #blackforest #blackforestlabs

Comments