briaai / BRIA-4B-Adapt-ControlNet-Union

huggingface.co
Total runs: 8
24-hour runs: 0
7-day runs: 0
30-day runs: 6
Model's Last Updated: February 20 2025

Introduction of BRIA-4B-Adapt-ControlNet-Union

Model Details of BRIA-4B-Adapt-ControlNet-Union

BRIA-4B-Adapt ControlNet Union Model Card

BRIA-4B-Adapt ControlNet-Union, trained on the foundation of BRIA-4B-Adapt Text-to-Image , supports 6 control modes, including depth (0), canny (1), colorgrid (2), recolor (3), tile (4), pose (5). This model can be jointly used with other ControlNets.

This model combines technological innovation with ethical responsibility and legal security, setting a new standard in the AI industry. Bria AI licenses the foundation model with full legal liability coverage. Our dataset does not contain copyrighted materials, such as fictional characters, logos, trademarks, public figures, harmful content, or privacy-infringing content.

CLICK HERE FOR A DEMO

For more information, please visit our website .

Join our Discord community for more information, tutorials, tools, and to connect with other users!

Get Access

BRIA-4B-Adapt-ControlNet-Union requires access to BRIA-4B-Adapt Text-to-Image. For more information, click here .

Model Description
  • Developed by: BRIA AI
  • Model type: Latent Flow-Matching Text-to-Image Model
  • License: Commercial licensing terms & conditions.
  • Purchase is required to license and access the model.
  • Model Description: ControlNet Union for BRIA-4B-Adapt Text-to-Image model. The model generates images guided by text and a conditioned image.
  • Resources for more information: BRIA AI
Control Mode
Control Mode Description
0 depth
1 canny
2 colorgrid
3 recolor
4 tlie
5 pose

Installations
pip install -qr https://huggingface.co/briaai/BRIA-4B-Adapt/resolve/main/requirements.txt
pip install diffusers==0.30.2, hf_hub_download
from huggingface_hub import hf_hub_download
import os
try:
    local_dir = os.path.dirname(__file__)
except:
    local_dir = '.'
    
hf_hub_download(repo_id="briaai/BRIA-4B-Adapt", filename='pipeline_bria.py', local_dir=local_dir)
hf_hub_download(repo_id="briaai/BRIA-4B-Adapt", filename='transformer_bria.py', local_dir=local_dir)
hf_hub_download(repo_id="briaai/BRIA-4B-Adapt", filename='bria_utils.py', local_dir=local_dir)
hf_hub_download(repo_id="briaai/BRIA-4B-Adapt-ControlNet-Union", filename='pipeline_bria_controlnet.py', local_dir=local_dir)
hf_hub_download(repo_id="briaai/BRIA-4B-Adapt-ControlNet-Union", filename='controlnet_bria.py', local_dir=local_dir)

Inference

import torch
from diffusers.utils import load_image
from controlnet_bria import BriaControlNetModel
from pipeline_bria_controlnet import BriaControlNetPipeline
import PIL.Image as Image

RATIO_CONFIGS_1024 = {
    0.6666666666666666: {"width": 832, "height": 1248},
    0.7432432432432432: {"width": 880, "height": 1184},
    0.8028169014084507: {"width": 912, "height": 1136},
    1.0: {"width": 1024, "height": 1024},
    1.2456140350877194: {"width": 1136, "height": 912},
    1.3454545454545455: {"width": 1184, "height": 880},
    1.4339622641509433: {"width": 1216, "height": 848},
    1.5: {"width": 1248, "height": 832},
    1.5490196078431373: {"width": 1264, "height": 816},
    1.62: {"width": 1296, "height": 800},
    1.7708333333333333: {"width": 1360, "height": 768},
}

def resize_img(control_image):
    image_ratio = control_image.width / control_image.height
    ratio = min(RATIO_CONFIGS_1024.keys(), key=lambda k: abs(k - image_ratio))
    to_height = RATIO_CONFIGS_1024[ratio]["height"]
    to_width = RATIO_CONFIGS_1024[ratio]["width"]
    resized_image = control_image.resize((to_width, to_height), resample=Image.Resampling.LANCZOS)
    return resized_image


