4o-ghibli-at-home  by TheAhmadOsman

Local AI photo stylizer for artistic transformations

Created 2 months ago
474 stars

Top 64.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a self-hosted, private AI photo stylizer for users to transform images with various artistic styles, including Ghibli-inspired aesthetics. It targets users prioritizing privacy and local processing, offering a high-performance solution without cloud reliance.

How It Works

The application leverages a modern web UI built with a single-page application architecture, featuring custom style profiles, undo/redo functionality, and advanced controls. It utilizes the black-forest-labs/FLUX.1-Kontext-dev model augmented with DFloat11 quantization, which significantly reduces VRAM requirements by approximately 30% without compromising quality. This allows the full, lossless model to run on high-end consumer GPUs. The backend is a streamlined Flask server with an in-memory, thread-safe queue for asynchronous job processing, eliminating the need for external queueing systems like Redis or Celery.

Quick Start & Requirements

  • Install/Run:
    git clone https://github.com/TheAhmadOsman/4o-ghibli-at-home.git
    cd 4o-ghibli-at-home
    uv venv .venv --python 3.12
    source .venv/bin/activate
    uv sync
    cp .env_template .env
    python3.12 app.py
    
  • Prerequisites: Python 3.11+, uv, NVIDIA GPU with ~21GB VRAM (for DFloat11), modern web browser. Hugging Face token required for gated models.
  • Setup Time: Minimal, assuming prerequisites are met.
  • Links: Project Repository

Highlighted Details

  • Offers dozens of built-in style profiles and custom profile management.
  • Efficient VRAM usage via DFloat11 quantization, enabling consumer GPU use.
  • Local storage for images and jobs with automatic cleanup.
  • Simplified architecture with an in-memory task queue.

Maintenance & Community

  • Primarily maintained by TheAhmadOsman.
  • Support via GitHub issues for bugs, help, and feature requests.

Licensing & Compatibility

  • Licensed under GNU Affero General Public License v3.0 (AGPLv3).
  • Non-Commercial Use Only: Commercial use requires an explicit written license from the author.
  • AGPLv3 requires derivative works deployed publicly to also be open-sourced under AGPLv3.

Limitations & Caveats

  • Currently Linux-only; Windows support is planned.
  • Requires significant VRAM (~21GB) for the current implementation, though future GGUF and advanced quantization support aims to lower this.
  • AGPLv3 license restricts commercial use and requires derived works to be open-sourced.
Health Check
Last Commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
20 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.