LLM-powered prompt optimization for Stable Diffusion with LoRA-enhanced image generation.
Turn natural language into high-quality AI-generated images.
AutoPrompt2Image is an end-to-end pipeline that leverages a LLaMA-based language model to transform raw user input into high-quality, diffusion-ready prompts, and generates images using a LoRA fine-tuned Stable Diffusion model.
- 🔹 Automatic Prompt Engineering via LLaMA
- 🔹 LoRA Fine-tuned Stable Diffusion for style consistency
- 🔹 End-to-End Text-to-Image Pipeline
- 🔹 Custom Dataset Training Support
- 🔹 Modular Design (easy to extend or replace components)
User Input
↓
LLaMA (Prompt Optimization)
↓
Optimized Prompt
↓
LoRA Stable Diffusion
↓
Generated Image
git clone https://github.com/J-damn649/AutoPrompt2Image.git
cd AutoPrompt2Image
pip install -r requirements_genimage.txt
pip install -r requirements_gendata.txtpython scripts/main.py --prompt "a cat in van gogh style"AutoPrompt2Image/
│── scripts/ # inference / entry scripts
│── models/ # model checkpoints (not included)
│── trainer/ # training code (LoRA, SFT)
│── dataset/ # training data (not included)
│── outs/ # generated images
│── requirements_gendata.txt
│── requirements_genimage.txt
│── README.md
- User provides a natural language description
- LLaMA refines it into a structured prompt
- Prompt is fed into Stable Diffusion
- LoRA enhances style and consistency
- Final image is generated
- Stable Diffusion
- HuggingFace Diffusers
- LLaMA / Transformers
- PEFT (LoRA)
Give it a star ⭐ on GitHub!


