Run this model with HF Jobs
Run kandinskylab/Kandinsky-ImageSR-2.0-Diffusers on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/kandinskylab/Kandinsky-ImageSR-2.0-Diffusers. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/kandinskylab/Kandinsky-ImageSR-2.0-Diffusers on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use kandinskylab/Kandinsky-ImageSR-2.0-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kandinskylab/Kandinsky-ImageSR-2.0-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("kandinskylab/Kandinsky-ImageSR-2.0-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Kandinsky ImageSR 2.0 (Diffusers)
Kandinsky ImageSR 2.0 in the native Diffusers format. One transformer enhances an image at its original resolution (Γ1) or upscales it Γ2 or Γ4 in a single flow step. Creativity levels 0β8 trade fidelity for synthesized detail; level 4 is the default.
The weights are the same as in kandinskylab/Kandinsky-ImageSR-2.0; only the configs differ.
import torch
from diffusers import ModularPipeline
from diffusers.utils import load_image
pipe = ModularPipeline.from_pretrained("kandinskylab/Kandinsky-ImageSR-2.0-Diffusers")
pipe.load_components(dtype=torch.bfloat16)
pipe.to("cuda")
image = load_image("input.png")
pipe(image=image, upscale_factor=4, creativity=4, output="images")[0].save("output.png")
| Scale | Creativity range (t) |
Default (level 4) |
|---|---|---|
| Γ1 | 0.005β0.118 | 0.05 |
| Γ2 | 0.07β0.30 | 0.15 |
| Γ4 | 0.17β0.38 | 0.244 |
Choose lower levels for fine text and details you want to preserve. Inputs are treated as sRGB.
Quantized transformer: GGUF Q8_0 β load it with
KandinskyImageSRTransformer3DModel.from_single_file and swap it in with pipe.update_components(transformer=...).
The code and model use the MIT License. The bundled VAE comes from the Apache-2.0-licensed
black-forest-labs/FLUX.1-schnell release.
- Downloads last month
- 91
Model tree for kandinskylab/Kandinsky-ImageSR-2.0-Diffusers
Base model
kandinskylab/Kandinsky-ImageSR-2.0