Skip to content

sarthakawsthi7/Text-to-Image-Generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text-to-Image Generation with Stable Diffusion

Project Overview

This project enables Text-to-Image Generation using Stable Diffusion with ComfyUI and LoRA Checkpoints, integrated seamlessly with a Flask-based API. It allows users to generate high-quality AI-generated images based on text prompts.


✨ Features

🖼 Stable Diffusion for high-quality image synthesis

🎨 ComfyUI Integration for advanced workflow customization

🔗 LoRA Checkpoints support for fine-tuned models

🌐 Flask API for seamless web-based interaction

📸 Sample Image Previews for generated outputs

📷 Sample Images

Below are some AI-generated images using the project:

WhatsApp Image 2025-03-30 at 02 54 53_e5b8c023

ComfyUI workflows integrated with Flask

unnamed unnamed unnamed

🔧 Installation & Setup

1️⃣ Clone the Repository git clone https://github.com/yourusername/text-to-image-flask.git cd text-to-image-flask

2️⃣ Install Dependencies pip install -r requirements.txt

Ensure you have Python installed, then run:

pip install -r requirements.txt

3️⃣ Download Stable Diffusion Checkpoints & LoRAs

Place Stable Diffusion model files in models/Stable-diffusion/

Place LoRA Checkpoints in models/Lora/

4️⃣ Run the Flask Server

python app.py

The server will be available at http://127.0.0.1:5000/

📡 API Usage

Endpoint: Generate Image

URL: POST /generate

Request Example:

{ "prompt": "A futuristic city at night, cyberpunk style", "steps": 50, "guidance_scale": 7.5 }

Response Example:

{ "image_url": "/static/generated/image_12345.png" }

🛠 Technologies Used

Stable Diffusion - AI Image Generation Model

ComfyUI - Visual workflow for Stable Diffusion

LoRA - Lightweight model finetuning

Flask - Python web framework

Python - Backend scripting

🎯 Future Enhancements

🔹 Implement Web UI for real-time image generation

🔹 Support for different AI models (SDXL, SD 2.1, etc.)

🔹 Cloud deployment for wider accessibility

About

Text-to-image Generator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published