Jeveration_ComfyUI / README.md
messerschmit666's picture
Add t2i workflow, update README
f518e7d verified
|
Raw History Blame Contribute Delete
7.76 kB
---
license: apache-2.0
base_model: linlinlinlinsdada/Jeveration
pipeline_tag: text-to-image
language:
- en
tags:
- comfyui
- text-to-image
---
# Jeveration for ComfyUI
This repository adds [Jeveration](https://huggingface.co/linlinlinlinsdada/Jeveration) text-to-image support to
[ComfyUI](https://github.com/Comfy-Org/ComfyUI). Jeveration produces a 512 x 512 image in a single forward pass. It
contains:
| File | What |
|---|---|
| `jeveration_t2i_int8_convrot.safetensors` | ready-made checkpoint (6.7 GB): int8 ConvRot backbone, everything else bf16 |
| `comfyui-jeveration-v0.46.1.patch` | ComfyUI patch, made against tag `v0.46.1`: model, decoder, text encoder, two nodes |
| `jeveration_t2i_workflow.json` | text-to-image workflow, drag it onto the ComfyUI canvas |
| `convert_jeveration.py` | builds a single ComfyUI checkpoint (`.safetensors`) from the original weights |
| `LICENSE`, `NOTICE` | Apache License 2.0 and the NOTICE of the original Jeveration project |
The scope is text-to-image only. The image-to-image and dense-prediction tasks of the original model are not ported.
## Credits
All credit for the model goes to its authors:
- **Jeveration**, by Yuhe Liu, Qi Li, Shihua Zhang and Xinchao Wang.
[Paper](https://arxiv.org/abs/2611.24738) · [Code](https://github.com/Carol-lyh/Jeveration) ·
[Weights](https://huggingface.co/linlinlinlinsdada/Jeveration) · [Project page](https://carol-lyh.github.io/Jeveration/).
Apache 2.0.
- **Qwen3.5-4B**, by the Qwen team, Alibaba Cloud: [`Qwen/Qwen3.5-4B`](https://huggingface.co/Qwen/Qwen3.5-4B), the
backbone. Apache 2.0.
- **TA-TiTok**, by ByteDance: [1d-tokenizer](https://github.com/bytedance/1d-tokenizer) and
[`turkeyju/tokenizer_tatitok_bl128_vq`](https://huggingface.co/turkeyju/tokenizer_tatitok_bl128_vq), which provide
the codebook and the base of the image decoder. Apache 2.0.
- **CLIP ViT-L/14-336**, by OpenAI:
[`timm/vit_large_patch14_clip_336.openai`](https://huggingface.co/timm/vit_large_patch14_clip_336.openai), the
decoder's text tower. Apache 2.0 (model card).
```bibtex
@article{liu2026jeveration,
title = {Jeveration: System One Models Now Generate},
author = {Liu, Yuhe and Li, Qi and Zhang, Shihua and Wang, Xinchao},
journal = {arXiv preprint arXiv:2611.24738},
year = {2026}
}
```
## 1. Patch ComfyUI
The patch was made against ComfyUI `v0.46.1`. It adds four new files and appends a few lines to six existing ones
(`comfy/latent_formats.py`, `comfy/model_base.py`, `comfy/model_detection.py`, `comfy/sd.py`,
`comfy/supported_models.py`, `nodes.py`). Nothing is deleted or rewritten.
**Fresh install (git):**
```bash
git clone https://github.com/Comfy-Org/ComfyUI && cd ComfyUI
git checkout v0.46.1
git apply /path/to/comfyui-jeveration-v0.46.1.patch
pip install -r requirements.txt # plus PyTorch for your GPU, as in ComfyUI's README
```
**Existing git install:** commit or stash your own changes first, then put the patch on a branch:
```bash
cd ComfyUI
git fetch --tags
git checkout -b jeveration v0.46.1
git apply --check /path/to/comfyui-jeveration-v0.46.1.patch # prints nothing if it applies
git apply /path/to/comfyui-jeveration-v0.46.1.patch
pip install -r requirements.txt
```
On a newer ComfyUI release, try `git apply --3way` instead. It merges small upstream changes around the touched lines
and leaves conflict markers where it cannot.
**Without git** (for example, an extracted portable or zip release of v0.46.1). Run this from the ComfyUI folder that
contains `main.py`; with the Windows portable build, that is `ComfyUI_windows_portable/ComfyUI`:
```bash
patch -p1 --dry-run < /path/to/comfyui-jeveration-v0.46.1.patch # check first
patch -p1 < /path/to/comfyui-jeveration-v0.46.1.patch
```
**Check:** start ComfyUI and search for "Jeveration" in the node library. *Jeveration Sampler* and *Jeveration Decode*
should be listed.
**Undo:** use `git apply -R /path/to/comfyui-jeveration-v0.46.1.patch` or `patch -p1 -R < ...`, or switch back to your
previous branch.
## 2. Get the checkpoint
Put `jeveration_t2i_int8_convrot.safetensors` from this repository in `ComfyUI/models/checkpoints/`:
```bash
hf download messerschmit666/Jeveration_ComfyUI jeveration_t2i_int8_convrot.safetensors --local-dir models/checkpoints
```
To build it yourself instead, or to build the bf16 variant, download the original weights into one folder:
```bash
hf download linlinlinlinsdada/Jeveration jeveration.pt decoder512.pt --local-dir weights/jeveration
hf download Qwen/Qwen3.5-4B --include "*.safetensors" --local-dir weights/qwen35_4b
hf download turkeyju/tokenizer_tatitok_bl128_vq model.safetensors --local-dir weights/tatitok
hf download timm/vit_large_patch14_clip_336.openai open_clip_model.safetensors --local-dir weights/clip336
```
Run the conversion from the ComfyUI root, in ComfyUI's Python environment. Either variant takes a few minutes:
```bash
# bf16, 10.3 GB
python /path/to/convert_jeveration.py weights models/checkpoints/jeveration_t2i_bf16.safetensors
# int8 ConvRot backbone, 6.7 GB
python /path/to/convert_jeveration.py --int8-convrot weights models/checkpoints/jeveration_t2i_int8_convrot.safetensors
```
The script:
- merges the rank-256 LoRA into the Qwen3.5-4B language model in fp32;
- adds the image head, the codebook, the TA-TiTok 512 px decoder and the CLIP-L-336 text tower;
- writes everything as one checkpoint.
The `.pt` files are read with `torch.load(weights_only=True)`. The script uses no network access.
`--int8-convrot` stores the backbone's attention, linear-attention and MLP weights in ComfyUI's `int8_tensorwise`
format with ConvRot (per-channel scale, Hadamard group 256). They are quantized from the merged fp32 weights. All other
weights stay bf16.
## 3. Workflow
```
Load Checkpoint ─┬─ MODEL ──────────────────────────────────────────┐
├─ CLIP ── CLIP Text Encode ── positive ─┐ │
└─ VAE ─────────────┐ │ │
│ Jeveration Sampler (model, positive, seed, batch_size)
│ │ LATENT
Jeveration Decode (vae, samples, positive) ── IMAGE ── Save Image
```
Load `jeveration_t2i_workflow.json` from this repository, or build it yourself: use the stock **Load Checkpoint** and
**CLIP Text Encode** nodes. There is no sampler schedule, CFG or step count: the
image comes from one forward pass and one sampling draw. Prompts are English, and only the first 128 Qwen tokens are
used.
## Accuracy and speed
The port was compared against the reference pipeline on fixed inputs (states, noise and prompts dumped from the
original code):
| | bf16 | int8 ConvRot |
|---|---|---|
| Prompt token ids | identical | identical |
| CLIP guidance cosine | 0.99998 | 0.99998 |
| Code logits KL vs reference | 3e-3 to 2e-2 | 8e-3 to 9e-2 |
| Top-1 code agreement | 88–95 % | 77–93 % |
| Decoder PSNR vs reference image | 46.5–48.4 dB | same decoder (bf16) |
The bf16 deviations come from merging the LoRA into bf16 weights and from ComfyUI's backbone kernels; they are not
visible in images. The int8 checkpoint gives the same compositions with small changes in detail.
On an RTX 5060 Ti 16 GB, once the model is loaded, one 512 x 512 image takes 0.6 to 0.8 s. With the int8 ConvRot
checkpoint, a batch of 4 images takes under 1 s.
Seeds are deterministic in ComfyUI, but they do not reproduce the exact pixels of the original pipeline for the same
seed number, because the random draws are made differently.