RUNNING_QWEN_YOURSELF.md

pipelines/RUNNING_QWEN_YOURSELF.md

Running the Qwen heavy weight yourself

Josh, 2026-08-14: *"if I ever wanted to use our qwen heavy weight myself without you, how do I do

that"*.

Everything below is already installed and already running on the box. Nothing needs downloading.

---

The short version

ComfyUI is already up. Open a browser to http://127.0.0.1:8189.

It runs as a service and has been up all session. If it is ever down, start it from

D:\comfyui\ComfyUI_windows_portable\ with run_nvidia_gpu.bat.

---

Loading the workflow

Two ready-made workflows are in build/3d/comfy_workflows/:

filewhat it is
QWEN_IMAGE_EDIT_bf16_API.jsonthe 20B bf16 edit model — feed it an image, describe a change
ZIMAGE_TURBO_TEXT2IMG_API.jsonZ-Image-Turbo, text-only, 8 steps — the arm that got the body proportions right

Drag either file onto the ComfyUI canvas. Both are API format; recent ComfyUI loads it directly.

If a version refuses it, use Workflow → Browse Templates → Qwen Image Edit and set the values

from the table below by hand — the template's wiring is the same shape.

---

The settings that matter, and why

These are not defaults. Each one was measured on this project and several were bought expensively.

settingvaluewhy
UNETqwen_image_edit_2511_bf16.safetensors20B at bf16, 38.1 GB — the largest published build. An fp8mixed file also sits on the box and is the shortcut; parameter count first, precision second.
CLIPqwen_2.5_vl_7b_fp8_scaled.safetensors, type qwen_image
VAEqwen_image_vae.safetensors
steps40
cfg4.0at this cfg the negative branch carries real weight — which is why an empty one matters
sampler / schedulereuler / simple
ModelSamplingAuraFlow shift3.1
CFGNorm strength1.0

Two structural things the template can get wrong:

The reference must go BOTH places. Into the conditioning (TextEncodeQwenImageEditPlus

image1) and through VAEEncode into the sampler's start latent. Qwen-Image-Edit is an

*edit* model: handed an empty start latent it invents a second subject beside the one you

referenced. That cost a whole run in the face survey.

ModelSamplingAuraFlow + CFGNorm are not optional. Their absence is most of why a

first-contact run came back stylised rather than photographic.

---

Prompting rules, all of them measured here

No negative prompt. Ever. Leave the negative encoder's text empty. A long negative names every

feature you care about and pushes the model's attention onto exactly those tokens. Measured twice:

the stage-B body prompt listed "shorts" fifteen times in its negative and the output wore shorts;

the bald ladder listed every hair word and got hair.

Name the thing, don't describe it. A named form with a strong prior beats described geometry

every time, and this happened four separate times in one day:

lowered 45 degrees") worked where three descriptions had failed

Say what IS there, never what isn't. "The whole thigh is bare" beats "a very short inseam".

"A clear gap of background shows through each armpit" beats "arms away from the body".

Dimensions only help if they're anchored to something visible. "Two inches below the navel"

worked because the navel is in the frame. "Five inch inseam" failed because an inseam is measured

from a seam nobody can see, and inches have no scale reference in an image with no ruler.

The source outranks the sentence, always. This is the big one. Qwen-Image-Edit *preserves its

reference*. If the reference wears mid-thigh shorts you get mid-thigh shorts; if it has hair you

get hair; if it is a head-and-shoulders portrait the head comes out oversized. Thirteen passes were

spent rewording prompts against images that already contained the wrong answer. Fix the source.

Reference images on image2 do not work on this graph. Tried three times — a whole figure

(it copied the person), a garment-only crop (identity preserved, garment not transferred), a face

crop (ArcFace 0.27 against a 0.90 bar). The node accepts image2 and image3; it does not carry

the referenced property across.

---

Two hard machine rules

One GPU job at a time. Two concurrent runs on this card give CUDA illegal memory access and

kill both. Check nvidia-smi before launching. A *resident model* is not a *running job* —

utilisation is the test, not memory.

Never kill a long run. 100% GPU at high VRAM is the card working. Local compute is free and the

box runs 24/7; a day per asset is acceptable.

---

If you want a mask instead of a whole-image edit

SetLatentNoiseMask confines the sampler to a region, and DifferentialDiffusion in the model

chain blends the feathered edge instead of leaving a seam. Two rules learned the hard way:

silhouette into the background and licenses the model to repaint around the figure.

the thing you want gone.

Working examples: harness/asset_factory/body_uncover_legs.py and body_face_swap.py.

Generated by harness/site/structure_site.py — the URL path is the repo path. review root