🚀 BRIA 2.3 ControlNet Canny模型卡片
BRIA 2.3 ControlNet-Canny模型基于BRIA 2.3文本到图像模型训练而成,它能够依据文本提示和输入图像提取的边缘图,生成高质量的图像。这使得用户可以创建具有相同几何结构的不同图像变体。
BRIA 2.3模型是完全基于我们尊贵数据合作伙伴的授权数据从头开始训练的。因此,该模型可安全用于商业用途,并对版权和隐私侵权以及有害内容的缓解提供全面的法律责任保障。也就是说,我们的数据集不包含受版权保护的材料,如虚构角色、标志、商标、公众人物、有害内容或侵犯隐私的内容。
加入我们的Discord社区,获取更多信息、教程、工具,并与其他用户交流!

✨ 主要特性
- 基于BRIA 2.3文本到图像模型训练,可根据文本提示和边缘图生成高质量图像。
- 使用授权数据训练,可安全用于商业用途,提供法律责任保障。
📦 安装指南
pip install diffusers
💻 使用示例
基础用法
from diffusers import ControlNetModel, StableDiffusionXLControlNetPipeline
import torch
import cv2
import numpy as np
from PIL import Image
from diffusers.utils import load_image
controlnet = ControlNetModel.from_pretrained(
"briaai/BRIA-2.3-ControlNet-Canny",
torch_dtype=torch.float16
)
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
"briaai/BRIA-2.3",
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"
input_image = load_image(
"https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png"
)
input_image = np.array(input_image)
low_threshold, high_threshold = 100, 200
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(input_image)
image = pipe(prompt=prompt, negative_prompt=negative_prompt, image=canny_image, controlnet_conditioning_scale=1.0, height=1024, width=1024).images[0]
📚 详细文档
模型描述
属性 |
详情 |
开发方 |
BRIA AI |
模型类型 |
用于潜在扩散的ControlNet |
许可证 |
bria-2.3 |
模型描述 |
用于BRIA 2.3文本到图像模型的ControlNet Canny。该模型根据文本和条件图像的边缘图生成图像。 |
更多信息资源 |
BRIA AI |
获取访问权限
BRIA 2.3 ControlNet-Canny需要访问BRIA 2.3文本到图像模型。更多信息,请点击此处。
📄 许可证
本模型使用的许可证为 bria-2.3。此模型权重由BRIA AI提供,需在达成商业许可协议后获取。请填写以下表格,我们会与您联系。