AI-powered image-to-prompt desktop tool. Convert images into structured, reusable prompts for AI image generation.
English | 中文
- Multi-language Prompts - Chinese, English, Japanese detailed prompts
- Structured Output - Negative prompts, style tags, JSON-structured prompts
- Drag & Drop - Drag images directly into the app
- Clipboard Support - Ctrl+V paste from clipboard
- History - Auto-save analysis results with thumbnails
- Retry Logic - Automatic API retry on failure (800ms/1800ms)
- Dark Theme - Modern Tokyo Night inspired UI
- One-click Copy - Copy any prompt type with a single click
- Download the latest release from Releases
- Extract the zip file
- Run
ImageToPrompt-v3.exe
Note: If you get a DLL error, install Visual C++ Redistributable 2015-2022
# Clone the repository
git clone https://github.com/yourusername/image-to-prompt.git
cd image-to-prompt
# Install dependencies
pip install -r requirements.txt
# Run
python main.py# Install PyInstaller
pip install pyinstaller
# Build
pyinstaller build.spec
# Output: dist/ImageToPrompt-v3/- Launch the app
- Enter your API settings in the config dialog:
- Base URL: Your OpenAI-compatible vision endpoint (e.g.,
http://127.0.0.1:8080/v1) - API Key: Your API key
- Model: Your vision model name (e.g.,
gpt-4o)
- Base URL: Your OpenAI-compatible vision endpoint (e.g.,
- Click "Test Connection" to verify
- Click "Save"
| Action | How |
|---|---|
| Select image | Click the drop zone to browse files |
| Drag image | Drag from file explorer to the drop zone |
| Paste image | Ctrl+V from clipboard |
| View history | Click any item in the history list |
| Retry failed | Double-click a failed entry |
| Cancel analysis | Click the Cancel button |
| Copy prompt | Click the Copy button on any tab |
| Tab | Description |
|---|---|
| 中文 | Detailed Chinese prompt (150+ characters) |
| English | Detailed English prompt (150+ words) |
| 日本語 | Detailed Japanese prompt (150+ words) |
| Core | Concise English prompt (80-120 words) |
| Recreation | Complete English prompt (200+ words) |
| Negative | Negative prompt for avoiding artifacts |
| Tags | Style tags in 3 languages |
| JSON | Structured prompt breakdown |
- Python 3.10+
- PyQt5 - UI framework
- requests - HTTP client
- PyInstaller - Packaging
image-to-prompt/
├── main.py # Entry point
├── requirements.txt # Dependencies
├── build.spec # PyInstaller config
├── prompt_card/
│ ├── config.py # Config management
│ ├── api_client.py # Vision API client
│ ├── api_worker.py # Async API worker
│ ├── history.py # History storage
│ └── ui/
│ ├── main_window.py # Main window
│ ├── config_dialog.py # Config dialog
│ ├── image_drop.py # Image drop zone
│ ├── prompt_panel.py # Prompt result panel
│ └── styles.py # Dark theme styles
└── tests/
└── ...
MIT License - See LICENSE for details.
AI 驱动的图片反推提示词工具。支持将网页图片、本地图片转换为可复用的结构化 Prompt。
- 中文/英文/日文详细提示词
- 负面提示词、风格标签、JSON 结构化 Prompt
- 拖拽/选择/粘贴图片
- 历史记录自动保存
- API 自动重试
- 暗色主题
- 一键复制
- 从 Releases 下载最新版本
- 解压 zip 文件
- 运行
ImageToPrompt-v3.exe
注意: 如果启动报错 DLL 缺失,请安装 Visual C++ Redistributable 2015-2022
git clone https://github.com/yourusername/image-to-prompt.git
cd image-to-prompt
pip install -r requirements.txt
python main.py- 启动程序
- 在配置窗口填写:
- Base URL:你的视觉模型 API 地址
- API Key:你的 API 密钥
- Model:模型名称
- 点击"Test Connection"测试连接
- 点击"Save"保存
| 操作 | 方式 |
|---|---|
| 选择图片 | 点击左侧区域浏览文件 |
| 拖拽图片 | 从文件管理器拖入 |
| 粘贴图片 | Ctrl+V |
| 查看历史 | 点击历史列表项 |
| 重试失败 | 双击失败条目 |
| 取消分析 | 点击 Cancel 按钮 |
| 复制 Prompt | 点击 Copy 按钮 |
MIT 许可证 - 详见 LICENSE
