Skip to main content

Companion plugin: load & serve pre-quantized humming Qwen-Image DiT pipelines on stock vLLM-Omni

Project description

vllm-omni-humming

Plugin that lets stock vLLM-Omni serve pre-quantized humming Qwen-Image checkpoints.

Install it into the vLLM-Omni environment and serve normally — the plugin registers itself through vLLM-Omni's standard plugin entry point, and quantized checkpoints are detected automatically from their transformer/config.json. No flags, no environment variables, no configuration.

Compatibility

Linux only, NVIDIA GPUs (tested on 30-, 40-, 50-series and RTX Pro 6000).

vllm-omni-humming vLLM-Omni humming-kernels vLLM Python
0.3.0 0.24.x >=0.1.11 0.24.0 >=3.10,<3.14

humming-kernels >= 0.1.11 is required (older versions produce corrupted images on some GPUs). Install it explicitly as shown below, or via this package's [kernels] extra.

What it patches

Five small, humming-only runtime patches against stock vLLM-Omni; other quantization methods are untouched. Each is a separate source module documenting the exact upstream symbol it targets:

  • _preimport.py — import the real humming package before vLLM-Omni's stub.
  • _factory.py — register humming as a quantization method for checkpoints with a quantization_config.
  • _loader.py — load packed weights on CPU and repack per module on GPU (keeps the load peak low enough for 32 GiB cards), and accept humming's tensor-name suffixes.
  • _modpin.py — route quantized modulation layers (img_mod.1/txt_mod.1), which stock vLLM-Omni keeps in bf16.

Install

Linux only, NVIDIA GPUs (tested on 30-, 40-, 50-series and RTX Pro 6000).

# 0) install conda (skip if you already have conda)
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh -b -p ~/miniforge3 && source ~/miniforge3/bin/activate

# 1) conda env
conda create -y -n qwen-image-humming python=3.12
conda activate qwen-image-humming

# 2) torch trio (cu129)
pip install torch==2.11.0 torchvision==0.26.0 torchaudio==2.11.0 \
  --index-url https://download.pytorch.org/whl/cu129

# 3) vLLM 0.24.0 cu129 wheel
printf 'torch==2.11.0+cu129\ntorchvision==0.26.0+cu129\ntorchaudio==2.11.0+cu129\n' > constraints.txt
PIP_CONSTRAINT=constraints.txt pip install \
  https://github.com/vllm-project/vllm/releases/download/v0.24.0/vllm-0.24.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl

# 4) vLLM-Omni 0.24.0
PIP_CONSTRAINT=constraints.txt pip install vllm-omni==0.24.0

# 5) this plugin
PIP_CONSTRAINT=constraints.txt pip install vllm-omni-humming==0.3.0

# 6) humming kernels
pip install --no-deps "humming-kernels>=0.1.11"

Requirements: NVIDIA GPU (SM75+), driver ≥ 575, gcc. No CUDA toolkit needed — kernels are JIT-compiled on first serve (a few minutes once, cached afterwards). Any Python 3.10–3.13 environment works in place of conda (a system venv additionally needs the python3-venv and python3-dev packages).

Serve

vllm-omni serve /path/to/checkpoint \
  --omni --served-model-name Qwen/Qwen-Image-2512 \
  --enable-cpu-offload \
  --port 8124

Keep --enable-cpu-offload on GPUs with ≤ 32 GiB; drop it on larger cards for full speed. Generate an image (OpenAI images API):

curl -s http://127.0.0.1:8124/v1/images/generations \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Qwen/Qwen-Image-2512",
    "prompt": "A red panda on a mossy log at dawn",
    "size": "1024x1024",
    "num_inference_steps": 20,
    "true_cfg_scale": 2.5,
    "negative_prompt": "blurry, low quality, distorted, watermark",
    "seed": 1234
  }' \
  | python3 -c "import sys,json,base64; d=json.load(sys.stdin); open('out.png','wb').write(base64.b64decode(d['data'][0]['b64_json']))"

Always send a negative_prompt — vLLM-Omni disables classifier-free guidance without one.

Troubleshooting

  • TypeError: HummingConfig.__init__() got an unexpected keyword argument ... — the plugin isn't installed in the serving venv (pip show vllm-omni-humming).
  • Shape/dtype mismatch on img_mod.1 / txt_mod.1 at load — same cause.
  • Corrupted images — humming-kernels too old; pip install --no-deps "humming-kernels>=0.1.11".

License

Apache-2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vllm_omni_humming-0.3.0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vllm_omni_humming-0.3.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file vllm_omni_humming-0.3.0.tar.gz.

File metadata

  • Download URL: vllm_omni_humming-0.3.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for vllm_omni_humming-0.3.0.tar.gz
Algorithm Hash digest
SHA256 71d195602e030b940dd4a10aaba5ef9047117ab48ccef7beb0c18f2cfabd8736
MD5 637dbc96fe4c803607c12e62fc73d2b5
BLAKE2b-256 e110110ac5f04fadf4c8d3d0841b400de741e968859c8d230d3533e8785d8b5c

See more details on using hashes here.

File details

Details for the file vllm_omni_humming-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vllm_omni_humming-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87e6b5df02ab907d585c7597c2f3fa667645617036c26e8a292a93650b829753
MD5 9b7cc5fd1e7ef6bab2a56c7cac4f2d9b
BLAKE2b-256 d0ccfb530c6c18f944382c3571d63560546d10c0c7611641d8317447840fd2de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page