[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-11501":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":14,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":13,"lastSyncTime":27,"discoverSource":28},11501,"CDM","byliutao\u002FCDM","byliutao","Continuous-Time Distribution Matching for Few-Step Diffusion Distillation👏",null,"Python",140,6,2,3,0,1,38,2.54,"MIT License",false,"main",true,[],"2026-06-12 02:02:32","\u003Ch1 align=\"center\">\n  Continuous-Time Distribution Matching for Few-Step Diffusion Distillation\n\u003C\u002Fh1>\n\n\u003Cdiv align=\"center\">\n\n\u003Ca href=\"https:\u002F\u002Fbyliutao.github.io\u002Fcdm_page\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject_Page-0055b3?logo=githubpages&logoColor=white\" alt=\"Project Page\">\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fbyliutao\u002Fstable-diffusion-3-medium-turbo\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Model-SD3_Medium-ffc107\" alt=\"SD3-Medium Model\">\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fbyliutao\u002FLongcat-Image-Turbo\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Model-LongCat-ffc107\" alt=\"LongCat Model\">\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbyliutao\u002Fcdm\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitHub-byliutao%2Fcdm-black?logo=github&logoColor=white\" alt=\"GitHub\">\n\u003C\u002Fa>\n\u003Ca href=\"http:\u002F\u002Farxiv.org\u002Fabs\u002F2605.06376\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-2605.06376-b31b1b?logo=arxiv&logoColor=white\" alt=\"arXiv Paper\">\n\u003C\u002Fa>\n\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#algorithm-overview\">Algorithm Overview\u003C\u002Fa> •\n  \u003Ca href=\"#4-nfe-generation-results\">Results\u003C\u002Fa> •\n  \u003Ca href=\"#inference\">Inference\u003C\u002Fa> •\n  \u003Ca href=\"#training\">Training\u003C\u002Fa> •\n  \u003Ca href=\"#evaluation\">Evaluation\u003C\u002Fa> •\n  \u003Ca href=\"#citation\">Citation\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fteaser.png\" width=\"95%\" alt=\"Teaser: High-quality images generated with only 4 NFE\">\n\u003C\u002Fp>\n\n## Algorithm Overview\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fpipe.png\" width=\"90%\" alt=\"Pipeline overview of Continuous-Time Distribution Matching\">\n\u003C\u002Fp>\n\n**Overview of Continuous-Time Distribution Matching (CDM).** **Top:** Our approach employs a dynamic continuous time schedule during backward simulation, sampling intermediate anchors uniformly from (0, 1]. **Bottom Left:** CFG augmentation (CA) and distribution matching (DM) operate on this dynamic schedule to align text-image conditions and data distributions at on-trajectory anchors. **Bottom Right:** To address inter-anchor inconsistency, the proposed CDM objective explicitly extrapolates off-trajectory latents using the predicted velocity.\n\n## 4-NFE Generation Results\n\n### SD3-Medium\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fsd3.png\" width=\"90%\" alt=\"SD3.5-Medium 4-NFE generation samples\">\n\u003C\u002Fp>\n\n### LongCat\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Flongcat.png\" width=\"90%\" alt=\"LongCat 4-NFE generation samples\">\n\u003C\u002Fp>\n\n---\n\n## Inference\n\n```bash\n# Clone this repository\ngit clone https:\u002F\u002Fgithub.com\u002Fbyliutao\u002Fcdm.git\ncd cdm\n\n# [Optional] Use HuggingFace mirror if huggingface.co is not accessible\nexport HF_ENDPOINT=\"https:\u002F\u002Fhf-mirror.com\"\nexport HF_TOKEN=\"hf_xxx\"\n\n# Create and activate the inference environment\nconda create -n cdm_infer python=3.10\nconda activate cdm_infer\npip install -r config\u002Frequirements_infer.txt\n\n# Run inference\npython scripts\u002Finfer\u002Fsd3_m.py   # SD3-Medium\npython scripts\u002Finfer\u002Flongcat.py # LongCat\n```\n\n## Training\n\n```bash\n# Create and activate the training environment\nconda create -n cdm_train python=3.10\nconda activate cdm_train\npip install -r config\u002Frequirements_train.txt\npip install flash-attn==2.7.4.post1 --no-build-isolation  # May take 1-2 hours\n\n# Launch training with FSDP2\naccelerate launch --config_file config\u002Faccelerate_fsdp2.yaml \\\n    --num_processes 8 -m scripts.train \\\n    --config config\u002Fconfig.py:sd3      # SD3-Medium\n\naccelerate launch --config_file config\u002Faccelerate_fsdp2.yaml \\\n    --num_processes 8 -m scripts.train \\\n    --config config\u002Fconfig.py:longcat  # LongCat\n```\n\n## Evaluation\n\nEvaluation is split into two phases: **image generation** and **metric computation**.\n\n### Step 1 — Export a checkpoint to a pipeline\n\n```bash\nconda activate cdm_train\n\npython -m scripts.save \\\n    --experiment_dir \"logs\u002Fexperiments\u002Fsd3\u002Ftest\" \\\n    --output_dir \"logs\u002Fpipelines\u002Ftest\" \\\n    --checkpoint_steps \"2000\"\n```\n\n### Step 2 — Generate images\n\n```bash\naccelerate launch --num_processes 8 -m scripts.eval \\\n    --phase generate \\\n    --model_path \"logs\u002Fpipelines\u002Ftest\u002Fcheckpoint-2000\" \\\n    --eval_metrics imagereward clipscore pickscore hpsv2 hpsv3 aesthetic ocr dpgbench \\\n    --output_dir \"logs\u002Fevaluations\u002Ftest\" \\\n    --base_model sd3 \\\n    --save_images\n```\n\n### Step 3 — Compute metrics\n\n```bash\n# Create a separate environment for evaluation dependencies\nconda create -n cdm_eval python=3.10\nconda activate cdm_eval\npip install -r config\u002Frequirements_eval.txt\npip install image-reward --no-deps\npip install fairseq --no-deps\n\n# NOTE: If running on multiple GPUs, download checkpoints on 1 GPU first.\n# For FID evaluation, place download ref image from byliutao\u002Fcoco2014val_10k and put it under dataset\u002Fcoco2014val_10k\n\naccelerate launch --num_processes 8 -m scripts.eval \\\n    --phase evaluate \\\n    --eval_metrics imagereward clipscore pickscore hpsv2 hpsv3 aesthetic ocr dpgbench \\\n    --output_dir \"logs\u002Fevaluations\u002Ftest\"\n```\n\n## License\n\nThis project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.\n\n## Citation\n\nIf our work assists your research, please consider giving us a star ⭐ or citing us:\n\n```bibtex\n@misc{liu2026continuoustimedistributionmatchingfewstep,\n      title={Continuous-Time Distribution Matching for Few-Step Diffusion Distillation}, \n      author={Tao Liu and Hao Yan and Mengting Chen and Taihang Hu and Zhengrong Yue and Zihao Pan and Jinsong Lan and Xiaoyong Zhu and Ming-Ming Cheng and Bo Zheng and Yaxing Wang},\n      year={2026},\n      eprint={2605.06376},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.06376}, \n}\n```\n","该项目通过连续时间分布匹配技术实现了少步扩散蒸馏，旨在减少生成高质量图像所需的计算步骤。其核心功能包括动态连续时间调度、CFG增强以及分布匹配等，这些技术共同作用于文本-图像条件对齐与数据分布匹配上，同时解决了锚点间的一致性问题。项目提供了两种预训练模型（SD3-Medium和LongCat），能够在仅4次噪声函数评估下生成高保真度图像。适合用于需要高效生成高质量图像的场景，如快速原型设计、创意内容生产等领域。","2026-06-11 03:32:02","CREATED_QUERY"]