RoseKhlifa/Image-Studio
About
Open-source desktop client for image generation and editing with image2. SSE streaming keep-alives; handles Cloudflare 524/504 timeout interruptions. Built with Wails (Go + React/TS). All data stays 100% local.
Design & MediaWhat you can do
- Anti-timeout keepalive: the Responses API runs over HTTP SSE or WebSocket, and the Images API asks for streamed output by default. With finished images kept after a disconnect, automatic retries and a backup upstream, long generations rarely end in a 524 / 504.
- Canvas and editing: a Konva-based canvas with masked inpainting (when the upstream supports it), rectangle, arrow, brush and text annotations, and rotate, flip and crop. Shift-click a history image to compare it side by side, and undo or redo any canvas edit.
- Parameters and presets: aspect ratio, resolution, quality and output format in one place. Output PNG, JPEG or WebP, or animated GIF and SVG when the model supports them. Save common combinations as presets, and add your own aspect ratios.
- Batch and automation: on desktop, batch image-to-image works through a folder one image at a time. Loop generation keeps generating up to the total you set, at the concurrency you set, and can save every result to a folder automatically. A sound or a system notification tells you when a task finishes.
Measured star growth
- in 24h
- 0
- in 7 days
- +4
- in 15 days
- +3
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
Image Studio
轻量、跨平台的 AI 生图工作台
一个客户端连接 OpenAI、Google Gemini、Grok 与各类兼容中转
文生图、图生图、画布编辑、批量出图,Windows、macOS、Linux、Android 全平台可用
简体中文 · English
下载 · 核心特性 · 防超时保活 · 快速开始 · Image-Prompts · 交流群 · 文档

