Color Grade Transfer
Apply the color grade from one image to another image
"Color Grade Transfer — Instant cinematic tone matching without manual wheels."
Try it here: Color Grade Transfer on Hugging Face
Traditional color grading means fighting with curves, LUTs, and wheels just to get two different images to look cohesive.
Color Grade Transfer fixes this. You drop a source image and a style reference onto the page, and it copies the cinematic palette directly onto your image —without changing your original content.
The app runs entirely local-first on the Space's own GPU using Diffusers and a Gradio frontend. No external APIs are called.
We stack a 4-step speed adapter alongside a custom-trained style LoRA onto a 20B base model:
Qwen/Qwen-Image-Edit-2511 (20B parameters — well under the 32B hackathon limit)Qwen-Image-Edit-2511-Lightning (Brings inference down to 4 steps)QIE-2511-Color-Grade-Transfer-LoRA# Stacking the speed and style adapters seamlessly
pipe.load_lora_weights("lightx2v/Qwen-Image-Edit-2511-Lightning", adapter_name="lightning")
pipe.load_lora_weights("ovi054/QIE-2511-Color-Grade-Transfer-LoRA", adapter_name="color")
pipe.set_adapters(["lightning", "color"], adapter_weights=[1.0, 1.0])
Standard diffusion models often warp or shift pixels when changing colors. This happens because the model's internal RoPE (Rotary Position Embedding) coordinate grids misalign if the image dimensions don't match the internal 1-Megapixel (1MP) conditioning scale.
I fixed this by adding an Aspect Ratio Alignment step that forces the dimensions to match a 1MP scale while snapping perfectly to multiples of 32:
def calculate_vae_gen_size(image: Image.Image) -> tuple:
W, H = image.size
ratio = W / H
gen_w = math.sqrt(1024 * 1024 * ratio)
gen_h = gen_w / ratio
# Snap cleanly to multiples of 32 to lock the coordinate grid
gen_w = round(gen_w / 32) * 32
gen_h = round(gen_h / 32) * 32
return int(gen_w), int(gen_h)
This guarantees that only the color scheme changes, keeping your original shapes and characters completely untouched.
Because the model decouples layout from colors, it smoothly handles any pairing: Character-to-Character, Scene-to-Scene, or mixed pairs.
The UI features a clean gr.ImageSlider running on a Gradio Citrus theme wrapper so you can interactively wipe between before and after. Plus, it initiates with mcp_server=True. It can act as a native Model Context Protocol tool for clients like Claude Desktop—allowing an AI agent to color-grade files directly inside your terminal workflow.
It's also fully local ready — clone the repo and run it straight on your own GPU.
When your generation loses the tone, let it handle the grading. ;)
Try it here: Color Grade Transfer on Hugging Face
Apply the color grade from one image to another image