Datasets:

Languages:
English
ArXiv:
License:
EndoCoT-Data / README.md
yuhangzang's picture
Add task category and update license metadata (#1)
c72507c
metadata
language:
  - en
license: cc-by-nc-4.0
task_categories:
  - image-to-image
datasets:
  - internlm/EndoCoT-Data
base_model:
  - Qwen/Qwen-Image-Edit-2511

EndoCoT




Teaser

EndoCoT: Scaling Endogenous Chain-of-Thought Reasoning in Diffusion Models

This repository contains the training data for EndoCoT, a novel framework that activates the reasoning potential of Multimodal Large Language Models (MLLMs) within diffusion frameworks through an iterative thought guidance module.

🌟 Highlights

  • EndoCoT is a reasoning paradigm for diffusion models that enables step-by-step inference.
  • It outperforms conventional training methods on complex tasks like Maze, TSP, VSP, and Sudoku.
  • Provides transparent, intermediate reasoning trajectories.

⚡ Quick Start

Setup environment

git clone https://github.com/InternLM/EndoCoT
cd EndoCoT
conda create -n EndoCoT python=3.10
conda activate EndoCot
pip install -r requirements.txt

Sample Usage (Inference)

To test a single case using the codebase:

cd test
python test.py \
    --task Maze \
    --model_root /path/to/merged_ckpts \
    --lora_path /path/to/your_lora_weight.safetensors \
    --input_image ./data/sudoku_sample.png \
    --output_dir ./outputs/sudoku_results

Training

  1. Download the datasets & metadata.csv and ensure they are placed in the same directory.
  2. Run the training scripts:
cd DiffSynth-Studio
bash add/Maze/stage1.sh
python change_ckpt_prefix.py --src /path/to/the/Maze/save/dir/Maze_stage1	
bash add/Maze/stage2.sh
python change_ckpt_prefix.py --src /path/to/the/Maze/save/dir/Maze_stage2

📰 News

📖 Citation

@article{dai2026endocot,
  title={EndoCoT: Scaling Endogenous Chain-of-Thought Reasoning in Diffusion Models},
  author={Dai, Xuanlang and Zhou, Yujie and Xing, Long and Bu, Jiazi and Wei, Xilin and Liu, Yuhong and Zhang, Beichen and Chen, Kai and Zang, Yuhang},
  journal={arXiv preprint arXiv:2603.12252},
  year={2026}
}

⚖️ License

The code in the associated repository is licensed under the MIT License. The dataset is licensed under the CC BY-NC 4.0 License.