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

vllm-omni-humming vLLM-Omni humming-kernels vLLM Python
0.2.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

Into the same venv that runs vllm-omni serve. Shown for CUDA 12.9 wheels; adapt the wheel URLs for your platform.

python -m venv venv && source venv/bin/activate
pip install -U pip

# 1) 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

# 2) 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

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

# 4) this plugin
PIP_CONSTRAINT=constraints.txt pip install vllm-omni-humming==0.2.0

# 5) humming kernels (required)
pip install --no-deps "humming-kernels>=0.1.11"

Requirements: NVIDIA GPU (SM75+), driver ≥ 575. No CUDA toolkit needed — kernels are JIT-compiled on first serve (a few minutes once, cached afterwards).

Serve

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

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 "Authorization: Bearer $KEY" -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.2.0.tar.gz (16.2 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.2.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vllm_omni_humming-0.2.0.tar.gz
  • Upload date:
  • Size: 16.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 995e58e115a372853b7d55b0be9baa50f58dd37d7ef45bd30ae58621f5ed8376
MD5 7eb9ad17b13d726ef92527dd2904fb42
BLAKE2b-256 9aba2cb36f330532d3eb1d945e0c80fc4851326f5858260ae864b973d4d6c0a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vllm_omni_humming-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 953a0188ae4e9810f3abb16d10a876a439706f1703ec9b568e9d8b2dbd387e6d
MD5 c9bc6755df1994d2ad1ded9f51fbe87d
BLAKE2b-256 98a29e525e7795bf6343c2f38521374533395c1ff0d1e5b52c17601c5514c64e

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