许可证:其他
许可证名称:bria-2.3
许可证链接:https://bria.ai/bria-huggingface-model-license-agreement/
推理:不支持
标签:
- 文本生成图像
- ControlNet模型
- 法律责任
- 商业用途
额外授权提示:BRIA AI的模型权重需在签署商业许可协议后获取。填写下方表单,我们将与您联系。
额外授权字段:
姓名:文本
公司/机构名称:文本
机构类型(初创/成长型企业、大型企业、学术机构):文本
职位:文本
国家:文本
邮箱:文本
提交此表单即表示同意BRIA的隐私政策及条款与条件(详见下方链接):复选框
BRIA 2.3 ControlNet Canny 模型卡
BRIA 2.3 ControlNet-Canny基于BRIA 2.3文本生成图像模型开发,能够通过文本提示和输入图像的边缘映射生成高质量图像,从而创建具有相同几何结构的不同图像变体。
BRIA 2.3完全使用我们尊贵数据合作伙伴的授权数据从头训练,因此可安全用于商业场景,并为版权与隐私侵权及有害内容提供完整的法律赔偿责任覆盖。即,我们的数据集不包含受版权保护的内容(如虚构角色、商标、公众人物)、有害内容或侵犯隐私的内容。
加入我们的Discord社区,获取更多信息、教程、工具,并与其他用户交流!

模型描述
获取权限
BRIA 2.3 ControlNet-Canny需搭配BRIA 2.3文本生成图像模型使用。点击此处了解详情。
Diffusers代码示例
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 = "一位美丽活泼的空灵歌手肖像,金色装饰,高度细节化,背景虚化"
negative_prompt = "商标、水印、文字、丑陋、病态、多余手指、手部绘制不佳、突变、模糊、多余肢体、比例失调、缺失手臂、手部变异、长脖子、重复、残缺、残缺手部、面部绘制差、畸形、解剖结构错误、克隆面部、畸形肢体、缺失腿部、手指过多"
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]