← all repositories
lucidrains/deep-daze

Generating images by nagging CLIP with Siren nets

It turns text prompts into images by letting a Siren network and OpenAI's CLIP model argue until the pixels look right.

4.3k stars Python Image · Video · Audio
deep-daze
Not currently ranked — collecting fresh signals.
star history

What it does

Deep Daze is a command-line tool and Python library that generates images from text descriptions. It works by optimizing an implicit neural representation network called Siren, nudging its weights until OpenAI’s CLIP model decides the resulting pixels match your prompt. You can also prime the process with an existing image, optimize toward an image instead of text, or combine both inputs.

The interesting bit

Instead of using a standard GAN or diffusion model, it treats image generation as an optimization problem: the Siren network generates coordinates-to-colors, and CLIP provides the loss signal. The “story” mode is a neat trick for long texts—it slides a window across your prompt epoch by epoch, effectively turning a paragraph into an animated sequence because the full text exceeds CLIP’s 77-token limit.

Key highlights

  • Generates 512×512 images from text prompts using CLIP-guided Siren optimization
  • Supports image priming and image-to-image reinterpretation via --img and --start_image_path
  • “Story” mode breaks long texts into sliding windows to bypass CLIP’s 77-token cap
  • Exposes both a CLI (imagine) and a Python API (deep_daze.Imagine)
  • Scales from 4GB to 16GB+ VRAM by adjusting layers, batch size, and resolution

Caveats

  • Requires a dedicated Nvidia or AMD GPU; 16 GB VRAM is recommended and 4 GB is the absolute floor
  • Story mode requires manually enabling save_progress to actually view the sliding-window transitions
  • Quality scales almost linearly with layer count, so good results demand generous VRAM

Verdict

Worth a look if you want to experiment with CLIP-guided synthesis or need a lightweight, code-accessible text-to-image playground. Skip it if you lack a modern GPU or need production-grade, stable diffusion-level fidelity.

Frequently asked

What is lucidrains/deep-daze?
It turns text prompts into images by letting a Siren network and OpenAI's CLIP model argue until the pixels look right.
Is deep-daze open source?
Yes — lucidrains/deep-daze is open source, released under the MIT license.
What language is deep-daze written in?
lucidrains/deep-daze is primarily written in Python.
How popular is deep-daze?
lucidrains/deep-daze has 4.3k stars on GitHub.
Where can I find deep-daze?
lucidrains/deep-daze is on GitHub at https://github.com/lucidrains/deep-daze.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.