LooseControl:提升ControlNet实现广义深度条件控制
这是我们论文的官方代码仓库:
LooseControl:提升ControlNet实现广义深度条件控制
Shariq Farooq Bhat、Niloy J. Mitra、Peter Wonka
[项目主页] [论文] [演示 🤗] [权重(3D盒子控制)]
使用方法
git clone https://github.com/shariqfarooq123/LooseControl && cd LooseControl
启动用户界面:
gradio app.py
或通过Python API使用:
from loosecontrol import LooseControlNet
lcn = LooseControlNet("shariqfarooq/loose-control-3dbox")
boxy_depth = ...
prompt = "沙漠中的雪人照片"
negative_prompt = "模糊,文字,说明,低质量,低分辨率,低解析度,噪点,丑陋"
gen_image_1 = lcn(prompt, negative_prompt=negative_prompt, control_image=boxy_depth)
保持风格的编辑:
# 固定"风格"并进行编辑
# 编辑 'boxy_depth' -> 'boxy_depth_edited'
lcn.set_cf_attention()
gen_image_edited = lcn.edit(boxy_depth, boxy_depth_edited, prompt, negative_prompt=negative_prompt)
致谢
跨帧注意力机制改编自Text2Video-Zero
引用
@misc{bhat2023loosecontrol,
title={LooseControl: Lifting ControlNet for Generalized Depth Conditioning},
author={Shariq Farooq Bhat and Niloy J. Mitra and Peter Wonka},
year={2023},
eprint={2312.03079},
archivePrefix={arXiv},
primaryClass={cs.CV}
}