AI-powered image editing service using Qwen-based workflows on RunPod and Google Gemini for prompt enhancement.
| Interface | Description | Status |
|---|---|---|
| Image Editor | Main Interface. Interactive AI image editing using Qwen workflow. | ✅ Production |
| Content Pipeline | "Conveyor Belt" prototype for batch content creation (Idea -> Video). | 🚧 Prototype |
| Studio Dashboard | Classic chat & generate interface with Gemini integration. | ✅ Stable |
- AI Editing: Replace/modify objects in images using natural language.
- Prompt Engineering: Use Gemini to expand simple ideas into professional prompts.
- Cloud Backend: Serverless GPU execution via RunPod (no local GPU required).
- Production Ready: Built-in rate limiting, logging, and PM2 support.
-
Install Dependencies
npm install
-
Configure Environment
cp .env.example .env # Set GEMINI_API_KEY, RUNPOD_API_KEY, RUNPOD_ENDPOINT_ID -
Run Locallly
npm run dev # Open http://localhost:3000
- Setup PM2:
npm install -g pm2 - Start Server:
pm2 start ecosystem.config.js - Docs: See DEPLOYMENT.md for full Nginx/HTTPS setup.
Required .env Variables:
GEMINI_API_KEY: Google AI Studio key.RUNPOD_API_KEY: API Key from RunPod.RUNPOD_ENDPOINT_ID: Endpoint ID for your deployed ComfyUI workflow.
Default Port: 3000 (Set PORT to change)
graph TD
subgraph Client
UI[Web UI / Browser]
Ed[Image Editor]
end
subgraph Server_Layer
API[Express Server]
Auth[Auth Middleware]
Job[Job Manager]
end
subgraph AI_Services
Gemini[Google Gemini API]
RunPod[RunPod Serverless GPU]
end
UI --> |/api/generate| API
UI --> |/api/chat| API
API --> Auth
Auth --> Job
Job --> |Enhance Prompt| Gemini
Job --> |Generate/Edit| RunPod
RunPod --> |Images| Job
Gemini --> |Text| Job
Job --> |JSON Response| UI
sequenceDiagram
participant User
participant WebUI
participant Server
participant Gemini as Gemini AI
participant RunPod as ComfyUI (RunPod)
User->>WebUI: Enters Prompt & Uploads Image
WebUI->>Server: POST /api/generate (edit)
par Prompt Enhancement
Server->>Gemini: Enhance Prompt
Gemini-->>Server: Optimized Prompt
end
Server->>RunPod: Submit Job (Image + Prompt)
RunPod-->>Server: Job ID
Server-->>WebUI: Job ID (Pending)
loop Polling
WebUI->>Server: GET /api/status/:id
Server->>RunPod: Check Status
RunPod-->>Server: Status / Result
Server-->>WebUI: Status update
end
RunPod-->>Server: Final Image
Server-->>WebUI: Display Result
MIT