A sleek, dark-themed AI image generator built with React, TypeScript, and Tailwind CSS. This application leverages powerful generative models from Hugging Face, Gitee AI, Model Scope, and A4F to create high-quality images from text prompts in seconds.



GPT Image 2, Nano Banana 2, Z-Image Turbo, Qwen Image, Ovis Image, FLUX.1 Schnell/Dev/Krea, FLUX.2.OpenAI 5.4, Gemini 3.1 Pro, DeepSeek V4, Qwen 3.bash
git clone https://github.com/Amery2010/peinture.git
cd peinture
bash
npm install
bash
npm run dev
http://localhost:5173.This project is a static Single Page Application (SPA), making it easy to deploy on any platform that supports static hosting.
Vercel is optimized for frontend frameworks and requires zero configuration.
bash
npm i -g vercel
bash
vercel
npm run build and the output directory to dist.Alternatively, via the Vercel Dashboard:
Vite.Cloudflare Pages is the best way to host static assets on the Cloudflare network.
Vitenpm run builddistTo host on any standard web server or CDN:
bash
npm run build
This will generate a dist folder containing index.html and bundled assets.
Upload the contents of the dist folder to your server's public root directory (e.g., /var/www/html or an S3 bucket).
Important for SPAs: Ensure your server is configured to redirect all 404 requests to index.html so that React Router (if added in the future) or client-side logic handles the routing.
We provide an official, lightweight Docker image to easily deploy Peinture on your own server. The built-in Nginx securely handles SPA routing and image CORS proxying.
Using Docker Run:
docker run -d -p 80:80 --name peinture ghcr.io/amery2010/peinture:latest
Using Docker Compose:
Create a docker-compose.yml file:
version: "3.8"
services:
peinture:
image: ghcr.io/amery2010/peinture:latest
container_name: peinture-app
ports:
- "80:80"
restart: unless-stopped
Then start the service:
docker-compose up -d
Your app will be available at http://localhost.
You can configure API tokens in the app's Settings menu.
The application works out-of-the-box using public quotas. However, for heavy usage or during peak times, providing your own token is recommended.
To use the Gitee AI provider, you must provide an API token.
To use the Model Scope provider, you must provide an API token.
To use the A4F provider, you must provide an API token.
Tokens are stored securely in your browser's localStorage and are strictly used to authenticate requests to the respective Inference endpoints.
To save your creations to the cloud:
Q: Is this service free to use? A: Yes, this project is completely free. It defaults to using public API quotas. Due to potential limits on public quotas during peak times, you can configure your own Hugging Face token in the settings for a more stable generation experience and higher usage quotas. Gitee AI and Model Scope require you to provide a token to use their free quotas.
Q: Is my data and privacy safe? A: Absolutely. We prioritize privacy. All generation history, settings, and tokens are stored locally in your browser (LocalStorage). We do not have a backend database, and we do not collect your personal usage data. Please note: Generated images are kept for 24 hours, so be sure to download your favorites. Prompt history is temporary and clears when you close the page.
Q: How does the multi-token system work? A: You can enter multiple tokens separated by commas. The system automatically creates a pool. If the current token exhausts its daily quota, the system will automatically mark it as exhausted for the day and seamlessly switch to the next available token, ensuring your creation is uninterrupted. This mechanism applies to Hugging Face, Gitee AI, and Model Scope.
Q: Which services power this app? A: Image generation for Hugging Face is powered by Hugging Face, and prompt optimization is provided by Pollinations.ai. Image generation and prompt optimization for Gitee AI are provided by Gitee AI. Image generation and prompt optimization for Model Scope are provided by Model Scope.
Q: What is Live Motion? A: The Live feature transforms static images into dynamic short videos. By leveraging advanced Image-to-Video models (such as Wan2.2), the AI analyzes the scene's composition to generate natural motion and cinematic effects, bringing your creation to life. Currently, only Hugging Face and Gitee AI are supported.
Q: How does the Image Editor work? A: The Image Editor allows you to modify existing images using AI. You can draw on a transparent layer (using Brush or Rectangle tools) to indicate where you want changes, then provide an AI command. The system merges your drawings with the original image and sends them to the Qwen-Image-Edit model. You can also upload up to 3 reference images to guide the AI's artistic style or content.
Q: Can I host this myself? A: Yes! This is an open-source project licensed under MIT. You can fork the repository from GitHub and deploy it to Vercel, Cloudflare Pages, or any static hosting service.
If you have forked this project, you can use GitHub Actions to automatically sync your repository with the original repository.
.github/workflows/sync.yml.name: Upstream Sync
permissions:
contents: write
on:
schedule:
- cron: "0 0 * * *" # Run every day at 00:00 UTC
workflow_dispatch: # Allow manual triggering
jobs:
sync_latest_from_upstream:
name: Sync latest commits from upstream repo
runs-on: ubuntu-latest
if: ${{ github.event.repository.fork }}
steps:
# Step 1: run a standard checkout action
- name: Checkout target repo
uses: actions/checkout@v3
# Step 2: run the sync action
- name: Sync upstream changes
id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
with:
upstream_sync_repo: Amery2010/peinture
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # Automatically generated, no need to set
# Set test_mode true to run tests instead of the true action!!
test_mode: false
- name: Sync check
if: failure()
run: |
echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork."
exit 1
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)You can ask questions or share your thoughts and needs regarding Peinture in these communities.
Distributed under the MIT License.
$ claude mcp add peinture \
-- python -m otcore.mcp_server <graph>