Update README for v2.3
This commit is contained in:
parent
fe2a3179a8
commit
a7fcd71ed6
1 changed files with 49 additions and 26 deletions
75
README.md
75
README.md
|
|
@ -1,33 +1,56 @@
|
|||
# aPix Image Workspace
|
||||
# aPix Image Workspace (v2.3)
|
||||
|
||||
## Tiếng Việt
|
||||
### Giới thiệu
|
||||
aPix Image Workspace là một giao diện Flask nhẹ giúp bạn tạo hình ảnh bằng API Model Gemini Image 3 Pro (Nano Banana Pro). Bạn có thể gửi prompt, upload tài liệu tham khảo và điều chỉnh tỷ lệ khung hình/độ phân giải.
|
||||
aPix is a lightweight Flask interface for generating high-quality images using **Google Gemini Image 3 Pro** (Nano Banana Pro) and **Google ImageFX (Whisk)**.
|
||||
|
||||

|
||||
## Features
|
||||
|
||||
### Người tạo
|
||||
- Người tạo: [Phạm Hưng](https://www.facebook.com/phamhungd/)
|
||||
- Group: [SDVN - Cộng đồng AI Art](https://www.facebook.com/groups/stablediffusion.vn/)
|
||||
- Website: [sdvn.vn](https://www.sdvn.vn)
|
||||
- Donate: [sdvn.vn/donate](https://stablediffusion.vn/donate/)
|
||||
- **Dual Models**: Support for `Gemini Image 3 Pro` and `Google ImageFX (Whisk)`.
|
||||
- **Multi-Image Generation**: Generate up to 4 variations at once with Whisk.
|
||||
- **Reference Image Support**: Upload reference images for style transfer and composition control.
|
||||
- **Smart Prompting**: Support for placeholders `{text}` and queue processing (`cat|dog|bird`).
|
||||
- **Zero-Config Persistence**: Built for NAS/Docker with automatic config initialization and data persistence.
|
||||
- **Mobile Friendly**: Guides for retrieving cookies on Android/iOS included.
|
||||
|
||||
### Khởi chạy nhanh bằng `run_app`
|
||||
1. Nháy đúp vào `run_app.command` trên macOS, `run_app.sh` trên Linux, hoặc `run_app.bat` trên Windows để tự động tìm Python, tạo `.venv`, cài `requirements.txt` và khởi động `app.py`.
|
||||
2. Mở `http://127.0.0.1:8888`, nhập prompt/tùy chọn rồi nhấn Generate.
|
||||
3. Hình ảnh mới nằm trong `static/generated/`; `/gallery` thể hiện lịch sử.
|
||||
## Quick Start (Docker / Synology NAS)
|
||||
|
||||
### Sử dụng
|
||||
1. Đặt biến môi trường `GOOGLE_API_KEY` với API key của Google GenAI hoặc nhập trực tiếp trong giao diện.
|
||||
2. Mở trình duyệt tới `http://127.0.0.1:8888`, nhập prompt, chọn tùy chọn và nhấn Generate.
|
||||
3. Hình ảnh: `static/generated` lưu nội dung mới nhất, còn `/gallery` trả về URL cho phần lịch sử.
|
||||
We recommend running aPix via Docker for the best experience.
|
||||
|
||||
### Cú pháp đặc biệt
|
||||
Ứng dụng hỗ trợ cú pháp placeholder để tạo nhiều biến thể ảnh hoặc thay thế nội dung linh hoạt:
|
||||
1. **Create `docker-compose.yml`**:
|
||||
```yaml
|
||||
version: '3.8'
|
||||
services:
|
||||
app:
|
||||
image: git.khoavo.myds.me/vndangkhoa/apix:v2.3
|
||||
container_name: sdvn-apix-python
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8558:8888"
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
volumes:
|
||||
- ./config:/app/config
|
||||
- ./data/generated:/app/static/generated
|
||||
- ./data/uploads:/app/static/uploads
|
||||
```
|
||||
|
||||
* **Placeholder:** Sử dụng `{text}` hoặc `[text]` trong prompt. Ví dụ: `A photo of a {animal} in the style of {style}`.
|
||||
* **Trường Note:** Nội dung trong trường Note sẽ thay thế cho placeholder:
|
||||
* **Thay thế đơn:** Nếu Note là `cat`, prompt sẽ thành `A photo of a cat...`.
|
||||
* **Hàng đợi (Queue):** Nếu Note chứa ký tự `|` (ví dụ: `cat|dog|bird`), ứng dụng sẽ tự động tạo 3 ảnh lần lượt với `cat`, `dog`, và `bird`.
|
||||
* **Nhiều dòng:** Nếu Note có nhiều dòng, mỗi dòng sẽ ứng với một lần tạo ảnh.
|
||||
* **Mặc định:** Nếu Note để trống, placeholder sẽ giữ nguyên hoặc dùng giá trị mặc định nếu có (ví dụ `{cat|dog}` sẽ tạo 2 ảnh nếu Note trống).
|
||||
2. **Run**:
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
3. **Access**: Open `http://your-nas-ip:8558`.
|
||||
|
||||
## Configuration
|
||||
|
||||
- **API Key**: Enter your Google Gemini API Key in the settings (optional if using Whisk).
|
||||
- **Whisk Cookies**: For ImageFX, paste your `Cookie` string from `labs.google`.
|
||||
- *Tip*: Instructions for getting cookies on Mobile/PC are available in the app settings.
|
||||
|
||||
## Credits
|
||||
|
||||
- **Creator**: [Phạm Hưng](https://www.facebook.com/phamhungd/)
|
||||
- **Group**: [SDVN - Cộng đồng AI Art](https://www.facebook.com/groups/stablediffusion.vn/)
|
||||
- **Website**: [sdvn.vn](https://www.sdvn.vn)
|
||||
|
||||
---
|
||||
*Version 2.3 | Dockerized for optimal performance.*
|
||||
|
|
|
|||
Loading…
Reference in a new issue