An AI-powered T-shirt design generator using the FLUX model with various LoRA adaptations to create custom designs based on text descriptions.
- Generate custom T-shirt designs using different AI style models.
- Support for multiple LoRA models:
- Latent Pop Style
- Text Poster Style
- Logo Design Style
- User-friendly web interface powered by Gradio.
- High-resolution output (1024x1024).
- PNG download support.
- Real-time style preview.
- Python 3.11 or higher.
- CUDA-compatible GPU (recommended).
- 8GB+ GPU VRAM.
-
Clone the repository:
git clone https://github.com/yourusername/t-shirt-generator.git cd t-shirt-generator
-
Create and activate a virtual environment:
conda create -n TshirtGen python=3.11 conda activate TshirtGen
-
Install the required packages:
pip install -r requirements.txt
-
Start the Gradio web interface:
python app.py
-
Open your browser and navigate to
http://localhost:7860
. -
Using the interface:
- Enter your design description in the "Content Print on Garment" field.
- Select a LoRA model style from the dropdown menu.
- Click "Generate" to create your design.
- Download the generated image using the download button.
-
Latent Pop Style
- Trigger:
LNTP
- Best for: Artistic and pop-art style designs.
- Trigger:
-
Text Poster Style
- Trigger:
Text poster
- Best for: Typography and text-based designs.
- Trigger:
-
Logo Design Style
- Trigger:
wablogo
,logo
,Minimalist
- Best for: Minimalist logo designs.
- Trigger:
├── app.py # Gradio web interface
├── infer_flux.py # FLUX model inference code
├── requirements.txt # Python dependencies
├── outputs/ # Generated images directory
└── README.md # Project documentation
Key parameters can be modified in infer_flux.py
:
- IMAGE_HEIGHT: Output image height (default: 1024).
- IMAGE_WIDTH: Output image width (default: 1024).
- GUIDANCE_SCALE: Generation guidance scale (default: 0.8).
- NUM_INFERENCE_STEPS: Number of inference steps (default: 30).
Contributions are welcome! Feel free to submit a pull request.
[Specify your license here]
- Black Forest Labs for the FLUX model.
- Jake Dahn for the Latent Pop LoRA.
- Shakker Labs for Text Poster and Logo Design LoRAs.