base_model = 'briaai/BRIA-4B-Adapt'
controlnet_model = 'briaai/BRIA-4B-Adapt-ControlNet-Union'
controlnet = BriaControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
pipeline = BriaControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16, trust_remote_code=True)
pipeline = pipeline.to(device="cuda", dtype=torch.bfloat16)

control_image_canny = load_image("https://huggingface.co/briaai/BRIA-4B-Adapt-ControlNet-Union/resolve/main/images/canny.jpg")
controlnet_conditioning_scale = 1.0
control_mode = 1
control_image_canny = resize_img(control_image_canny)
width, height = control_image_canny.size

prompt = 'In a serene living room, someone rests on a sapphire blue couch, diligently drawing in a rose-tinted notebook, with a sleek black coffee table, a muted green wall, an elegant geometric lamp, and a lush potted palm enhancing the peaceful ambiance.'

generator = torch.Generator(device="cuda").manual_seed(555)
image = pipeline(
    prompt, 
    control_image=control_image_canny,
    control_mode=control_mode,
    width=width,
    height=height,
    controlnet_conditioning_scale=controlnet_conditioning_scale,
    num_inference_steps=50, 
    max_sequence_length=128,
    guidance_scale=5,
    generator=generator,
    negative_prompt="Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate"
).images[0]
print(image)        

Multi-Controls Inference

import torch
from diffusers.utils import load_image
from controlnet_bria import BriaControlNetModel, BriaMultiControlNetModel
from pipeline_bria_controlnet import BriaControlNetPipeline
import PIL.Image as Image

base_model = 'briaai/BRIA-4B-Adapt'
controlnet_model = 'briaai/BRIA-3.0-ControlNet-Union'

controlnet = BriaControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
controlnet = BriaMultiControlNetModel([controlnet])

pipe = BriaControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16, trust_remote_code=True)
pipe.to("cuda")

control_image_colorgrid = load_image("https://huggingface.co/briaai/BRIA-3.0-ControlNet-Union/resolve/main/images/colorgrid.jpg")
control_image_pose = load_image("https://huggingface.co/briaai/BRIA-3.0-ControlNet-Union/resolve/main/images/pose.jpg")

control_image = [control_image_colorgrid, control_image_pose]
controlnet_conditioning_scale = [0.5, 0.5]
control_mode = [2, 5]

width, height = control_image[0].size

prompt = 'Two kids in jackets play near a tent in a forest.'

generator = torch.Generator(device="cuda").manual_seed(555)
image = pipe(
    prompt, 
    control_image=control_image,
    control_mode=control_mode,
    width=width,
    height=height,
    controlnet_conditioning_scale=controlnet_conditioning_scale,
    num_inference_steps=50, 
    max_sequence_length=128,
    guidance_scale=5,
    generator=generator,
    negative_prompt="Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate"
).images[0]

Runs of briaai BRIA-4B-Adapt-ControlNet-Union on huggingface.co

8
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
6
30-day runs

More Information About BRIA-4B-Adapt-ControlNet-Union huggingface.co Model

More BRIA-4B-Adapt-ControlNet-Union license Visit here:

https://choosealicense.com/licenses/bria-legal-lobby

BRIA-4B-Adapt-ControlNet-Union huggingface.co

BRIA-4B-Adapt-ControlNet-Union huggingface.co is an AI model on huggingface.co that provides BRIA-4B-Adapt-ControlNet-Union's model effect (), which can be used instantly with this briaai BRIA-4B-Adapt-ControlNet-Union model. huggingface.co supports a free trial of the BRIA-4B-Adapt-ControlNet-Union model, and also provides paid use of the BRIA-4B-Adapt-ControlNet-Union. Support call BRIA-4B-Adapt-ControlNet-Union model through api, including Node.js, Python, http.

