An interactive Streamlit app for generating and editing human faces using Stable Diffusion models!
Customize features like age, smile intensity, eye color, and hair color β all in a beautiful web UI.
This project can also be used to quickly generate composite images of criminals based on witness descriptions.
You can create a realistic base face using text prompts, then fine-tune features like age, smile, eye color, and hair color as needed to closely match the witness account β allowing fast and flexible image generation for investigative purposes.
- Generate photorealistic portraits from simple text prompts.
- Edit the generated image dynamically:
- Change Age
- Adjust Smile intensity
- Modify Eye Color
- Alter Hair Color
- CUDA GPU acceleration supported (falls back to CPU if unavailable).
- Modern dark-themed UI with smooth user interactions.
- State management for reverting to the original image anytime.
- Expose your app to the web easily using ngrok.
- Streamlit β For the interactive UI
- Diffusers (Hugging Face) β Stable Diffusion model
- PyTorch β Backend deep learning engine
- Pillow (PIL) β Image processing
- ngrok β Publicly share your local Streamlit app
- Select a prompt and generate an initial face.
- Use sidebar sliders and dropdowns to tweak attributes.
- Click "Edit Image" to apply changes.
- Click "Revert" anytime to return to the original generation.
- The app features customized Streamlit CSS to enhance aesthetics:
- Dark mode background
- Styled buttons
- Highlighted sliders and image borders
- Pull requests are welcome! Feel free to open an issue if you find a bug or want a new feature.
- This project is licensed under the MIT License.
- Feel free to use, modify, and share!
| Generate Base Image | Edit Features |

.webp)
.webp)
.webp)