PainterLeaf
A free WebApp for Text2Image and Image2Text, supporting Multiple Models and both Chinese&English Prompt / 一个零成本的 AI 绘画 WebApp, 支持文生图, 图生文, 多模型, 中英双语提示词
Install / Use
npx skills add LeafYeeXYZ/PainterLeafInstalls into whichever agent you are using.
README
Please deploy your own server cause mine exceeds the free plan limit. (2025.03.18 I've added an optional "server password" feature to prevent unauthorized access.)
|
|
|
| :-----------------: | :-----------------: |
Painter Leaf
A image creator based on free Cloudflare AI and HuggingFace APIs. Features include:
- Prompt-to-image: supports a variety of models (e.g.
Flux.1、StableDiffusion 3.5) - Image-to-Prompt: convert local images to prompts
- AI Translation: use Chinese prompts in any model
- Store: save your creations to
IndexedDB


1 Deployment
1.1 Config Environment Variables
You can use either Fullstack or Client-Server mode and set the corresponding environment variables.
You may need to initialize
Cloudflare AIllama3.2 11B visionmodel before usingImage-to-Promptfeature. See here for more information.
1.1.1 Fullstack
Set following environment variables in .env file or Vercel.
| Key | Value | Required |
| :---------------: | :-------------------------------: | :------: |
| CF_USER_ID | Cloudflare user id | ✅ |
| CF_AI_API_KEY | Cloudflare AI api key | ✅ |
| HF_API_KEY | HuggingFace api key | |
| SERVER_PASSWORD | Password for accessing the server | |
The free plan of
Vercelhas a limit of 10s for each request, which may cause504error (especially when usingHuggingFacemodels). You can subscribe to aVercelpaid plan, run the server locally, or useClient-Servermode. <span id="vervel-limit-resolution"></span>
1.1.2 Client-Server
Deploy the server (see workers folder) to Cloudflare Workers and set following environment variables in .env file or Vercel.
| Key | Value | Required |
| :--------------------------: | :-----------------------------------------------: | :------: |
| NEXT_PUBLIC_WORKERS_SERVER | Server url (e.g. https://api.xxx.workers.dev) | ✅ |
Once
NEXT_PUBLIC_WORKERS_SERVERis set, all the other environment variables will be ignored.
1.2 Deploy to Vercel
Deploy this project to Vercel (remember to set environment variables when deploying).
1.3 Common Issues
429error: You may have exceeded theHuggingFaceapi request limit. Please wait for a while, reduce the frequency of requests, and consider subscribing to a paid plan.504error: The request may have exceeded theVerceltime limit. See above for resolution.
2 Development
2.1 Clone the repository
git clone https://github.com/LeafYeeXYZ/PainterLeaf.git
cd PainterLeaf
2.2 Install dependencies
bun install # or use other package manager you like
2.3 Local Development
bun run dev
2.4 Build
bun run build
Related Skills
imsg
385.5kUse the imsg CLI from OpenClaw agents for iMessage/SMS DMs, groups, replies, reactions, polls, watching, and private-API actions.
Writing Hookify Rules
140.7kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Agent Development
140.7kThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or…
agent-tui
106.4kMain Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications programmatically for testing, automation, and inspection
