Prompt-to-Prompt is a research codebase that demonstrates how to edit images generated by diffusion models using only changes to the text prompt. Instead of retraining or heavy fine-tuning, it manipulates the model’s cross-attention maps so the structure of the original image is largely preserved while semantics shift according to the revised prompt. The method supports gentle edits (e.g., style, color, lighting) as well as stronger semantic substitutions, and it can localize edits to specific words or regions by selectively updating attention. Because edits are steerable via prompt wording and token weighting, creators can iterate quickly, exploring variations without losing composition. The repository includes reference notebooks and scripts that plug into popular latent diffusion backbones, making it practical to try the technique on your own prompts and seeds. It’s especially useful for workflows that need consistent framing, product shots, illustrations, and concept art, etc.
Features
- Cross-attention control to preserve structure while changing semantics
- Word-level editing that localizes changes to specific concepts
- Strength knobs for subtle style tweaks or bold replacements
- Compatibility with common latent diffusion checkpoints
- Deterministic seeds to reproduce and iterate on the same composition
- Notebook demos for rapid experimentation without retraining