BRIA-4B-Adapt-ControlNet-Union huggingface.co Url

https://huggingface.co/briaai/BRIA-4B-Adapt-ControlNet-Union

briaai BRIA-4B-Adapt-ControlNet-Union online free

BRIA-4B-Adapt-ControlNet-Union huggingface.co is an online trial and call api platform, which integrates BRIA-4B-Adapt-ControlNet-Union's modeling effects, including api services, and provides a free online trial of BRIA-4B-Adapt-ControlNet-Union, you can try BRIA-4B-Adapt-ControlNet-Union online for free by clicking the link below.

briaai BRIA-4B-Adapt-ControlNet-Union online free url in huggingface.co:

https://huggingface.co/briaai/BRIA-4B-Adapt-ControlNet-Union

BRIA-4B-Adapt-ControlNet-Union install

BRIA-4B-Adapt-ControlNet-Union is an open source model from GitHub that offers a free installation service, and any user can find BRIA-4B-Adapt-ControlNet-Union on GitHub to install. At the same time, huggingface.co provides the effect of BRIA-4B-Adapt-ControlNet-Union install, users can directly use BRIA-4B-Adapt-ControlNet-Union installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

BRIA-4B-Adapt-ControlNet-Union install url in huggingface.co:

https://huggingface.co/briaai/BRIA-4B-Adapt-ControlNet-Union

Url of BRIA-4B-Adapt-ControlNet-Union

BRIA-4B-Adapt-ControlNet-Union huggingface.co Url

Provider of BRIA-4B-Adapt-ControlNet-Union huggingface.co

briaai
ORGANIZATIONS

Other API from briaai

huggingface.co

Total runs: 392.5K
Run Growth: -251.9K
Growth Rate: -63.22%
Updated:April 06 2026
huggingface.co

Total runs: 263.1K
Run Growth: -108.8K
Growth Rate: -41.14%
Updated:July 06 2025
huggingface.co

Total runs: 3.6K
Run Growth: 34
Growth Rate: 0.89%
Updated:October 29 2025
huggingface.co

Total runs: 979
Run Growth: 143
Growth Rate: 14.61%
Updated:July 05 2026
huggingface.co

Total runs: 763
Run Growth: 638
Growth Rate: 83.62%
Updated:January 30 2026
huggingface.co

Total runs: 704
Run Growth: -194
Growth Rate: -24.78%
Updated:September 09 2026
huggingface.co

Total runs: 530
Run Growth: -627
Growth Rate: -118.98%
Updated:August 18 2026
huggingface.co

Total runs: 235
Run Growth: 0
Growth Rate: 0.00%
Updated:May 12 2024
huggingface.co

Total runs: 211
Run Growth: 128
Growth Rate: 60.09%
Updated:September 05 2026
huggingface.co

Total runs: 135
Run Growth: 85
Growth Rate: 62.96%
Updated:September 01 2025
huggingface.co

Total runs: 131
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 104
Run Growth: 39
Growth Rate: 37.50%
Updated:October 16 2025
huggingface.co

Total runs: 68
Run Growth: -29
Growth Rate: -40.85%
Updated:January 15 2026
huggingface.co

Total runs: 46
Run Growth: 0
Growth Rate: 0.00%
Updated:May 12 2024
huggingface.co

Total runs: 30
Run Growth: 0
Growth Rate: 0.00%
Updated:March 13 2024
huggingface.co

Total runs: 28
Run Growth: 28
Growth Rate: 100.00%
Updated:April 10 2025
huggingface.co

Total runs: 9
Run Growth: -6
Growth Rate: -66.67%
Updated:June 11 2025
huggingface.co

Total runs: 4
Run Growth: 0
Growth Rate: 0.00%
Updated:November 19 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 18 2024
huggingface.co

Total runs: 0
Run Growth: -2
Growth Rate: 0.00%
Updated:April 10 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 08 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 11 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:July 16 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 25 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 19 2026