Controllable Text-to-Image Generation with GPT-4

Tianjun Zhang, Yi Zhang, Vibhav Vineet, Neel Joshi, Xin Wang
5/29/2023
cs.CVcs.AI

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Current text-to-image generation models often struggle to follow textual instructions, especially the ones requiring spatial reasoning. On the other hand, Large Language Models (LLMs), such as GPT-4, have shown remarkable precision in generating code snippets for sketching out text inputs graphically, e.g., via TikZ. In this work, we introduce Control-GPT to guide the diffusion-based text-to-image pipelines with programmatic sketches generated by GPT-4, enhancing their abilities for instruction following. Control-GPT works by querying GPT-4 to write TikZ code, and the generated sketches are used as references alongside the text instructions for diffusion models (e.g., ControlNet) to generate photo-realistic images. One major challenge to training our pipeline is the lack of a dataset containing aligned text, images, and sketches. We address the issue by converting instance masks in existing datasets into polygons to mimic the sketches used at test time. As a result, Control-GPT greatly boosts the controllability of image generation. It establishes a new state-of-art on the spatial arrangement and object positioning generation and enhances users' control of object positions, sizes, etc., nearly doubling the accuracy of prior models. Our work, as a first attempt, shows the potential for employing LLMs to enhance the performance in computer vision tasks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2023controllable,
  title  = {Controllable Text-to-Image Generation with GPT-4},
  author = {Tianjun Zhang and Yi Zhang and Vibhav Vineet and Neel Joshi and Xin Wang},
  year   = {2023},
  eprint = {2305.18583},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.18583v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.18583.svg)](https://codeofpaper.com/paper/2305.18583)

Discussion