Skip to content

Repository files navigation

🎨 AI Image & Video Generator

Production-ready AI generation system optimized for NVIDIA RTX 3050

Generate stunning images locally on your GPU and create videos using free cloud APIs. No subscription required!

Python 3.10 PyTorch License


✨ Features

🎨 Text-to-Image Generation (Local)

  • Unlimited free generations using your RTX 3050
  • Fast: 15-30 seconds per image
  • Quality: Up to 768x768 resolution
  • Optimized: Memory-efficient for 4-8GB VRAM
  • Customizable: Control every aspect of generation

🎬 Text-to-Video Generation (Cloud)

  • Free tier available via Replicate API (~50 videos/month)
  • Completely free via Hugging Face Spaces (slower)
  • Multiple models: Choose between different video generators
  • 2-5 second clips with customizable settings

🖼️ Image-to-Video (Cloud)

  • Animate your images into short video clips
  • Multiple animation styles and effects
  • Camera movements: zoom, pan, rotate
  • Smooth transitions and professional quality

⚡ Advanced Features

  • Modern web interface with Gradio
  • Real-time generation status
  • Batch processing support
  • Seed control for reproducible results
  • Negative prompts for better quality
  • Multiple aspect ratios
  • Easy upscaling integration

🖥️ System Requirements

Component Specification
GPU NVIDIA RTX 3050 (4-8GB VRAM)
RAM 16GB minimum
Storage 20GB free space
OS Windows 10/11
Python 3.10.x
CUDA 11.8

🚀 Quick Start

1️⃣ Install Dependencies

# Install Python 3.10 from python.org
# Install CUDA 11.8 from nvidia.com

# Install PyTorch with CUDA
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

# Install application requirements
pip install -r requirements.txt

2️⃣ Run the Application

Windows:

start.bat

Or manually:

python app.py

3️⃣ Open in Browser

Navigate to: http://localhost:7860

That's it! Start generating 🎉


📖 Detailed Setup

For complete setup instructions, see SETUP_GUIDE.md

Includes:

  • Step-by-step installation
  • GPU driver setup
  • Troubleshooting guide
  • Performance optimization tips
  • Example prompts

🎯 Usage Examples

Text-to-Image

Prompt: "a beautiful mountain landscape at sunset, golden hour lighting, 
         highly detailed, 8k quality, dramatic clouds"

Negative: "ugly, blurry, low quality, distorted"

Settings:
- Resolution: 512x512
- Steps: 25
- Guidance: 7.5
- Seed: -1 (random)

Result: Stunning landscape image in 20 seconds ⚡

Text-to-Video

Prompt: "a cat walking on the beach, ocean waves, sunny day, 
         realistic footage, cinematic"

Duration: 3 seconds
Method: Replicate API

Result: Smooth 3-second video clip 🎬

Image-to-Video

Upload: Generated landscape image
Prompt: "camera slowly zooming in, cinematic movement"

Result: Animated landscape with camera motion 🎥


🎨 Web Interface

The application features a modern, intuitive web interface:

Main Sections

  1. Text-to-Image Tab

    • Prompt input with suggestions
    • Advanced settings (resolution, steps, guidance)
    • Real-time generation progress
    • Image preview and download
  2. Text-to-Video Tab

    • Choose between Replicate API or Hugging Face
    • Video prompt with style presets
    • Duration and quality settings
    • Status tracking and download
  3. Image-to-Video Tab

    • Upload images from disk or use generated ones
    • Animation prompt and effects
    • Preview and export options
  4. Settings Tab

    • System information
    • Performance monitoring
    • API configuration
    • Model management

⚙️ Configuration

Edit config.ini to customize:

[MODEL]
model_id = runwayml/stable-diffusion-v1-5
precision = float16

[DEFAULTS]
default_width = 512
default_height = 512
default_steps = 25

[SERVER]
port = 7860
share = False  # Set True for public link

🎓 Pro Tips

For Best Image Quality:

  1. Use detailed prompts with style keywords
  2. Add negative prompts to avoid unwanted elements
  3. Set guidance scale to 7-10 for most prompts
  4. Use 25-30 steps for good quality/speed balance
  5. Try different seeds for variations

For Faster Generation:

  1. Keep resolution at 512x512
  2. Reduce steps to 20
  3. Close other GPU-intensive apps
  4. Enable xformers if available

For 4K Output:

  1. Generate at 768x768
  2. Upscale with online tools:
  3. Or use local upscaling (RealESRGAN)

🔧 Advanced Features

Batch Generation

Generate multiple variations:

# Run with different seeds
seeds = [42, 123, 456, 789]
for seed in seeds:
    generate_image(prompt, seed=seed)

Style Transfer

Combine prompts with style keywords:

base_prompt = "a beautiful garden"
styles = [
    "oil painting style",
    "anime style",
    "photorealistic",
    "watercolor painting"
]

Negative Prompts Library

Common negative prompts to improve quality:

ugly, blurry, low quality, distorted, bad anatomy, disfigured,
deformed, mutation, extra limbs, watermark, text, signature,
worst quality, jpeg artifacts

📊 Performance Benchmarks

RTX 3050 (4GB VRAM):

Resolution Steps Time per Image
512x512 20 15-20 sec
512x512 25 20-25 sec
768x768 25 40-50 sec

Memory Usage:

  • Model loading: ~3.5GB VRAM
  • Generation: ~4.0-4.5GB VRAM
  • Peak: ~5GB VRAM (with xformers)

🐛 Troubleshooting

Common Issues

"CUDA out of memory"

# Solution 1: Reduce resolution
Settings → Width/Height → 512x512

# Solution 2: Reduce batch size
config.ini → batch_size = 1

# Solution 3: Close other apps
Task Manager → Close GPU-intensive apps

"Model download failed"

# Check internet connection
# Disable VPN if active
# Verify disk space (need 20GB)
# Try manual download:
python -c "from diffusers import StableDiffusionPipeline; 
           StableDiffusionPipeline.from_pretrained('runwayml/stable-diffusion-v1-5')"

"No module named 'torch'"

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

For more issues, see SETUP_GUIDE.md


🔄 Updates & Roadmap

Current Version: 1.0

Planned Features:

  • Local video generation (if VRAM allows)
  • ControlNet integration
  • LoRA model support
  • Inpainting & outpainting
  • Batch processing UI
  • API endpoint for external apps
  • Mobile app integration

📝 License

MIT License - See LICENSE file for details


🤝 Contributing

Contributions welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Improve documentation

🙏 Acknowledgments

Built with:


📧 Support

Having issues? Check:

  1. SETUP_GUIDE.md - Complete setup instructions
  2. Troubleshooting section above
  3. GitHub Issues

🎉 Start Creating!

python app.py

Open: http://localhost:7860

Generate amazing AI art in seconds! 🚀


Made with ❤️ for creators using RTX 3050

About

AI Image & Video Generator optimized for RTX 3050. Generate images locally, create videos via API, with built-in 4K upscaling.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages