🚀 SDXL版GLIGEN适配器项目
本项目旨在借助Hugging Face风格的管道,支持SDXL版本的GLIGEN适配器。该项目是创建InteractDiffusion XL工作的一部分。更多详细信息请访问Github仓库。
📦 安装信息
属性 |
详情 |
数据集 |
jiuntian/sa1b-sdxl-latents-1024、jiuntian/sa-1b_boxes_sdxl |
基础模型 |
stabilityai/stable-diffusion-xl-base-1.0 |
管道标签 |
text-to-image |
库名称 |
diffusers |
许可证 |
apache-2.0 |
✨ 主要特性
IGLIGEN在Diffusers框架上复现了GLIGEN,并使训练过程更易于复现。他们已经发布了适用于SD v1.4/v1.5、SD v2.0/v2.1的代码和预训练权重,但对SDXL的支持仍备受期待。本仓库开源了适用于SDXL的GLIGEN适配器的预训练权重,以及Diffusers管道和训练代码。我们感谢GLIGEN和IGLIGEN的作者们所做的工作。
💻 使用示例
基础用法
import torch
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained(
"jiuntian/gligen-xl-1024", trust_remote_code=True, torch_dtype=torch.float16
).to("cuda")
prompt = "An image of grassland with a dog."
output_images = pipeline(
prompt,
num_inference_steps=50,
height=1024, width=1024,
gligen_scheduled_sampling_beta=0.4,
gligen_boxes=[[0.1, 0.6, 0.3, 0.8]],
gligen_phrases=["a dog"],
num_images_per_prompt=1,
output_type="pt"
).images
📚 详细文档
本仓库(IGLIGEN - XL)的作者与GLIGEN和IGLIGEN的作者没有关联。由于IGLIGEN - XL基于GLIGEN和IGLIGEN,如果你使用IGLIGEN - XL的代码或适配器,请考虑引用原始的GLIGEN和IGLIGEN论文:
@article{li2023gligen,
title={GLIGEN: Open-Set Grounded Text-to-Image Generation},
author={Li, Yuheng and Liu, Haotian and Wu, Qingyang and Mu, Fangzhou and Yang, Jianwei and Gao, Jianfeng and Li, Chunyuan and Lee, Yong Jae},
journal={CVPR},
year={2023}
}
@article{lian2023llmgrounded,
title={Llm-grounded diffusion: Enhancing prompt understanding of text-to-image diffusion models with large language models},
author={Lian, Long and Li, Boyi and Yala, Adam and Darrell, Trevor},
journal={arXiv preprint arXiv:2305.13655},
year={2023}
}
该项目是创建InteractDiffusion XL工作的一部分。
如果你使用IGLIGEN - XL的代码/训练权重,请考虑引用InteractDiffusion:
@inproceedings{hoe2023interactdiffusion,
title={InteractDiffusion: Interaction Control in Text-to-Image Diffusion Models},
author={Jiun Tian Hoe and Xudong Jiang and Chee Seng Chan and Yap-Peng Tan and Weipeng Hu},
year={2024},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
}