Views
No views yet
1import torch
2from diffusers import DiffusionPipeline
3
4pipeline = DiffusionPipeline.from_pretrained(
5 "jiuntian/gligen-xl-512", trust_remote_code=True, torch_dtype=torch.float16
6).to("cuda")
7
8prompt = "An image of grassland with a dog."
9
10# Image generation with GLIGEN
11output_images = pipeline(
12 prompt,
13 num_inference_steps=50,
14 height=512, width=512,
15 gligen_scheduled_sampling_beta=0.4,
16 gligen_boxes=[[0.1, 0.6, 0.3, 0.8]],
17 gligen_phrases=["a dog"],
18 num_images_per_prompt=1,
19 output_type="pt"
20).images@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}
}@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)},
}