AI Assist · Qwen-Image-Edit Rapid-AIO v23
You
What is this system and what does it run on?
AI
This is a self-hosted AI for generative editing, multi-view character rendering, background removal, face swapping, and group-based asset management. It runs on a local RTX A6000 GPU (CUDA 12.4, 48 GB VRAM) using the Qwen 2.5 VL GGUF model (Rapid-NSFW-v23 Q8_0) via ComfyUI. The frontend is a single-page browser app (car.html) talking to a FastAPI backend on :8500.
You
Walk me through the image generation flow.
AI
When a generation is triggered the pipeline is:

1. Prompt cleaning — if the prompt contains "transparent background", that keyword is stripped so Qwen renders a clean solid-BG image instead of producing washed-out halos.

2. ComfyUI queue — the reference image is uploaded to ComfyUI (:8188) and injected into image1. An optional wireframe frame extracted from a pose-guide video goes into image2. The workflow graph (workflow_qwen_edit.json) is patched with the prompt, dimensions, seed, and sampler params, then submitted via POST /prompt.

3. Qwen inference — the GGUF model (≈8 GB VRAM), text encoder (FP8), and VAE decode the latent into a PNG.

4. SAM2 post-processing — if transparent was requested, SAM2 point-prompt segmentation removes the background using 12 foreground seed points (hair → shoes, shoulder / hip lateral spread) and 7 background points (corners + edge midpoints). A coverage sanity check (5–92 %) falls back to rembg if the mask is implausible.
You
What are the main API endpoints?
AI
The FastAPI service (:8500) exposes:

GET /images — full image list with PostgreSQL metadata (group, prompt, pose, sort order, archived flag).
POST /upload — add an image; with group_id + skip_poses it silently joins an existing group without triggering pose generation.
POST /batch — async multi-prompt generation job (filenames, prompts, poses, wireframe_ref). Poll progress via GET /jobs/{id}.
POST /faceswap — insightface video face swap with optional GFPGAN restoration.
POST /remove-background-sam/{f} — SAM2 BG removal to a .nobg.png sidecar.
POST /images/{f}/set-preferred — moves image to group slot 0 and queues face extraction in the background.
GET /wireframe/frame/{name}?t= — extract a frame at normalised time t∈[0,1] from a wireframe pose video.
You
How does the face-book and multi-view workflow work?
AI
Face-book: marking an image as "preferred" (star button) moves it to sort_order=0 in the group and triggers a background task. insightface detects the largest face, adds 50 % padding on the sides and 200 % headroom above, and saves a {group_id}_face.png crop. This appears as a 72 px thumbnail in the studio Info tab for fast face-reference lookup.

Multi-view / camera angles: the Generate tab offers 12 camera angle presets — 8 absolute (Front, ¾ Left/Right, Side, Back, High, Low) and 4 relative (±45°, ±90°). Each fires a /batch request with the angle prompt injected and pose=null. The wireframe pose guide (a .mp4 video scrubbed to any frame) is passed as image2 in the Qwen workflow to constrain body layout without ControlNet — the controlnet model folder is empty by design.

Group management: all images belong to groups stored in PostgreSQL. Clipboard paste (Ctrl+V) while a group is open offers "add to this group — no poses" or "new group with pose generation". Archive hides images from the default view without deleting them.
Ask a follow-up question…
Press P or click to resume • Qwen-Image-Edit Rapid-AIO v23
0 images 🗑️ Trash
Hidden from preview
Orbit 3D preview
0 selected
Select reference image