visualbruno's picture
Upload 3 files
542a261 verified
|
Raw History Blame Contribute Delete
2.55 kB
---
license: mit
library_name: comfyui
pipeline_tag: image-to-image
base_model: kandinskylab/Kandinsky-ImageSR-2.0
tags:
- super-resolution
- image-to-image
- kandinsky
- comfyui
- fp8
---
# Kandinsky ImageSR 2.0 — single-file transformers for ComfyUI
Single-file transformer weights of [kandinskylab/Kandinsky-ImageSR-2.0](https://huggingface.co/kandinskylab/Kandinsky-ImageSR-2.0),
a one-step diffusion super-resolution model for ×2 and ×4 upscaling, packaged for the
ComfyUI-Kandinsky-Image-SR-2-0 custom nodes.
| File | Size | Contents |
|---|---:|---|
| `kandinsky_image_sr_2.0_fp8.safetensors` | 4.0 GB | Attention and feed-forward weights in ComfyUI's `float8_e4m3fn` format (per-tensor scales); time modulation precomputed per timestep. Recommended. |
| `kandinsky_image_sr_2.0_bf16.safetensors` | 10.3 GB | The original release transformer, merged into one file (bfloat16 weights, FP32 modulation). |
Only the transformer is included. The VAE is the standard FLUX.1 VAE
(`ae.safetensors` / `flux1_vae_bf16.safetensors`), identical to the one in the original release.
## Usage in ComfyUI
1. Install the ComfyUI-Kandinsky-Image-SR-2-0 custom nodes.
2. Put a transformer file in `models/diffusion_models` (the loader node also downloads it from
this repository) and the FLUX.1 VAE in `models/vae`.
3. **Kandinsky Image SR Model Loader** → **Kandinsky Image SR Upscale** (with **Load VAE** and
your image) → choose `x2` / `x4` and a creativity level 0–8 (4 is the default).
The fp8 weights are dequantized to bfloat16 for each matmul, so they run on any CUDA GPU. On an
RTX 3080 Laptop GPU, a 1024 × 1024 → 2048 × 2048 upscale takes about 26 s with fp8. ComfyUI
offloads weights to system RAM when VRAM is short: fp8 ran with 6 GB of VRAM, and with 4–5 GB
when ComfyUI was started with `--disable-pinned-memory`.
## Quality
Compared with the original bfloat16 Diffusers pipeline on the same image, the fp8 output reaches
52 dB PSNR at ×2 and 44 dB at ×4; 99.9% of pixels differ by at most 6/255 at ×2.
## How the files were made
From the original release bundle: the bf16 file is a lossless merge of the release shards. The fp8 file replaces the time-modulation
layers, which only ever see the 19 baked timesteps, with their precomputed outputs (computed exactly as
the reference pipeline evaluates them), and stores each block linear as FP8 with one FP32 scale per
tensor.
## License
MIT, as the original model by Kandinsky Lab. The FLUX.1 VAE is Apache-2.0 (black-forest-labs/FLUX.1-schnell).