Image Studio 是一个开源的 AI 生图客户端,不绑定任何服务商。OpenAI 官方接口与兼容中转、Google Gemini、Grok / xAI 都可以直接接入,填好 BASE_URL、API Key 和模型就能开始文生图、图生图、蒙版重绘和批量出图。桌面端覆盖 Windows、macOS 和 Linux,移动端支持 Android 手机与平板,各平台的界面贴合各自系统的设计风格。
长时间的图像推理放在 Cloudflare、Nginx 后面,常常跑到一半就被 524 / 504 断开。Image Studio 从传输方式、连接保活、断线保图到自动重试和备用上游层层兜底,让长任务尽量跑完,详见防超时保活。
API Key、历史记录和图片都保存在本机,生成请求只会发往你自己配置的上游,详见隐私政策。
[!TIP] 配套项目 Image-Prompts:开源的中英双语提示词库,看中的提示词一键送进 Image Studio。
QQ 交流群
443136349:日常交流、经验分享、问题排查和测试版反馈,二维码见社区与反馈。
核心特性
- 一个客户端,接入主流图像接口:OpenAI 官方与兼容中转可选 Responses API 或 Images API;Google Gemini 使用原生 Interactions API,Grok / xAI 使用原生 Imagine API。提供 OpenAI 兼容图像接口的 Gemini、Imagen 等第三方中转同样可以接入。多套上游配置随时切换,每套可以单独设置并发上限和备用上游。
- 防超时保活:Responses API 支持 HTTP SSE 与 WebSocket 两种传输,Images API 默认请求流式返回,再加上断线保图、自动重试和备用上游,长时间推理不再轻易被 524 / 504 打断。
- 画布与编辑:基于 Konva 的画布,支持蒙版局部重绘(取决于上游)、矩形 / 箭头 / 画笔 / 文字标注,以及旋转、翻转、裁剪;按住 Shift 点击历史图可以左右分屏对比,画板操作都能撤销和重做。
- 参数与预设:比例、分辨率、质量和输出格式集中设置,支持 PNG、JPEG、WebP,模型支持时还能输出 GIF 动图和 SVG;常用组合可以存成预设,也可以添加自定义比例。
- 批处理与自动化:桌面端的图生图批处理按文件夹逐张处理;循环出图按设定的总张数和并发持续生成,并可自动保存到指定目录;任务完成后用提示音或系统通知提醒你。
- 提示词工具:内置模板与提示词历史,一键 AI 优化提示词,或者从画布上的图片反推提示词(使用一套 Responses API 配置);配合 Image-Prompts 可以把网页上的提示词一键送进桌面端。
- 工作区与历史:多个工作区标签页互不干扰;历史按日期分组,可以搜索、筛选、按原参数重新生成,也能导出为 JSON 迁移到其他设备。
- 多端与更新:Windows、macOS、Linux 与 Android 手机、平板,界面分别贴合 Fluent、macOS 和 Material 3 的设计风格。全平台支持应用内更新,更新信息带数字签名,安装包核对 SHA-256 后才会安装;Android 版还会自动备份上游配置和设置。
- 数据留在本机:不内置上游,没有统计埋点;桌面端的 API Key 保存在系统安全存储(Keychain、凭据管理器、Secret Service)里。
防超时保活
Cloudflare、Nginx 这类网关会主动断开长时间没有数据的连接(Cloudflare 默认约 100 秒),而一张高质量图片的推理常常比这更久。Image Studio 在每个环节都做了处理:
| 环节 | 做法 |
|---|---|
| 流式传输 | Responses API 通过 HTTP SSE 持续接收事件,连接上一直有数据,不会被网关当成空闲连接断开 |
| WebSocket 保活 | WebSocket 模式每 25 秒发送一次 Ping;连接意外中断时自动重连一次并重放本次生成;上游不支持 WebSocket 时自动改用 HTTP SSE |
| Images 流式返回 | Images API 默认请求流式返回(stream + partial_images),上游支持时生成过程中持续有数据 |
| 断线保图 | 最终图片已经收到、连接随后才断开时,照常保存这张图 |
| 自动重试 | 可重试的错误自动重试,默认 5 次、最多 10 次,每次间隔 15 秒 |
| 备用上游 | 重试仍然失败时,切到你指定的备用上游再试一次(默认关闭) |
| 并发上限 | 每套上游配置单独限制并发,避免一次提交太多任务把上游压垮 |
只提供标准图像接口、又不支持流式返回的上游,长推理仍有可能超时,排查方法见故障排除。
下载
到 Releases 下载最新版本:
| 平台 | 安装包 | 说明 |
|---|---|---|
| Windows | image-studio-<版本>-windows-installer.exe |
推荐。同时包含 x64 与 ARM64,安装时自动选择 |
| macOS | image-studio-<版本>-macos-universal.zip |
同时支持 Apple 芯片与 Intel |
| Linux | image-studio-<版本>-linux-amd64.tar.gzimage-studio-<版本>-linux-arm64.tar.gz |
需要 GTK 与 WebKitGTK |
| Android | image-studio-<版本>-android-release.apk |
手机和平板通用,按屏幕自动切换布局 |
Windows 便携版、MSIX、不依赖 WebView 的 Gio 原生版,以及抢先体验用的 CI 构建,见安装包说明。
[!NOTE] macOS 首次打开如果被 Gatekeeper 拦截,在 Finder 里右键选择「打开」,或者执行:
xattr -dr com.apple.quarantine "Image Studio.app"
[!IMPORTANT] Android 版从 1.4.0 起改用固定的签名证书。从 1.3.6 及更早版本升级时需要先卸载旧版,之后的版本可以直接在应用内更新。卸载前请先看 v1.4.0 发布说明。
目前没有在线 Web 版。仓库里的浏览器预览只用于前端调试,不能直接作为网页服务使用。
快速开始
安装后首次启动,会自动打开「上游配置」。
选择服务商,填写 BASE_URL、API Key 和模型 ID:
服务商 接口 BASE_URL OpenAI 及兼容中转 Responses API 或 Images API https://api.openai.com或中转站根地址Google Gemini 原生 Interactions API https://generativelanguage.googleapis.comGrok / xAI 原生 Imagine API https://api.x.aiOpenAI 及兼容上游还要选择 API 形态:上游支持 Responses API 时优先用它,长推理最稳;只提供标准图像接口时选 Images API。
点「测试连接」确认配置可用,然后保存。
输入提示词,选好比例、质量和输出格式,点「生成」或按
Ctrl + Enter(macOS 为Cmd + Enter)。
配置细节和参数策略见使用说明。
配套项目 Image-Prompts
Image-Prompts 是 Image Studio 的配套开源项目,一个中英双语的 AI 生图提示词库:收录社区投稿和公开整理的提示词,可以按分类、标签浏览和搜索。在提示词详情页点「Send to Image-Studio」,提示词就会送进 Image Studio 桌面端,确认后写入提示词编辑器。
- 仓库:RoseKhlifa/Image-Prompts
- 在线演示:prompts.sorry.ink
- 导入方式和平台支持:提示词导入
社区与反馈
欢迎加入 QQ 交流群 443136349,日常交流、使用经验分享、问题排查和测试版反馈都可以在群里聊。
扫码加入 QQ 交流群
Bug 和功能建议请提交到 GitHub Issues。很多「生成失败」「模型不可用」并不是客户端的问题,而是上游配置、Key 权限、网关超时或模型能力造成的。提 Issue 前请先:
- 在上游配置里点一次「测试连接」,确认 BASE_URL、API Key 和模型 ID 可用。
- 对照故障排除排查 524 / 504、401 / 403、
model not found等常见问题,并在历史详情或 raw 响应里看真实的状态码和报错。 - 同样的配置用 curl 或上游自带的调试页也失败时,请先联系上游服务商。
确认是客户端的问题后,按反馈渠道准备复现信息再提交。
文档
| 文档 | 内容 |
|---|---|
| 使用说明 | 首次配置、API 形态怎么选、参数策略 |
| 功能说明 | 完整功能清单、各平台能力、快捷键 |
| 应用展示 | 界面截图与能力概览 |
| 安装包说明 | 各平台安装包、命名规则、怎么选 |
| 图生图批处理 | 批处理入口、流程、输入输出规则 |
| 提示词导入 | 配套项目 Image-Prompts 与一键导入 |
| 输出格式 | GPT Image 2.6 的 PNG、JPEG、WebP、GIF、SVG 输出 |
| 比例 Auto 与分辨率 | 比例切到 Auto 后,分辨率为什么不能单独锁定 |
| 故障排除 | 数据存放位置、524 / 504、权限与字段兼容问题 |
| 隐私政策 | 数据存在哪里、什么时候会联网 |
| 反馈渠道 | 提 Issue 的方式、QQ 群 |
开发与维护文档
| 文档 | 内容 |
|---|---|
| 源码构建 | 构建、验证脚本、CI 产物 |
| 项目结构 | 仓库结构、前端分层、内核、Worker 与 Android 的关系 |
| 本地数据格式 | 历史和设置的数据库结构、目录布局、兼容规则 |
| 发版流程 | 发版步骤、签名、R2 镜像与应用内更新 |
| Android 壳层 | Android 壳层维护说明 |
| MuMu 模拟器调试 | 在 MuMu 模拟器里构建、安装和排错 |
| Gio 测试客户端 | Gio 原生 GUI 客户端 |
| 跨平台内核计划 | 跨平台内核的设计与验证背景 |
| 原始提示词策略 | 为什么按原始提示词生成 |
| 手工验证矩阵 | 真机与真实上游的手工验证 |
| Issue 进展 | 当前 issue 处理进展与待验证项 |
| 修复记录 2026-10-06 | 根因、维护约束和防回归检查 |
| 性能优化 2026-10-06 | 前后基准与复验方法 |
| 关单评论模板 | 可直接复用的 issue 关单评论 |
参与贡献
欢迎提交 Issue 和 Pull Request。桌面端基于 Wails(Go + React / TypeScript),Android 端是 Kotlin 编写的 WebView 壳层。动手之前建议先读源码构建和项目结构。
License
GNU AGPL v3.0 © 2026
这意味着基于本项目进行修改后再分发,或将修改版作为网络服务提供给他人使用时,都需要按同一许可证公开对应源码。
致谢
linux.do —— 感谢 L 站及其社区为项目开发与交流提供的支持与启发。
English
A lightweight, cross-platform AI image generation workbench.
Features · Anti-timeout keepalive · Download · Quick start · Image-Prompts · Community
Image Studio is an open-source AI image generation client that isn't tied to any provider. Connect OpenAI or an OpenAI-compatible relay, Google Gemini, or Grok / xAI, fill in the base URL, API key and model, and start generating: text to image, image to image, masked edits and batch runs. It runs on Windows, macOS and Linux, and on Android phones and tablets, with an interface that follows each platform's design.
Behind Cloudflare or Nginx, long image generations are often cut off halfway by a 524 / 504. Image Studio guards against this at every step, from the transport and connection keepalive to keeping finished images, automatic retries and a backup upstream. See anti-timeout keepalive.
API keys, history and images stay on your device, and generation requests go only to the upstreams you configure. See the privacy policy (in Chinese).
Features
- One client for the major image APIs: OpenAI and compatible relays through the Responses API or the Images API, Google Gemini through its native Interactions API, and Grok / xAI through its native Imagine API. Third-party Gemini, Imagen and other relays that offer an OpenAI-compatible image endpoint work too. Keep several upstream profiles and switch between them at any time; each one has its own concurrency limit and backup upstream.
- Anti-timeout keepalive: the Responses API runs over HTTP SSE or WebSocket, and the Images API asks for streamed output by default. With finished images kept after a disconnect, automatic retries and a backup upstream, long generations rarely end in a 524 / 504.
- Canvas and editing: a Konva-based canvas with masked inpainting (when the upstream supports it), rectangle, arrow, brush and text annotations, and rotate, flip and crop. Shift-click a history image to compare it side by side, and undo or redo any canvas edit.
- Parameters and presets: aspect ratio, resolution, quality and output format in one place. Output PNG, JPEG or WebP, or animated GIF and SVG when the model supports them. Save common combinations as presets, and add your own aspect ratios.
- Batch and automation: on desktop, batch image-to-image works through a folder one image at a time. Loop generation keeps generating up to the total you set, at the concurrency you set, and can save every result to a folder automatically. A sound or a system notification tells you when a task finishes.
- Prompt tools: built-in templates and prompt history, one-click AI prompt optimization, and prompts inferred from the image on the canvas (both use a Responses API profile). With Image-Prompts, send a prompt from the web to the desktop app in one click.
- Workspaces and history: workspace tabs that keep their own state. History is grouped by date; search and filter it, regenerate with the original parameters, or export it to JSON to move to another device.
- Every platform, kept up to date: Windows, macOS and Linux, and Android phones and tablets, styled after Fluent, macOS and Material 3. Every platform updates in the app: update information is signed, and each package is checked against its SHA-256 before it installs. The Android app also backs up upstream profiles and settings automatically.
- Your data stays local: no bundled upstream and no analytics. On desktop, API keys are kept in the system's secure storage (Keychain, Credential Manager, Secret Service).
Anti-timeout keepalive
Gateways such as Cloudflare and Nginx close connections that carry no data for too long (about 100 seconds by default on Cloudflare), and a high-quality image often takes longer than that. Image Studio handles it at every step:
| Step | What it does |
|---|---|
| Streaming | The Responses API receives events over HTTP SSE, so data keeps flowing and the gateway never sees an idle connection |
| WebSocket keepalive | WebSocket mode sends a ping every 25 seconds, reconnects once and replays the generation if the connection drops, and switches to HTTP SSE when the upstream doesn't support WebSocket |
| Streamed Images output | The Images API asks for streamed output (stream + partial_images) by default, so data flows during generation when the upstream supports it |
| Keep finished images | If the final image has arrived and the connection drops afterwards, the image is still saved |
| Automatic retries | Retryable errors are retried 5 times by default (up to 10), 15 seconds apart |
| Backup upstream | If the retries still fail, one more attempt goes to the backup upstream you chose (off by default) |
| Concurrency limit | Each upstream profile has its own concurrency limit, so a burst of tasks doesn't overload the upstream |
Upstreams that only offer the standard image endpoint, without streaming, can still time out on long generations. See troubleshooting (in Chinese).
Download
Get the latest version from Releases:
| Platform | Package | Notes |
|---|---|---|
| Windows | image-studio-<version>-windows-installer.exe |
Recommended. Contains both x64 and ARM64 and installs the right one |
| macOS | image-studio-<version>-macos-universal.zip |
Apple silicon and Intel |
| Linux | image-studio-<version>-linux-amd64.tar.gzimage-studio-<version>-linux-arm64.tar.gz |
Needs GTK and WebKitGTK |
| Android | image-studio-<version>-android-release.apk |
One APK for phones and tablets; the layout adapts to the screen |
For the Windows portable build, MSIX, the native Gio build that doesn't need a WebView, and preview CI builds, see the package guide (in Chinese).
[!NOTE] If Gatekeeper blocks the app the first time you open it on macOS, right-click it in Finder and choose Open, or run:
xattr -dr com.apple.quarantine "Image Studio.app"
[!IMPORTANT] From 1.4.0, the Android app is signed with a permanent certificate. To upgrade from 1.3.6 or earlier, uninstall the old version first; later versions update in the app. Read the v1.4.0 release notes before you uninstall.
There is no hosted web version. The browser preview in this repository is only for frontend debugging.
Quick start
[!NOTE] The interface is currently in Chinese only.
On first launch, the upstream settings (上游配置) open automatically.
Choose a provider and fill in the base URL, API key and model ID:
Provider API Base URL OpenAI and compatible relays Responses API or Images API https://api.openai.comor the relay's root URLGoogle Gemini Native Interactions API https://generativelanguage.googleapis.comGrok / xAI Native Imagine API https://api.x.aiFor OpenAI and compatible upstreams, also choose the API type. Use the Responses API when the upstream supports it, since it handles long generations best; choose the Images API when the upstream only offers the standard image endpoints.
Click 测试连接 (Test connection) to check the settings, then save.
Enter a prompt, choose the aspect ratio, quality and output format, then click 生成 (Generate) or press
Ctrl + Enter(Cmd + Enteron macOS).
Companion project: Image-Prompts
Image-Prompts is the open-source companion to Image Studio: a library of AI image prompts in Chinese and English, collecting community submissions and curated public prompts that you can browse by category and tag or search. Click "Send to Image-Studio" on a prompt's page to send it to the Image Studio desktop app, where it goes into the prompt editor after you confirm.
- Repository: RoseKhlifa/Image-Prompts
- Live demo: prompts.sorry.ink
Community and feedback
Report bugs and suggest features in GitHub Issues. Many failed generations come from the upstream settings, key permissions, gateway timeouts or model capabilities rather than from the client. Before you open an issue, click 测试连接 (Test connection) in the upstream settings and check the real status code and error in the history details or the raw response. If the same settings also fail with curl or the provider's own console, contact the provider first.
Chinese-speaking users are welcome in the QQ group 443136349; the QR code is under 社区与反馈.
Docs
The documentation is in Chinese:
- Usage: first-time setup, choosing an API type, parameters
- Features: the full feature list, platform differences, shortcuts
- Packages: every package and which one to choose
- Troubleshooting: where data is stored, 524 / 504, permission and compatibility problems
- Privacy policy: what is stored where, and when the app goes online
Contributing
Issues and pull requests are welcome. The desktop app is built with Wails (Go + React / TypeScript), and the Android app is a WebView shell written in Kotlin. Start with building from source and the project structure.
License
GNU AGPL v3.0. If you distribute a modified version, or offer one to others as a network service, you must release its source code under the same license.
Acknowledgements
Thanks to the linux.do community for its support and inspiration.
Explore related projects
Loading…