Edit model card

FLUX.1-dev Controlnet

We have completed the training of the first version. The training was conducted with a total pixel count of 1024*1024 at multi-scale. We trained for 30k steps using a batch size of 8*8.

Diffusers version

Please ensure that you have installed the latest version of Diffusers.

Demo

import torch
from diffusers.utils import load_image
from diffusers.pipelines.flux.pipeline_flux_controlnet import FluxControlNetPipeline
from diffusers.models.controlnet_flux import FluxControlNetModel

base_model = 'black-forest-labs/FLUX.1-dev'
controlnet_model = 'InstantX/FLUX.1-dev-Controlnet-Canny'
controlnet = FluxControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16)
pipe.to("cuda")

control_image = load_image("https://huggingface.co/InstantX/FLUX.1-dev-Controlnet-Canny/resolve/main/canny.jpg")
prompt = "A girl in city, 25 years old, cool, futuristic"
image = pipe(
    prompt, 
    control_image=control_image,
    controlnet_conditioning_scale=0.6,
    num_inference_steps=28, 
    guidance_scale=3.5,
).images[0]
image.save("image.jpg")
Downloads last month
5,761
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Model tree for InstantX/FLUX.1-dev-Controlnet-Canny

Finetuned
(255)
this model

Spaces using InstantX/FLUX.1-dev-Controlnet-Canny 13