Run this model with HF Jobs
Run houyuanchen/MT-Forcing 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/houyuanchen/MT-Forcing. 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/houyuanchen/MT-Forcing 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 houyuanchen/MT-Forcing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use houyuanchen/MT-Forcing 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("houyuanchen/MT-Forcing", 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
MT Forcing
Multi-turn image editing
๐ผ๏ธ Project Gallery ยท ๐ Paper ยท ๐ป GitHub ยท ๐ค Weights
Introduction
Multi-turn image editing lets people refine an image as their ideas evolve, building on each edit without starting over. Yet many image editors begin to drift after just a few turns. Artifacts accumulate and fine details fade. Regions outside the requested edit can also change, and earlier edits may be altered or lost.
MT Forcing trains an image editor on sequences of its own outputs. At each turn, a teacher applies the instructions so far to the original image in one pass, providing a reference for visual quality. The model also learns from reference editing sequences to preserve earlier changes. This release applies the method to SenseNova U1.5 8B MoT. Read the paper.
Model Weights
Recommended for Python inference. Download the SGF step-1000 checkpoint in BF16 (35.07 GB). Download model-v0.1.safetensors.
For ComfyUI, download the same weights in ComfyUI format and place the file in ComfyUI/models/checkpoints/. Download the v0.1 ComfyUI checkpoint.
The earlier Python checkpoint is also available. Download model.safetensors.
Quick Start with Python
From the inference repository, use Python 3.11.13 and an NVIDIA CUDA GPU. For the recommended v0.1 weights, copy configs/inference.yaml to configs/local_demo.yaml. Set model.weight_path to the downloaded model-v0.1.safetensors file. Set model.model_path and model.tokenizer_path to your U1.5 architecture and extended tokenizer directories. Checkpoint setup guide.
Place a photo of a mug at examples/input.jpg and save the following as examples/edit.json:
{
"image": "input.jpg",
"prompts": [
"Turn the mug blue.",
"Paint thin white stripes around the blue mug."
]
}
Run both edits in one session and inspect the image saved after each turn in outputs/demo/round_000/ and outputs/demo/round_001/.
python -m inference.run --config configs/local_demo.yaml --request examples/edit.json
Using MT-Forcing-Prompt-Enhancer
For short requests, we recommend expanding each instruction with MT-Forcing-Prompt-Enhancer before passing it to the editor. Give the enhancer the image you want to edit and the user's instruction. It returns an English prompt describing what to change and which details to preserve.
From the inference repository, download the enhancer into your working directory. Prompt enhancer weights
hf download houyuanchen/MT-Forcing --include 'MT-Forcing-Prompt-Enhancer/*' --local-dir .
Run this example in the Python quick-start environment to expand the first mug edit.
import torch
from PIL import Image
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
weights = "./MT-Forcing-Prompt-Enhancer"
processor = AutoProcessor.from_pretrained(weights)
pe = Qwen3_5ForConditionalGeneration.from_pretrained(
weights, dtype=torch.bfloat16, device_map="cuda:0"
).eval()
# System message used for PE training.
SYSTEM_PROMPT = (
"Enhance the user's image-editing request into a detailed English prompt for an image "
"editor. Each turn supplies the current source image. At turn t, use Image-t as the "
"editing base and describe how to produce Image-(t+1). Use earlier images and "
"instructions as history. Preserve prior edits and all details outside the requested "
"change.\n"
"For a camera orbit, follow the requested direction and angle around the stationary "
"scene. Explain the resulting viewpoint, framing, visible surfaces and occlusions. "
"Maintain elevation and focal length unless requested otherwise. For other edits, "
"specify the requested change and the appearance, identity, layout and viewpoint that "
"should be preserved. Return only the enhanced English editing prompt.\n"
)
@torch.inference_mode()
def expand(source_image, instruction):
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": [
{"type": "image", "image": source_image},
{"type": "text", "text": instruction},
]},
]
inputs = processor.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, enable_thinking=False,
return_dict=True, return_tensors="pt",
).to(pe.device)
tokens = pe.generate(**inputs, do_sample=False, max_new_tokens=768)
return processor.decode(tokens[0, inputs.input_ids.shape[1]:], skip_special_tokens=True).strip()
with Image.open("examples/input.jpg") as source:
print(expand(source.convert("RGB"), "Turn the mug blue."))
Use the printed prompt as the first entry in examples/edit.json under prompts. To expand the second instruction, call expand with the image produced by the first edit (the blue mug) and "Paint thin white stripes around the blue mug.". Put that result in the second entry. Once the prompts are ready, run the same python -m inference.run command above.
Showcase
Stronger multi-turn editing
MT Forcing helps SenseNova U1.5 preserve fine detail and carry earlier edits forward as new instructions are applied.
Stable image quality across 100 edits
By turn 100, the SenseNova U1.5 baseline (left) has broken down, and Seedream 5.5 (center) shows ripple artifacts. SenseNova U1.5 with MT Forcing (right) retains the best image quality in this comparison.
Stop-motion animation
With MT Forcing, you can do some amazing things, such as creating a stop-motion animation.
Multi-turn editing in ComfyUI
We also support Comfyui.
To use the same weights, download the checkpoint and place it in ComfyUI/models/checkpoints/. Download the ComfyUI checkpoint.
Stay tuned for updates on multi-turn editing in ComfyUI! ComfyUI PR #18021
License
The model weights are released under the Apache License 2.0.
Citation
@misc{chen2026mtforcing,
title = {{MT Forcing}: Towards Stable and Consistent Multi-Turn Image Editing with Autoregressive Diffusion},
author = {Houyuan Chen and Fanzhou Wang and Xiangyu Fan and Zesong Qiu and Yukun Wei and Songlin Yang and Zhitao Yang and Lvmin Zhang and Pei Yang and Hao Zhao and Dahua Lin and Lei Yang and Anyi Rao},
year = {2026},
eprint = {2610.25404},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2610.25404}
}
- Downloads last month
- 789
