Text-to-Image
Diffusers
Safetensors
qwen-image
apple-silicon
metal
cuda
nvidia
linux
int4
qipack
c-plus
Instructions to use netdur/Qwen-Image-2.1-QIPACK with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use netdur/Qwen-Image-2.1-QIPACK with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("netdur/Qwen-Image-2.1-QIPACK", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Document Viggle v0.2.1 QIPACK and LoRA
Browse files- NOTICE +9 -2
- README.md +36 -18
- manifest.json +35 -0
NOTICE
CHANGED
|
@@ -19,11 +19,18 @@ The four-step distilled pack was converted from the full transformer in:
|
|
| 19 |
Viggle/Qwen-Image-2.1-viggle-turbo
|
| 20 |
Revision bafc91e4cc934f5fb1406b22496a0bed9b99c548
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
The processor, text-encoder, and VAE files are unmodified copies from:
|
| 23 |
|
| 24 |
Qwen/Qwen-Image-2.1
|
| 25 |
Revision b3179ad355be050328e483a9dfdd9e60cd62adfa
|
| 26 |
|
| 27 |
-
The distilled model
|
| 28 |
-
Research License. The QIPACK conversion was produced by the
|
| 29 |
qwen-image-cplus project.
|
|
|
|
| 19 |
Viggle/Qwen-Image-2.1-viggle-turbo
|
| 20 |
Revision bafc91e4cc934f5fb1406b22496a0bed9b99c548
|
| 21 |
|
| 22 |
+
The six-step QIPACK uses the unchanged base transformer above. Its required
|
| 23 |
+
rank-256 LoRA adapter is an unmodified copy from:
|
| 24 |
+
|
| 25 |
+
Viggle/Qwen-Image-2.1-viggle-turbo
|
| 26 |
+
File revision 139e9492e6b81e85395877a549ec8f0afbb18f8f
|
| 27 |
+
Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors
|
| 28 |
+
|
| 29 |
The processor, text-encoder, and VAE files are unmodified copies from:
|
| 30 |
|
| 31 |
Qwen/Qwen-Image-2.1
|
| 32 |
Revision b3179ad355be050328e483a9dfdd9e60cd62adfa
|
| 33 |
|
| 34 |
+
The distilled model and LoRA were created and published by Viggle under the
|
| 35 |
+
Qwen Research License. The QIPACK conversion was produced by the
|
| 36 |
qwen-image-cplus project.
|
README.md
CHANGED
|
@@ -20,10 +20,11 @@ tags:
|
|
| 20 |
[`qwen-image-cplus`](https://github.com/netdur/qwen-image-cplus), a native C+
|
| 21 |
and Metal Qwen-Image-2.1 inference runtime for Apple Silicon.
|
| 22 |
|
| 23 |
-
This repository contains
|
| 24 |
-
processor, text encoder, and VAE files needed by
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 27 |
|
| 28 |
## Files
|
| 29 |
|
|
@@ -31,34 +32,40 @@ which comes from the pinned Viggle snapshot. The runtime provides the scheduler.
|
|
| 31 |
| --- | --- | --- | --- |
|
| 32 |
| `qwen-image-2.1-fp16-v4.qipack` | `Qwen/Qwen-Image-2.1` at `b3179ad355be050328e483a9dfdd9e60cd62adfa` | 40 steps, TaylorSeer | `9fe30bcae5678c6e21618d48d9f058fc150ed5b71b7534e5283bb7a05c163750` |
|
| 33 |
| `qwen-image-2.1-viggle-v0.1-4step-fp16-v4.qipack` | `Viggle/Qwen-Image-2.1-viggle-turbo` at `bafc91e4cc934f5fb1406b22496a0bed9b99c548` | 4 steps, no cache, unstretched schedule | `d05edecbf9d3e7b03b0e708ae41da5370d5fe245f1d3b5f6775aef18f18857d1` |
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
`text_encoder/model-*.safetensors` shards, and
|
| 37 |
`vae/diffusion_pytorch_model.safetensors` in this repository's root directory.
|
| 38 |
Their sizes and checksums are recorded in `manifest.json`. The files remain in
|
| 39 |
-
those paths when downloaded, so selecting
|
| 40 |
-
also locates its support files.
|
| 41 |
-
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
-
The
|
| 45 |
-
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
`transformer:all-matrix-f16-v4`. All 224 transformer-block matrices are stored
|
| 49 |
as FP16; vectors and the nine global tensors remain BF16. Each pack contains
|
| 50 |
297 tensors and 7,115,124,736 parameters. The format has fixed little-endian
|
| 51 |
-
metadata plus per-tensor and payload checksums
|
| 52 |
-
round-trip verification against their source tensors.
|
| 53 |
|
| 54 |
## Requirements
|
| 55 |
|
| 56 |
- macOS 14 or newer on Apple Silicon
|
| 57 |
-
- [`qwen-image-cplus`](https://github.com/netdur/qwen-image-cplus)
|
|
|
|
| 58 |
|
| 59 |
The runtime has been tested on an M1 Max with 32 GB unified memory. Lower-memory
|
| 60 |
-
machines have not yet been validated. Generation at 1024x1024
|
| 61 |
-
|
|
|
|
| 62 |
|
| 63 |
## Download
|
| 64 |
|
|
@@ -93,6 +100,17 @@ qwen-image-cplus generate-1024 \
|
|
| 93 |
1301
|
| 94 |
```
|
| 95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
The pack metadata selects the correct step count, terminal-shift behavior, and
|
| 97 |
cache policy when those optional CLI arguments are omitted.
|
| 98 |
|
|
@@ -114,7 +132,7 @@ obtained from Qwen. Read the agreement before downloading or using the files.
|
|
| 114 |
The QIPACK files are modified redistributions: their tensor storage layout and
|
| 115 |
selected matrix dtypes were converted for the Apple-Silicon runtime. The model
|
| 116 |
architecture and learned values were not retrained by this project. The
|
| 117 |
-
distilled source model
|
| 118 |
[`NOTICE`](NOTICE).
|
| 119 |
|
| 120 |
The runtime source code has its own MIT license; that license does not replace
|
|
|
|
| 20 |
[`qwen-image-cplus`](https://github.com/netdur/qwen-image-cplus), a native C+
|
| 21 |
and Metal Qwen-Image-2.1 inference runtime for Apple Silicon.
|
| 22 |
|
| 23 |
+
This repository contains converted transformer weights, a Viggle v0.2.1 LoRA,
|
| 24 |
+
and the unmodified processor, text encoder, and VAE files needed by
|
| 25 |
+
`qwen-image-cplus`. The base weights and shared support files come from the
|
| 26 |
+
pinned upstream Qwen snapshot; the four-step full fine-tune and six-step LoRA
|
| 27 |
+
come from Viggle. The runtime provides the scheduler.
|
| 28 |
|
| 29 |
## Files
|
| 30 |
|
|
|
|
| 32 |
| --- | --- | --- | --- |
|
| 33 |
| `qwen-image-2.1-fp16-v4.qipack` | `Qwen/Qwen-Image-2.1` at `b3179ad355be050328e483a9dfdd9e60cd62adfa` | 40 steps, TaylorSeer | `9fe30bcae5678c6e21618d48d9f058fc150ed5b71b7534e5283bb7a05c163750` |
|
| 34 |
| `qwen-image-2.1-viggle-v0.1-4step-fp16-v4.qipack` | `Viggle/Qwen-Image-2.1-viggle-turbo` at `bafc91e4cc934f5fb1406b22496a0bed9b99c548` | 4 steps, no cache, unstretched schedule | `d05edecbf9d3e7b03b0e708ae41da5370d5fe245f1d3b5f6775aef18f18857d1` |
|
| 35 |
+
| `qwen-image-2.1-viggle-v0.2.1-lora-fp16-v4.qipack` | Unchanged Qwen base transformer; requires the Viggle LoRA below | 6 steps, no cache, Viggle v0.2.1 schedule | `be2e72ed75d30234a7f1934502d1d95b10eaedc935de2ce06b926b34e1b7b8b4` |
|
| 36 |
+
| `Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors` | `Viggle/Qwen-Image-2.1-viggle-turbo` at `139e9492e6b81e85395877a549ec8f0afbb18f8f` | Rank-256 adapter beside the six-step QIPACK | `2a0148f5c73abbed5f97da5ea356e439318aadb281d01fce4af39cdf43728803` |
|
| 37 |
|
| 38 |
+
All three packs share `processor/vocab.json`, `processor/merges.txt`, four
|
| 39 |
`text_encoder/model-*.safetensors` shards, and
|
| 40 |
`vae/diffusion_pytorch_model.safetensors` in this repository's root directory.
|
| 41 |
Their sizes and checksums are recorded in `manifest.json`. The files remain in
|
| 42 |
+
those paths when downloaded, so selecting a root-level QIPACK in the GUI
|
| 43 |
+
also locates its support files. The six-step pack additionally requires its
|
| 44 |
+
LoRA file beside it. One 14.23 GB pack plus the 18.89 GB shared files requires
|
| 45 |
+
about 33.12 GB of local storage, or 34.48 GB with the 1.36 GB LoRA. “7B”
|
| 46 |
+
describes the transformer's parameter count, not the pipeline's size in bytes.
|
| 47 |
|
| 48 |
+
The four-step file is Viggle v0.1's full transformer, not a LoRA. The six-step
|
| 49 |
+
file contains the original Qwen base transformer with metadata selecting the
|
| 50 |
+
separate Viggle v0.2.1 LoRA and its six-step schedule.
|
| 51 |
|
| 52 |
+
The three QIPACK files use QIPACK1 version 1 with policy
|
| 53 |
`transformer:all-matrix-f16-v4`. All 224 transformer-block matrices are stored
|
| 54 |
as FP16; vectors and the nine global tensors remain BF16. Each pack contains
|
| 55 |
297 tensors and 7,115,124,736 parameters. The format has fixed little-endian
|
| 56 |
+
metadata plus per-tensor and payload checksums. The base and four-step packs
|
| 57 |
+
passed exact round-trip verification against their source tensors.
|
| 58 |
|
| 59 |
## Requirements
|
| 60 |
|
| 61 |
- macOS 14 or newer on Apple Silicon
|
| 62 |
+
- [`qwen-image-cplus`](https://github.com/netdur/qwen-image-cplus); the six-step
|
| 63 |
+
LoRA requires a build with Viggle v0.2.1 support (current `main`)
|
| 64 |
|
| 65 |
The runtime has been tested on an M1 Max with 32 GB unified memory. Lower-memory
|
| 66 |
+
machines have not yet been validated. Generation at 1024x1024 and the model's
|
| 67 |
+
native 2048x2048 resolution is supported; 2048x2048 is a high-memory capacity
|
| 68 |
+
mode on a 32 GB M1 Max.
|
| 69 |
|
| 70 |
## Download
|
| 71 |
|
|
|
|
| 100 |
1301
|
| 101 |
```
|
| 102 |
|
| 103 |
+
Six-step Viggle v0.2.1 LoRA (keep its sidecar safetensors beside the pack):
|
| 104 |
+
|
| 105 |
+
```sh
|
| 106 |
+
qwen-image-cplus generate-1024 \
|
| 107 |
+
models/qwen-image-2.1-viggle-v0.2.1-lora-fp16-v4.qipack \
|
| 108 |
+
models \
|
| 109 |
+
output.png \
|
| 110 |
+
"A vintage travel poster for CASABLANCA reading 'MEET ME AT SUNSET'" \
|
| 111 |
+
1301
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
The pack metadata selects the correct step count, terminal-shift behavior, and
|
| 115 |
cache policy when those optional CLI arguments are omitted.
|
| 116 |
|
|
|
|
| 132 |
The QIPACK files are modified redistributions: their tensor storage layout and
|
| 133 |
selected matrix dtypes were converted for the Apple-Silicon runtime. The model
|
| 134 |
architecture and learned values were not retrained by this project. The
|
| 135 |
+
distilled source model and LoRA were created by Viggle and are attributed in
|
| 136 |
[`NOTICE`](NOTICE).
|
| 137 |
|
| 138 |
The runtime source code has its own MIT license; that license does not replace
|
manifest.json
CHANGED
|
@@ -53,6 +53,41 @@
|
|
| 53 |
"cache": "none"
|
| 54 |
},
|
| 55 |
"verification": "structural validation and exact source round-trip passed"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
}
|
| 57 |
],
|
| 58 |
"support_source": {
|
|
|
|
| 53 |
"cache": "none"
|
| 54 |
},
|
| 55 |
"verification": "structural validation and exact source round-trip passed"
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"path": "qwen-image-2.1-viggle-v0.2.1-lora-fp16-v4.qipack",
|
| 59 |
+
"local_source": "models/qwen-image-2.1-viggle-v0.2.1-lora-fp16-v4.qipack",
|
| 60 |
+
"bytes": 14230327296,
|
| 61 |
+
"sha256": "be2e72ed75d30234a7f1934502d1d95b10eaedc935de2ce06b926b34e1b7b8b4",
|
| 62 |
+
"source": {
|
| 63 |
+
"repository": "Qwen/Qwen-Image-2.1",
|
| 64 |
+
"revision": "b3179ad355be050328e483a9dfdd9e60cd62adfa",
|
| 65 |
+
"component": "transformer",
|
| 66 |
+
"modifications": "QIPACK conversion and metadata selecting the Viggle v0.2.1 LoRA"
|
| 67 |
+
},
|
| 68 |
+
"generation_defaults": {
|
| 69 |
+
"kind": "distilled",
|
| 70 |
+
"steps": 6,
|
| 71 |
+
"shift_terminal": null,
|
| 72 |
+
"cache": "none",
|
| 73 |
+
"schedule": "viggle-v0.2.1-6",
|
| 74 |
+
"adapter": "Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors"
|
| 75 |
+
},
|
| 76 |
+
"verification": "structural validation and native six-step generation passed"
|
| 77 |
+
}
|
| 78 |
+
],
|
| 79 |
+
"adapters": [
|
| 80 |
+
{
|
| 81 |
+
"path": "Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors",
|
| 82 |
+
"local_source": "models/Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors",
|
| 83 |
+
"bytes": 1359147904,
|
| 84 |
+
"sha256": "2a0148f5c73abbed5f97da5ea356e439318aadb281d01fce4af39cdf43728803",
|
| 85 |
+
"source": {
|
| 86 |
+
"repository": "Viggle/Qwen-Image-2.1-viggle-turbo",
|
| 87 |
+
"revision": "139e9492e6b81e85395877a549ec8f0afbb18f8f",
|
| 88 |
+
"component": "Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r256.safetensors"
|
| 89 |
+
},
|
| 90 |
+
"modifications": "none"
|
| 91 |
}
|
| 92 |
],
|
| 93 |
"support_source": {
|