← Back to Discover

Big Sleep

Command-line tool that turns a text prompt into an image by pairing OpenAI's CLIP with a BigGAN, installable with pip and run on your own GPU.

Image generationCommand-line tools

What it does

Big Sleep is a small open-source command-line tool for generating images from written descriptions. It combines OpenAI's CLIP with the generator from a BigGAN, and the repository wraps that technique so anyone with a GPU can run it. After installing it with pip, you run a one-line command such as dream followed by a phrase, and the images are saved to the folder where you ran it. It can also be called from Python code, where you can set the learning rate and how often progress images are saved. You can train on several phrases at once by separating them with a bar, and list phrases to steer away from. Options include saving progress images, saving the best-scoring image, using a larger vision model if you have enough memory, and limiting the number of BigGAN classes for extra stability. The repository is released under the MIT license. It notes that the GAN often drifts into noise, which is why the best-image option exists.

Capabilities

  • Text-to-image from a one-line terminal command
  • Python interface for use inside your own code
  • Combine several prompts, or penalize unwanted ones
  • Save progress images or only the best-scoring result
  • Optional larger vision model for better output

When to use it

  • You have a GPU and want to experiment with CLIP-guided image generation locally
  • You want a simple scriptable text-to-image tool rather than a hosted service

Alternatives to explore

  • Deep Daze