Team Ai
Modelpublic

XLabs-AI/flux-controlnet-canny

sourceHugging Faceotherupdated 2y agoView on Hugging Face
286likes881downloads
Model Card

ControlNet Canny for Flux

This repository provides a checkpoint with trained ControlNet Canny model for FLUX.1-dev model by Black Forest Labs

ComfyUI

See our github for comfy ui workflows. Example Picture 1

Training details

XLabs AI team is happy to publish fune-tuning Flux scripts, including:

  • โ€”LoRA ๐Ÿ”ฅ
  • โ€”ControlNet ๐Ÿ”ฅ

See our github for train script and train configs.

Training dataset

Dataset has the following format for the training process:

โ”œโ”€โ”€ images/
โ”‚    โ”œโ”€โ”€ 1.png
โ”‚    โ”œโ”€โ”€ 1.json
โ”‚    โ”œโ”€โ”€ 2.png
โ”‚    โ”œโ”€โ”€ 2.json
โ”‚    โ”œโ”€โ”€ ...

A .json file contains "caption" field with a text prompt.

Inference

To test our checkpoints, use commands presented below.

bash
python3 demo_controlnet_inference.py \
    --checkpoint controlnet.safetensors \
    --control_image "input_image.jpg" \
    --prompt "a handsome viking man with white hair, cinematic, MM full HD"

Example Picture 1

bash
python3 demo_controlnet_inference.py \
    --checkpoint controlnet.safetensors \
    --control_image "input_image.jpg" \
    --prompt "a dark evil mysterius house with ghosts, cinematic, MM full HD"

Example Picture 2

License

controlnet.safetensors falls under the [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) Non-Commercial License<br/>