Image editing via prompt manipulation, based on attention control
Top 14.8% on sourcepulse
This repository provides an implementation of Prompt-to-Prompt, a method for editing images generated by diffusion models like Stable Diffusion and Latent Diffusion. It allows users to modify text prompts to achieve specific image edits, such as replacing objects, refining details, or re-weighting concepts, targeting researchers and practitioners in generative AI.
How It Works
The core mechanism involves intercepting and modifying attention maps within the diffusion model's U-Net architecture during the image generation process. By implementing an AttentionControl
abstract class, users can define custom logic to alter attention weights based on prompt edits. This approach enables fine-grained control over how different parts of the prompt influence the generated image, offering advantages in edit specificity and controllability.
Quick Start & Requirements
requirements.txt
.prompt-to-prompt_ldm
and prompt-to-prompt_stable
notebooks.Highlighted Details
cross_replace_steps
and self_replace_steps
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 year ago
Inactive