diff --git a/.junie/models/local-devstral24b.json b/.junie/models/local-devstral24b.json deleted file mode 100644 index 95e549c..0000000 --- a/.junie/models/local-devstral24b.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "devstral24b-junie:latest", - "baseUrl": "http://localhost:11434/v1/chat/completions", - "apiType": "OpenAICompletion", - "temperature": 0.05, - "primaryModel": { - "id": "devstral24b-junie:latest", - "temperature": 0.05 - }, - "fasterModel": { - "id": "devstral24b-junie:latest", - "temperature": 0.05 - } -} diff --git a/.junie/models/local-ollama.json b/.junie/models/local-ollama.json deleted file mode 100644 index eb42966..0000000 --- a/.junie/models/local-ollama.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "baseUrl": "http://localhost:11434/v1/responses", - "id": "qwen2.5-coder:32b", - "apiType": "OpenAIResponses", - "temperature": 0.1, - "primaryModel": { - "id": "qwen2.5-coder:32b", - "temperature": 0.1 - }, - "fasterModel": { - "id": "qwen2.5-coder:1.5b" - } -} diff --git a/.junie/models/local-qwen25.json b/.junie/models/local-qwen25.json deleted file mode 100644 index 80d70dc..0000000 --- a/.junie/models/local-qwen25.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "baseUrl": "http://localhost:11440/v1/responses", - "id": "qwen3-coder:30b", - "apiType": "OpenAIResponses", - "temperature": 0.3, - "primaryModel": { - "id": "qwen3-coder:30b", - "temperature": 0.3 - }, - "fasterModel": { - "id": "qwen2.5-coder:1.5b" - } -} diff --git a/.trash/architecture.svg b/.trash/architecture.svg new file mode 100644 index 0000000..6f5a34e --- /dev/null +++ b/.trash/architecture.svg @@ -0,0 +1,151 @@ + + + + + + Qwen Image Edit Rapid-AIO v23 System + + + + PostgreSQL Database + host: 192.168.1.160 + port: 5433 + dbname: dv + + + + ComfyUI Backend + Qwen-Rapid-NSFW-v23 + GGUF Model (21.8GB) + + + + FastAPI Service + edit_api.py + Image Processing + + + + Folder Watcher + watcher.py + car.html Generator + + + + Stage Directory + /mnt/zim/tour-comfy/stage + Input images + + + Output Directory + /mnt/zim/tour-comfy/output + Processed images + + + Failed Directory + /mnt/zim/tour-comfy/failed + Failed images + + + + System Services + comfyui.target + backend, api, watcher + + + + Image Upload + + + Processing Request + + + Database Access + + + File Monitoring + + + + + + + + + + + Configuration + config.json + API Settings + + + + Prompt Management + prompt_pose_book.md + Base prompts + + + + GFPGAN Face Restoration + gfpgan directory + Face swap functionality + + + + System Target + comfyui.target + Service orchestration + + + + + + + + \ No newline at end of file diff --git a/tour-comfy/deploy_api.sh b/.trash/deploy_api.sh similarity index 100% rename from tour-comfy/deploy_api.sh rename to .trash/deploy_api.sh diff --git a/.trash/table-1781832877269.csv b/.trash/table-1781832877269.csv new file mode 100644 index 0000000..a993ab2 --- /dev/null +++ b/.trash/table-1781832877269.csv @@ -0,0 +1,11 @@ +#,Pose,Base,Key Action,Mood +9,**The Bridge**,Supine,"Hips lifted high, body arched","Strong, open" +10,**The Lotus (recline)**,Supine,"Legs crossed in lotus, knees open","Centered, tranquil" +11,**The Archer**,Side-lying,"Top leg bent, hand grasps ankle, bow shape","Tense, focused" +12,**The Crescent**,Kneeling/standing,"Deep backbend, arms overhead, hips forward","Expansive, vulnerable" +13,**The Cocoon**,Side-lying,"Fetal curl, arms wrapped around legs","Protected, intimate" +14,**The Swan Dive**,Prone,"Chest and legs lifted, arms forward","Graceful, soaring" +15,**The Suspended Split**,Supine,Legs vertical and spread wide in full split,"Flexible, exposed" +16,**The Embrace**,Seated,"Folded forward over legs, arms wrapped around","Intimate, yielding" +17,**The Cascade**,Seated,Twisted fold over one extended leg,"Fluid, surrendered" +18,**The Flame**,Standing,"One-legged balance, arms overhead","Poised, burning" \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..707fa70 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,57 @@ +# Agents in Qwen-Image-Edit Rapid-AIO v23 + +This document describes the agents and components that make up the Qwen image editing system running on A6000 hardware. + +## System Overview + +The Qwen-Image-Edit Rapid-AIO v23 system is a headless image editing API that runs Phr00t's Rapid-AIO NSFW v23 model as a Q8 GGUF. The system consists of two main components: +1. ComfyUI backend that executes the Qwen models +2. FastAPI service that provides HTTP API endpoints + +## Key Agents and Components + +### 1. ComfyUI Backend Agent +- **Role**: Core image editing backend that executes the Qwen models +- **Service Name**: `comfyui-backend` +- **Port**: 8188 +- **Components**: + - Qwen model (Qwen-Rapid-NSFW-v23_Q8_0.gguf) + - Text encoder (qwen_2.5_vl_7b_fp8_scaled.safetensors) + - VAE decoder (qwen_image_vae.safetensors) + - Workflow execution engine + +### 2. FastAPI Edit Agent +- **Role**: Provides HTTP API endpoint for image editing requests +- **Service Name**: `comfyui-api` +- **Port**: 8500 +- **Functionality**: + - Accepts image and prompt input via POST request + - Processes edits using ComfyUI backend + - Returns edited PNG output + +## Communication Flow + +1. Client sends POST request to FastAPI Edit Agent (port 8500) with image and prompt +2. FastAPI Edit Agent forwards request to ComfyUI Backend Agent (port 8188) +3. ComfyUI Backend Agent processes the image using Qwen models via workflow +4. Result is returned through FastAPI Edit Agent to client + +## Service Management + +### Backend Service +- **Service Name**: `comfyui-backend` +- **Port**: 8188 +- **Command**: `/home/mike/dev/qwen-image-edit-rapid-aio-nsfw-v23/a6000-comfy/run_comfyui.sh` + +### API Service +- **Service Name**: `comfyui-api` +- **Port**: 8500 +- **Command**: `/home/mike/dev/qwen-image-edit-rapid-aio-nsfw-v23/a6000-comfy/start_api.sh` + +## Configuration Notes + +The system uses the following environment variables: +- COMFY_URL: Set to "http://127.0.0.1:8188" +- HOST: Set to "0.0.0.0" +- PORT: Set to "8500" +- MAX_AREA: Default 1048576 (1MP output budget) \ No newline at end of file diff --git a/architecture2.svg b/architecture2.svg new file mode 100644 index 0000000..ae0e736 --- /dev/null +++ b/architecture2.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + FastAPI Edit Agent + Service: comfyui-api + Port: 8500 + HTTP API Endpoint + + + + ComfyUI Backend + Service: comfyui-backend + Port: 8188 + Qwen Model Execution + + + + Client + Image + Prompt Request + + + + + + + + + + Qwen Model + Q8 GGUF (Qwen-Rapid-NSFW-v23) + + + + Text Encoder + qwen_2.5_vl_7b_fp8_scaled.safetensors + + + + VAE Decoder + qwen_image_vae.safetensors + + + + Workflow + workflow_qwen_edit.json + + + + + + + + + + + + + \ No newline at end of file diff --git a/architecturev2.svg b/architecturev2.svg new file mode 100644 index 0000000..87aa518 --- /dev/null +++ b/architecturev2.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + Qwen Image Edit Rapid-AIO v23 System Architecture + Complete System Overview with All Components and Interactions + + + Input/Processing Pipeline + + + + Stage Directory + /mnt/zim/tour-comfy/stage + Input images + + + + Output Directory + /mnt/zim/tour-comfy/output + Processed images + + + + Failed Directory + /mnt/zim/tour-comfy/failed + Failed images + + + System Services + + + + System Target + comfyui.target + Service orchestration + + + Backend Components + + + + ComfyUI Backend + Qwen-Rapid-NSFW-v23 + GGUF Model (21.8GB) + ComfyUI Workflow Engine + + + + GFPGAN Face Restoration + gfpgan directory + Face swap functionality + + + + Prompt Management + prompt_pose_book.md + Base prompts & pose book + + + + Configuration + config.json + API Settings & Paths + + + API and Database + + + + FastAPI Service + edit_api.py + Image Processing API + + + + PostgreSQL Database + host: 192.168.1.160 + port: 5433, dbname: dv + + + Watcher Service + + + + Folder Watcher + watcher.py + car.html Generator + + + System Integration + + + + System Services + comfyui-backend.service + comfyui-api.service + comfyui-watcher.service + + + + + + Image Upload + + + + Processing Result + + + + Database Access + + + + Database Access + + + + car.html Generation + + + + Database Updates + + + + Service Orchestration + + + + Prompt Usage + + + + Face Restoration + + + + Start Backend + + + + Start API + + + + Start Watcher + + \ No newline at end of file diff --git a/backlog.md b/backlog.md new file mode 100644 index 0000000..44a4168 --- /dev/null +++ b/backlog.md @@ -0,0 +1 @@ +privacy feature not work when overlay \ No newline at end of file diff --git a/gfpgan/weights/parsing_parsenet.pth b/gfpgan/weights/parsing_parsenet.pth new file mode 100644 index 0000000..a786d16 Binary files /dev/null and b/gfpgan/weights/parsing_parsenet.pth differ diff --git a/tour-comfy/car.html b/tour-comfy/car.html index 433e79a..d040a02 100644 --- a/tour-comfy/car.html +++ b/tour-comfy/car.html @@ -3,7 +3,7 @@ - Live Image Monitor + Studio Monitor
-
🔒
-
Privacy mode — click to unlock
+
+ + AI Image Processing Assistant · Qwen-Image-Edit Rapid-AIO v23 +
+
+
+
+
You
+
What is the purpose of this system?
+
+
+
+
+
AI
+
+ This system implements a headless image editing API using the Qwen-Rapid-NSFW-v23 model on an RTX A6000 GPU. It provides an HTTP service that accepts image and prompt inputs, processes edits using ComfyUI backend, and returns edited PNG outputs. +
+
+
+
+
+
You
+
How does it work?
+
+
+
+
+
AI
+
+ The system consists of two main components: a ComfyUI backend (running on port 8188) that executes the Qwen models and a FastAPI service (running on port 8500) that provides HTTP API endpoints. When you send an image and prompt to the API, it forwards the request to ComfyUI which processes the image using the Qwen-Rapid-NSFW-v23 model with specific workflow parameters. +
+
+
+
+
+
You
+
What are the key components?
+
+
+
+
+
AI
+
+ Key components include:

+ - Qwen model: Qwen-Rapid-NSFW-v23_Q8_0.gguf
+ - Text encoder: qwen_2.5_vl_7b_fp8_scaled.safetensors
+ - VAE decoder: qwen_image_vae.safetensors
+ - Workflow execution engine using ComfyUI

+ The system uses a specialized workflow (workflow_qwen_edit.json) that defines the processing pipeline with nodes for loading the model, text encoder, VAE, input image, positive/negative prompts, latent generation, sampling, and output saving. +
+
+
+
+
+
+
Ask a follow-up question…
+
+
+
Press P or click to resume • Qwen-Image-Edit Rapid-AIO v23
+
@@ -791,7 +1595,7 @@ - Live Image Monitor + Studio Monitor AI
@@ -835,29 +1639,96 @@
-