BRIA 2.2 ControlNet Canny Model Card

Click here for Demo

BRIA 2.2 ControlNet-Canny, trained on the foundation of BRIA 2.2 Text-to-Image, enables the generation of high-quality images guided by a textual prompt and the extracted edge map from an input image. This allows for the creation of different variations of an image, all sharing the same geometry.

BRIA 2.2 was trained from scratch exclusively on licensed data from our esteemed data partners. Therefore, they are safe for commercial use and provide full legal liability coverage for copyright and privacy infringement, as well as harmful content mitigation. That is, our dataset does not contain copyrighted materials, such as fictional characters, logos, trademarks, public figures, harmful content, or privacy-infringing content.

photo-4426232_collage.png

Model Description

  • Developed by: BRIA AI

  • Model type: ControlNet for Latent diffusion

  • License: bria-2.2

  • Model Description: ControlNet Canny for BRIA 2.2 Text-to-Image model. The model generates images guided by text and the edge map of the conditioned image.

  • Resources for more information: BRIA AI

Get Access

BRIA 2.2 ControlNet-Canny requires access to BRIA 2.2 Text-to-Image. For more information, click here.

Code example using Diffusers

pip install diffusers
from diffusers import ControlNetModel, StableDiffusionXLControlNetPipeline
import torch

controlnet = ControlNetModel.from_pretrained(
    "briaai/BRIA-2.2-ControlNet-Canny",
    torch_dtype=torch.float16
)

pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
    "briaai/BRIA-2.2",
    controlnet=controlnet,
    torch_dtype=torch.float16,
)
pipe.to("cuda")

prompt = "A portrait of a Beautiful and playful ethereal singer, golden designs, highly detailed, blurry background"
negative_prompt = "Logo,Watermark,Text,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"

# Calculate Canny image
input_image = cv2.imread('pics/singer.png')
input_image = cv2.Canny(input_image, low_threshold, high_threshold)
input_image = input_image[:, :, None]
input_image = np.concatenate([input_image, input_image, input_image], axis=2)
canny_image = Image.fromarray(image)

image = pipe(prompt=prompt, negative_prompt=negative_prompt, image=canny_image, controlnet_conditioning_scale=1.0, height=1024, width=1024).images[0]
Downloads last month
18
Inference Examples
Inference API (serverless) has been turned off for this model.

Spaces using briaai/BRIA-2.2-ControlNet-Canny 4