peinture  by Amery2010

AI image generation framework with multiple providers

Created 1 month ago
491 stars

Top 63.0% on SourcePulse

GitHubView on GitHub
Project Summary

A general-purpose AI image generation framework, Peinture offers a user-friendly, dark-themed interface for creating high-quality images from text prompts. It targets both end-users seeking an accessible AI art tool and developers interested in a flexible, self-hostable solution. The primary benefit is seamless integration with multiple leading AI providers, enhancing creative possibilities and providing stable access through user-managed API tokens.

How It Works

Peinture is a static Single Page Application built with React, TypeScript, and Tailwind CSS. It acts as a frontend client, interfacing with generative AI models via Hugging Face Inference API, Gitee AI API, and Model Scope API. Its core advantage lies in its multi-provider architecture, allowing users to switch between ecosystems and leverage diverse models. It incorporates intelligent auto-translation for non-English prompts and an AI-powered prompt enhancer to generate more detailed, cinematic descriptions, optimizing output quality.

Quick Start & Requirements

  • Primary Install/Run: Clone the repository, cd peinture, npm install, then npm run dev to start the development server.
  • Prerequisites: Node.js (v18 or higher), npm/yarn/pnpm.
  • Deployment: Easily deployable as a static SPA on platforms like Vercel (recommended), Cloudflare Pages, or any static CDN. Server configuration to redirect 404s to index.html is necessary for client-side routing.
  • Configuration: API tokens for Hugging Face (optional), Gitee AI (required), and Model Scope (required) are configured in the app's Settings menu and stored locally in the browser.

Highlighted Details

  • Triple AI Providers: Seamlessly integrates Hugging Face, Gitee AI, and Model Scope.
  • Multi-Model Support: Access to models like Z-Image Turbo, Qwen Image, FLUX.1/2, Ovis Image.
  • Prompt Enhancement: Auto-translation and AI prompt optimization (via Pollinations.ai, DeepSeek).
  • Advanced Controls: Fine-tune generation with inference steps, seed, guidance scale, and HD Mode.
  • History Gallery: Automatically saves generated images locally in browser LocalStorage.
  • 4x Resolution Upscaling: Available exclusively via the Hugging Face provider.
  • Multilingual: Supports English and Chinese interfaces.
  • Privacy Focused: All user data, including tokens and history, is stored client-side.

Maintenance & Community

The project is actively maintained by Amery2010. Contributions are welcomed via pull requests. A GitHub Actions workflow is provided to help keep forks synchronized with the upstream repository. No specific community channels (like Discord/Slack) are mentioned in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license is highly permissive, allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Generation quality and availability are dependent on the external AI provider APIs and their respective quotas, though user-provided tokens mitigate this. Image history and API tokens are stored solely in the browser's LocalStorage, meaning they are not persistent across different browsers or devices and can be lost if browser data is cleared. 4x resolution upscaling is restricted to the Hugging Face provider.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of "Artificial Intelligence: A Modern Approach"; Research Director at Google).

NanoBananaEditor by markfulton

1.8%
570
Advanced AI image generation and editing platform
Created 4 months ago
Updated 3 months ago
Feedback? Help us improve.