[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-bytedance--UNO":3,"tool-bytedance--UNO":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",150037,2,"2026-04-10T23:33:47",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":77,"owner_website":78,"owner_url":79,"languages":80,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":10,"env_os":89,"env_gpu":90,"env_ram":91,"env_deps":92,"category_tags":101,"github_topics":102,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":111,"updated_at":112,"faqs":113,"releases":150},6423,"bytedance\u002FUNO","UNO","[ICCV 2025] 🔥🔥  UNO: A Universal Customization Method for Both Single and Multi-Subject Conditioning","UNO 是由字节跳动智能创作团队推出的通用图像定制方法，专为单主体及多主体条件生成设计。它主要解决了传统 AI 绘图在同时处理多个特定对象时，难以保持角色特征一致性或无法灵活组合不同主体的痛点。无论是想将特定人物放入新场景，还是让多个不同角色在同一画面中互动，UNO 都能实现高度可控且自然的生成效果。\n\n该工具适合研究人员探索少样本到多样本生成的泛化机制，也适合开发者集成高精度定制功能，同时设计师和普通用户也能通过其提供的 Demo 轻松体验“上下文生成”带来的创意自由。UNO 的核心技术亮点在于“由少到多”的泛化策略，利用上下文学习（In-Context Generation）解锁更强的控制力，无需针对每个新主体重新训练模型。此外，项目已开源训练代码、发布包含百万级配对图像的 UNO-1M 数据集，并支持 fp8 模式以降低显存需求，使消费级显卡用户也能流畅运行。作为 ICCV 2025 收录成果，UNO 为高质量、多主体的个性化图像生成提供了高效通用的解决方案。","\u003Ch3 align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_07cb42d8c403.png\" alt=\"Logo\" style=\"vertical-align: middle; width: 40px; height: 40px;\">\n    Less-to-More Generalization: \u003C\u002Fbr>Unlocking More Controllability by In-Context Generation\n\u003C\u002Fh3>\n\n\u003Cp align=\"center\"> \n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO\">\u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fbytedance\u002FUNO\">\u003C\u002Fa> \n\u003Ca href=\"https:\u002F\u002Fbytedance.github.io\u002FUNO\u002F\">\u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject%20Page-UNO-blue\">\u003C\u002Fa> \n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.02160\">\u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv%20paper-UNO-b31b1b.svg\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fbytedance-research\u002FUNO\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=%F0%9F%A4%97%20Hugging%20Face&message=Model&color=green\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbytedance-research\u002FUNO-1M\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=%F0%9F%A4%97%20Hugging%20Face&message=Dataset&color=yellow\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbytedance-research\u002FUNO-FLUX\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=%F0%9F%A4%97%20Hugging%20Face&message=demo&color=orange\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n>\u003Cp align=\"center\"> \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">Shaojin Wu,\u003C\u002Fspan>\u003Csup>\u003C\u002Fsup>\u003C\u002Fa>  \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">Mengqi Huang\u003C\u002Fspan>\u003Csup>*\u003C\u002Fsup>,\u003C\u002Fa> \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">Wenxu Wu,\u003C\u002Fspan>\u003Csup>\u003C\u002Fsup>\u003C\u002Fa>  \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">Yufeng Cheng,\u003C\u002Fspan>\u003Csup>\u003C\u002Fsup> \u003C\u002Fa>  \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">Fei Ding\u003C\u002Fspan>\u003Csup>+\u003C\u002Fsup>,\u003C\u002Fa> \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">Qian He\u003C\u002Fspan>\u003C\u002Fa> \u003Cbr> \n>\u003Cspan style=\"font-size: 16px\">Intelligent Creation Team, ByteDance\u003C\u002Fspan>\u003C\u002Fp>\n\n## 🔥 News\n* **2025.09.12** 🔥 [UMO](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUMO) is here! It can freely combine one-to-many identity with any subjects in any scenarios, delivering outputs with high subject\u002Fidentity consistency. You now can experience a more powerful UNO or OmniGen2 [here](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUMO)! You can also visit our \u003Ca href=\"https:\u002F\u002Fbytedance.github.io\u002FUMO\u002F\" target=\"_blank\">project page\u003C\u002Fa> for more examples. 🔥\n\u003Cdiv style=\"text-align: center; margin: 10px 0;\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_de1520839158.webp\" width=\"100%\" height=\"auto\" alt=\"UMO Project Demo\">\n\u003Cp style=\"font-size: 12px; font-family: 'Gill Sans', sans-serif; color: #666; margin-top: 8px;\">\n\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n* **2025.08.29** 🔥 We are excited to share our new open-source project [USO](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUSO), which can freely combine any subjects with any styles in any scenarios while ensuring photorealistic results. You can also visit our \u003Ca href=\"https:\u002F\u002Fbytedance.github.io\u002FUSO\u002F\" target=\"_blank\">project page\u003C\u002Fa> or try the \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbytedance-research\u002FUSO\" target=\"_blank\">live demo\u003C\u002Fa> for more examples. 🔥\n\u003Cdiv style=\"text-align: center; margin: 10px 0;\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_fa9baae75b8e.webp\" width=\"100%\" height=\"auto\" alt=\"USO Project Demo\">\n\u003Cp style=\"font-size: 12px; font-family: 'Gill Sans', sans-serif; color: #666; margin-top: 8px;\">\n\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n* **2025.08.18** ✨ We open-sourced the [UNO-1M](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbytedance-research\u002FUNO-1M) dataset, which is a large and high-quality dataset (~1M paired images). We hope it can further benefit research.\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_356b795e437b.webp\" width=30% height=\"auto\">\n\u003C\u002Fp>\n\n* **2025.06.26** 🎉 Congratulations! UNO has been accepted by ICCV 2025!\n* **2025.04.16** 🔥 Our companion project [RealCustom](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FRealCustom) is released.\n* **2025.04.10** 🔥 Update fp8 mode as a primary low vmemory usage support. Gift for consumer-grade GPU users. The peak Vmemory usage is ~16GB now. We may try further inference optimization later.\n* **2025.04.03** 🔥 The [demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbytedance-research\u002FUNO-FLUX) of UNO is released.\n* **2025.04.03** 🔥 The [training code](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO), [inference code](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO), and [model](https:\u002F\u002Fhuggingface.co\u002Fbytedance-research\u002FUNO) of UNO are released.\n* **2025.04.02** 🔥 The [project page](https:\u002F\u002Fbytedance.github.io\u002FUNO) of UNO is created.\n* **2025.04.02** 🔥 The arXiv [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.02160) of UNO is released.\n\n## 📖 Introduction\nIn this study, we propose a highly-consistent data synthesis pipeline to tackle this challenge. This pipeline harnesses the intrinsic in-context generation capabilities of diffusion transformers and generates high-consistency multi-subject paired data. Additionally, we introduce UNO, which consists of progressive cross-modal alignment and universal rotary position embedding. It is a multi-image conditioned subject-to-image model iteratively trained from a text-to-image model. Extensive experiments show that our method can achieve high consistency while ensuring controllability in both single-subject and multi-subject driven generation.\n\n\n## ⚡️ Quick Start\n\n### 🔧 Requirements and Installation\n\nInstall the requirements\n```bash\n# pip install -r requirements.txt # legacy installation command\n\n## create a virtual environment with python >= 3.10 \u003C= 3.12, like\n# python -m venv uno_env\n# source uno_env\u002Fbin\u002Factivate\n# or\n# conda create -n uno_env python=3.10 -y\n# conda activate uno_env\n# then install the requirements by you need\n\n# !!! if you are using amd GPU\u002FNV RTX50 series\u002Fmacos MPS, you should install the correct torch version by yourself first\n# !!! then run the install command\npip install -e .  # for who wanna to run the demo\u002Finference only\npip install -e .[train]  # for who also want to train the model\n```\n\nthen download checkpoints in one of the three ways:\n1. Directly run the inference scripts, the checkpoints will be downloaded automatically by the `hf_hub_download` function in the code to your `$HF_HOME`(the default value is `~\u002F.cache\u002Fhuggingface`).\n2. use `huggingface-cli download \u003Crepo name>` to download `black-forest-labs\u002FFLUX.1-dev`, `xlabs-ai\u002Fxflux_text_encoders`, `openai\u002Fclip-vit-large-patch14`, `bytedance-research\u002FUNO`, then run the inference scripts. You can just download the checkpoint in need only to speed up your set up and save your disk space. i.e. for `black-forest-labs\u002FFLUX.1-dev` use `huggingface-cli download black-forest-labs\u002FFLUX.1-dev flux1-dev.safetensors` and `huggingface-cli download black-forest-labs\u002FFLUX.1-dev ae.safetensors`, ignoreing the text encoder in `black-forest-labes\u002FFLUX.1-dev` model repo(They are here for `diffusers` call). All of the checkpoints will take 37 GB of disk space.\n3. use `huggingface-cli download \u003Crepo name> --local-dir \u003CLOCAL_DIR>` to download all the checkpoints mentioned in 2. to the directories your want. Then set the environment variable `AE`, `FLUX_DEV`(or `FLUX_DEV_FP8` if you use fp8 mode), `T5`, `CLIP`, `LORA` to the corresponding paths. Finally, run the inference scripts.\n4. **If you already have some of the checkpoints**, you can set the environment variable `AE`, `FLUX_DEV`, `T5`, `CLIP`, `LORA` to the corresponding paths. Finally, run the inference scripts.\n\n### 🌟 Gradio Demo\n\n```bash\npython app.py\n```\n\n**For low vmemory usage**, please pass the `--offload` and `--name flux-dev-fp8` args. The peak memory usage will be 16GB. Just for reference, the end2end inference time is 40s to 1min on RTX 3090 in fp8 and offload mode.\n\n```bash\npython app.py --offload --name flux-dev-fp8\n```\n\n\n### ✍️ Inference\nStart from the examples below to explore and spark your creativity. ✨\n```bash\npython inference.py --prompt \"A clock on the beach is under a red sun umbrella\" --image_paths \"assets\u002Fclock.png\" --width 704 --height 704\npython inference.py --prompt \"The figurine is in the crystal ball\" --image_paths \"assets\u002Ffigurine.png\" \"assets\u002Fcrystal_ball.png\" --width 704 --height 704\npython inference.py --prompt \"The logo is printed on the cup\" --image_paths \"assets\u002Fcat_cafe.png\" \"assets\u002Fcup.png\" --width 704 --height 704\n```\n\nOptional prepreration: If you want to test the inference on dreambench at the first time, you should clone the submodule `dreambench` to download the dataset.\n\n```bash\ngit submodule update --init\n```\nThen running the following scripts:\n```bash\n# inference on dreambench\n## for single-subject\npython inference.py --eval_json_path .\u002Fdatasets\u002Fdreambench_singleip.json\n## for multi-subject\npython inference.py --eval_json_path .\u002Fdatasets\u002Fdreambench_multiip.json\n```\n\n### 🔍 Evaluation\n```bash\n# evaluated on dreambench\n## for single-subject\npython eval\u002Fevaluate_clip_dino_score_single_subject.py --result_root \u003Cyour_image_result_save_path> -save_dir \u003Cthe_evaluation_result_save_path>\n## for multi-subject\npython eval\u002Fevaluate_clip_dino_score_multi_subject.py --result_root \u003Cyour_image_result_save_path> -save_dir \u003Cthe_evaluation_result_save_path>\n```\n\n### 🚄 Training\nIf you want to train on [UNO-1M](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbytedance-research\u002FUNO-1M), you need to download the dataset from [HuggingFace](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbytedance-research\u002FUNO-1M), extract and put it in .\u002Fdatasets\u002FUNO-1M. The directory will be like:\n```bash\n├── datasets\n│   └── UNO-1M\n│       ├── images\n│       │   ├── split1\n│       │   │   ├── object365_w1024_h1536_split_Bread_0_0_1_725x1024.png\n│       │   │   ├── object365_w1024_h1536_split_Bread_0_0_2_811x1024.png\n│       │   │   └── ...\n│       │   └── ...\n│       └── uno_1m_total_labels.json\n```\nThen run the training script:\n```bash\n# filter and format the dataset\npython uno\u002Futils\u002Ffilter_uno_1m_dataset.py .\u002Fdatasets\u002FUNO-1M\u002Funo_1m_total_labels.json .\u002Fdatasets\u002FUNO-1M\u002Funo_1m_total_labels_convert.json 4\n\n# train\naccelerate launch train.py --train_data_json .\u002Fdatasets\u002FUNO-1M\u002Funo_1m_total_labels_convert.json\n```\n\n\n### 📌 Tips and Notes\nWe integrate single-subject and multi-subject generation within a unified model. For single-subject scenarios, the longest side of the reference image is set to 512 by default, while for multi-subject scenarios, it is set to 320. UNO demonstrates remarkable flexibility across various aspect ratios, thanks to its training on a multi-scale dataset. Despite being trained within 512 buckets, it can handle higher resolutions, including 512, 568, and 704, among others.\n\nUNO excels in subject-driven generation but has room for improvement in generalization due to dataset constraints. We are actively developing an enhanced model—stay tuned for updates. Your feedback is valuable, so please feel free to share any suggestions.\n\n## 🎨 Application Scenarios\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_84b5b1573dfd.jpg\" width=95% height=95% \nclass=\"center\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_447eb5b05eab.jpg\" width=95% height=95% \nclass=\"center\">\n\u003C\u002Fp>\n\n## 📄 Disclaimer\n\u003Cp>\nWe open-source this project for academic research. The vast majority of images \nused in this project are either generated or licensed. If you have any concerns, \nplease contact us, and we will promptly remove any inappropriate content. \nOur code is released under the Apache 2.0 License. Any used base model must adhere to the original licensing terms.\n\u003Cbr>\u003Cbr>This research aims to advance the field of generative AI. Users are free to \ncreate images using this tool, provided they comply with local laws and exercise \nresponsible usage. The developers are not liable for any misuse of the tool by users.\u003C\u002Fp>\n\n## 🚀 Updates\nFor the purpose of fostering research and the open-source community, we plan to open-source the entire project, encompassing training, inference, weights, etc. Thank you for your patience and support! 🌟\n- [x] Release github repo.\n- [x] Release inference code.\n- [x] Release training code.\n- [x] Release model checkpoints.\n- [x] Release arXiv paper.\n- [x] Release huggingface space demo.\n- [x] Release in-context data generation pipelines (instructions provided in `.\u002Ftemplate`).\n- [x] Release dataset (UNO-1M).\n\n## Related resources\n\n**ComfyUI**\n\n- https:\u002F\u002Fgithub.com\u002Fjax-explorer\u002FComfyUI-UNO a ComfyUI node implementation of UNO by jax-explorer.\n- https:\u002F\u002Fgithub.com\u002FHM-RunningHub\u002FComfyUI_RH_UNO a ComfyUI node implementation of UNO by HM-RunningHub.\n- https:\u002F\u002Fgithub.com\u002FShmuelRonen\u002FComfyUI-UNO-Wrapper a ComfyUI node implementation of UNO by ShmuelRonen.\n- https:\u002F\u002Fgithub.com\u002FYuan-ManX\u002FComfyUI-UNO a ComfyUI node implementation of UNO by Yuan-ManX.\n- https:\u002F\u002Fgithub.com\u002FQijiTec\u002FComfyUI-RED-UNO a ComfyUI node implementation of UNO by QijiTec.\n\nWe thanks the passionate community contributors, since we have reviced many requests about comfyui, but there aren't so much time to make so many adaptations by ourselves. if you wanna try our work in comfyui, you can try the above repos. Remember, they are slightly different, so you may need some trail and error to make find the best match repo for you.\n\n##  Citation\nIf UNO is helpful, please help to ⭐ the repo.\n\nIf you find this project useful for your research, please consider citing our paper:\n```bibtex\n@article{wu2025less,\n  title={Less-to-More Generalization: Unlocking More Controllability by In-Context Generation},\n  author={Wu, Shaojin and Huang, Mengqi and Wu, Wenxu and Cheng, Yufeng and Ding, Fei and He, Qian},\n  journal={arXiv preprint arXiv:2504.02160},\n  year={2025}\n}\n```","\u003Ch3 align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_07cb42d8c403.png\" alt=\"Logo\" style=\"vertical-align: middle; width: 40px; height: 40px;\">\n    从少到多的泛化：通过上下文生成解锁更强的可控性\n\u003C\u002Fh3>\n\n\u003Cp align=\"center\"> \n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO\">\u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fbytedance\u002FUNO\">\u003C\u002Fa> \n\u003Ca href=\"https:\u002F\u002Fbytedance.github.io\u002FUNO\u002F\">\u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject%20Page-UNO-blue\">\u003C\u002Fa> \n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.02160\">\u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv%20paper-UNO-b31b1b.svg\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fbytedance-research\u002FUNO\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=%F0%9F%A4%97%20Hugging%20 Face&message=Model&color=green\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbytedance-research\u002FUNO-1M\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=%F0%9F%A4%97%20Hugging%20Face&message=Dataset&color=yellow\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbytedance-research\u002FUNO-FLUX\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=%F0%9F%A4%97%20Hugging%20Face&message=demo&color=orange\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n>\u003Cp align=\"center\"> \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">吴绍进,\u003C\u002Fspan>\u003Csup>\u003C\u002Fsup>\u003C\u002Fa>  \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">黄梦琪\u003C\u002Fspan>\u003Csup>*\u003C\u002Fsup>,\u003C\u002Fa> \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">吴文旭,\u003C\u002Fspan>\u003Csup>\u003C\u002Fsup>\u003C\u002Fa>  \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">程宇峰,\u003C\u002Fspan>\u003Csup>\u003C\u002Fsup> \u003C\u002Fa>  \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">丁飞\u003C\u002Fspan>\u003Csup>+\u003C\u002Fsup>,\u003C\u002Fa> \u003Cspan style=\"color:#137cf3; font-family: Gill Sans\">何倩\u003C\u002Fspan>\u003C\u002Fa> \u003Cbr> \n>\u003Cspan style=\"font-size: 16px\">字节跳动智能创作团队\u003C\u002Fspan>\u003C\u002Fp>\n\n## 🔥 新闻\n* **2025.09.12** 🔥 [UMO](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUMO) 来了！它能够自由地将一对一的身份与任何场景中的任意主体相结合，输出具有高度主体和身份一致性的结果。你现在可以在这里体验更强大的 UNO 或 OmniGen2 [UMO](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUMO)！你也可以访问我们的 \u003Ca href=\"https:\u002F\u002Fbytedance.github.io\u002FUMO\u002F\" target=\"_blank\">项目页面\u003C\u002Fa> 获取更多示例。🔥\n\u003Cdiv style=\"text-align: center; margin: 10px 0;\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_de1520839158.webp\" width=\"100%\" height=\"auto\" alt=\"UMO 项目演示\">\n\u003Cp style=\"font-size: 12px; font-family: 'Gill Sans', sans-serif; color: #666; margin-top: 8px;\">\n\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n* **2025.08.29** 🔥 我们很高兴地分享我们的新开源项目 [USO](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUSO)，它可以在任何场景中自由组合任意主体与任意风格，同时确保照片级逼真的效果。你还可以访问我们的 \u003Ca href=\"https:\u002F\u002Fbytedance.github.io\u002FUSO\u002F\" target=\"_blank\">项目页面\u003C\u002Fa> 或尝试 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbytedance-research\u002FUSO\" target=\"_blank\">在线演示\u003C\u002Fa> 以获取更多示例。🔥\n\u003Cdiv style=\"text-align: center; margin: 10px 0;\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_fa9baae75b8e.webp\" width=\"100%\" height=\"auto\" alt=\"USO 项目演示\">\n\u003Cp style=\"font-size: 12px; font-family: 'Gill Sans', sans-serif; color: #666; margin-top: 8px;\">\n\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n* **2025.08.18** ✨ 我们开源了 [UNO-1M](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbytedance-research\u002FUNO-1M) 数据集，这是一个大规模高质量的数据集（约100万对图像）。我们希望它能进一步推动相关研究。\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_356b795e437b.webp\" width=30% height=\"auto\">\n\u003C\u002Fp>\n\n* **2025.06.26** 🎉 恭喜！UNO 已被 ICCV 2025 接受！\n* **2025.04.16** 🔥 我们的配套项目 [RealCustom](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FRealCustom) 已发布。\n* **2025.04.10** 🔥 更新 fp8 模式作为主要的低显存使用支持。献给消费级 GPU 用户。目前峰值显存占用约为 16GB。我们可能会在后续尝试进一步的推理优化。\n* **2025.04.03** 🔥 UNO 的 [demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbytedance-research\u002FUNO-FLUX) 已发布。\n* **2025.04.03** 🔥 UNO 的 [训练代码](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO)、[推理代码](https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO) 和 [模型](https:\u002F\u002Fhuggingface.co\u002Fbytedance-research\u002FUNO) 已发布。\n* **2025.04.02** 🔥 UNO 的 [项目页面](https:\u002F\u002Fbytedance.github.io\u002FUNO) 已创建。\n* **2025.04.02** 🔥 UNO 的 arXiv [论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.02160) 已发布。\n\n## 📖 引言\n在本研究中，我们提出了一种高度一致的数据合成流水线来应对这一挑战。该流水线充分利用扩散 Transformer 的内在上下文生成能力，生成高一致性多主体配对数据。此外，我们还推出了 UNO，它由渐进式跨模态对齐和通用旋转位置编码组成。UNO 是一种基于文本到图像模型迭代训练而成的多图像条件下的主体到图像模型。大量实验表明，我们的方法能够在单主体和多主体驱动的生成中实现高度一致性，同时保证可控性。\n\n\n## ⚡️ 快速入门\n\n### 🔧 要求与安装\n\n安装依赖项\n```bash\n# pip install -r requirements.txt # 旧版安装命令\n\n## 创建一个 Python >= 3.10 \u003C= 3.12 的虚拟环境，例如：\n# python -m venv uno_env\n# source uno_env\u002Fbin\u002Factivate\n# 或者\n# conda create -n uno_env python=3.10 -y\n# conda activate uno_env\n# 然后根据需要安装依赖项\n\n# !!! 如果你使用的是 AMD GPU\u002FNV RTX 50 系列\u002Fmacos MPS，你需要先自行安装正确的 PyTorch 版本\n\n# !!! 然后运行安装命令\npip install -e .  # 仅用于运行演示或推理的用户\npip install -e .[train]  # 用于同时训练模型的用户\n```\n\n然后可以通过以下三种方式之一下载检查点：\n1. 直接运行推理脚本，代码中的 `hf_hub_download` 函数会自动将检查点下载到你的 `$HF_HOME` 目录（默认值为 `~\u002F.cache\u002Fhuggingface`）。\n2. 使用 `huggingface-cli download \u003Crepo name>` 下载 `black-forest-labs\u002FFLUX.1-dev`、`xlabs-ai\u002Fxflux_text_encoders`、`openai\u002Fclip-vit-large-patch14`、`bytedance-research\u002FUNO`，然后运行推理脚本。你可以只下载所需的检查点，以加快设置并节省磁盘空间。例如，对于 `black-forest-labs\u002FFLUX.1-dev`，可以使用 `huggingface-cli download black-forest-labs\u002FFLUX.1-dev flux1-dev.safetensors` 和 `huggingface-cli download black-forest-labs\u002FFLUX.1-dev ae.safetensors`，而忽略 `black-forest-labes\u002FFLUX.1-dev` 模型仓库中的文本编码器（它们是为 `diffusers` 调用准备的）。所有检查点总共需要 37 GB 的磁盘空间。\n3. 使用 `huggingface-cli download \u003Crepo name> --local-dir \u003CLOCAL_DIR>` 将第 2 种方法中提到的所有检查点下载到你指定的目录。然后设置环境变量 `AE`、`FLUX_DEV`（或如果你使用 fp8 模式则设置 `FLUX_DEV_FP8`）、`T5`、`CLIP`、`LORA`，指向相应的路径。最后运行推理脚本。\n4. **如果你已经拥有部分检查点**，可以直接设置环境变量 `AE`、`FLUX_DEV`、`T5`、`CLIP`、`LORA`，指向对应的路径。最后运行推理脚本。\n\n### 🌟 Gradio 演示\n```bash\npython app.py\n```\n\n**为了降低显存占用**，请传递 `--offload` 和 `--name flux-dev-fp8` 参数。峰值内存占用约为 16GB。仅供参考，在 RTX 3090 显卡上，使用 fp8 和 offload 模式时，端到端推理时间为 40 秒到 1 分钟。\n\n```bash\npython app.py --offload --name flux-dev-fp8\n```\n\n\n### ✍️ 推理\n从下面的示例开始，探索并激发你的创造力。✨\n```bash\npython inference.py --prompt \"海滩上的钟被红色太阳伞遮着\" --image_paths \"assets\u002Fclock.png\" --width 704 --height 704\npython inference.py --prompt \"小雕像在水晶球里\" --image_paths \"assets\u002Ffigurine.png\" \"assets\u002Fcrystal_ball.png\" --width 704 --height 704\npython inference.py --prompt \"杯子上印着标志\" --image_paths \"assets\u002Fcat_cafe.png\" \"assets\u002Fcup.png\" --width 704 --height 704\n```\n\n可选准备工作：如果你想第一次在 dreambench 上测试推理，需要克隆子模块 `dreambench` 来下载数据集。\n\n```bash\ngit submodule update --init\n```\n然后运行以下脚本：\n```bash\n# 在 dreambench 上进行推理\n## 单主体\npython inference.py --eval_json_path .\u002Fdatasets\u002Fdreambench_singleip.json\n## 多主体\npython inference.py --eval_json_path .\u002Fdatasets\u002Fdreambench_multiip.json\n```\n\n### 🔍 评估\n```bash\n# 在 dreambench 上评估\n## 单主体\npython eval\u002Fevaluate_clip_dino_score_single_subject.py --result_root \u003Cyour_image_result_save_path> -save_dir \u003Cthe_evaluation_result_save_path>\n## 多主体\npython eval\u002Fevaluate_clip_dino_score_multi_subject.py --result_root \u003Cyour_image_result_save_path> -save_dir \u003Cthe_evaluation_result_save_path>\n```\n\n### 🚄 训练\n如果你想在 [UNO-1M](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbytedance-research\u002FUNO-1M) 数据集上进行训练，需要从 HuggingFace 下载该数据集，解压后放入 `.\u002Fdatasets\u002FUNO-1M` 目录。目录结构如下：\n```bash\n├── datasets\n│   └── UNO-1M\n│       ├── images\n│       │   ├── split1\n│       │   │   ├── object365_w1024_h1536_split_Bread_0_0_1_725x1024.png\n│       │   │   ├── object365_w1024_h1536_split_Bread_0_0_2_811x1024.png\n│       │   │   └── ...\n│       │   └── ...\n│       └── uno_1m_total_labels.json\n```\n然后运行训练脚本：\n```bash\n# 过滤和格式化数据集\npython uno\u002Futils\u002Ffilter_uno_1m_dataset.py .\u002Fdatasets\u002FUNO-1M\u002Funo_1m_total_labels.json .\u002Fdatasets\u002FUNO-1M\u002Funo_1m_total_labels_convert.json 4\n\n# 训练\naccelerate launch train.py --train_data_json .\u002Fdatasets\u002FUNO-1M\u002Funo_1m_total_labels_convert.json\n```\n\n\n### 📌 提示与注意事项\n我们将在一个统一的模型中集成单主体和多主体生成。对于单主体场景，默认将参考图像的最长边设置为 512；而对于多主体场景，则设置为 320。得益于在多尺度数据集上的训练，UNO 在各种宽高比下都表现出极高的灵活性。尽管是在 512 桶内训练的，它仍能处理更高的分辨率，包括 512、568 和 704 等。\n\nUNO 在主体驱动的生成方面表现出色，但由于数据集的限制，在泛化能力上仍有提升空间。我们正在积极开发增强版模型，请持续关注更新。您的反馈对我们非常重要，欢迎随时提出建议。\n\n## 🎨 应用场景\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_84b5b1573dfd.jpg\" width=95% height=95% \nclass=\"center\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_readme_447eb5b05eab.jpg\" width=95% height=95% \nclass=\"center\">\n\u003C\u002Fp>\n\n## 📄 免责声明\n\u003Cp>\n我们开源此项目是为了学术研究。本项目中使用的绝大多数图像要么是自动生成的，要么已获得授权。如果您有任何疑虑，请联系我们，我们将立即移除任何不当内容。我们的代码采用 Apache 2.0 许可证发布。任何使用的基础模型必须遵守其原始许可条款。\n\u003Cbr>\u003Cbr>本研究旨在推动生成式 AI 领域的发展。用户可以自由使用此工具生成图像，但需遵守当地法律并负责任地使用。开发者对用户滥用该工具不承担任何责任。\u003C\u002Fp>\n\n## 🚀 更新\n为了促进研究和开源社区的发展，我们计划开源整个项目，包括训练、推理、权重等。感谢您的耐心与支持！🌟\n- [x] 发布 GitHub 仓库。\n- [x] 发布推理代码。\n- [x] 发布训练代码。\n- [x] 发布模型检查点。\n- [x] 发布 arXiv 论文。\n- [x] 发布 HuggingFace Space 演示。\n- [x] 发布上下文数据生成管道（说明见 `.\u002Ftemplate`）。\n- [x] 发布数据集（UNO-1M）。\n\n## 相关资源\n\n**ComfyUI**\n\n- https:\u002F\u002Fgithub.com\u002Fjax-explorer\u002FComfyUI-UNO 由 jax-explorer 实现的 UNO ComfyUI 节点。\n- https:\u002F\u002Fgithub.com\u002FHM-RunningHub\u002FComfyUI_RH_UNO 由 HM-RunningHub 实现的 UNO ComfyUI 节点。\n- https:\u002F\u002Fgithub.com\u002FShmuelRonen\u002FComfyUI-UNO-Wrapper 由 ShmuelRonen 实现的 UNO ComfyUI 节点。\n- https:\u002F\u002Fgithub.com\u002FYuan-ManX\u002FComfyUI-UNO 由 Yuan-ManX 实现的 UNO ComfyUI 节点。\n- https:\u002F\u002Fgithub.com\u002FQijiTec\u002FComfyUI-RED-UNO 由 QijiTec 实现的 UNO ComfyUI 节点。\n\n我们感谢热情的社区贡献者，因为收到了许多关于 ComfyUI 的请求，但我们没有足够的时间来亲自完成这么多适配工作。如果您想在 ComfyUI 中尝试我们的工作，可以试试上述仓库。请记住，这些实现略有不同，您可能需要一些试错才能找到最适合您的仓库。\n\n## 引用\n如果 UNO 对您有所帮助，请为本仓库点亮星标。\n\n如果您认为本项目对您的研究有帮助，请考虑引用我们的论文：\n```bibtex\n@article{wu2025less,\n  title={Less-to-More Generalization: Unlocking More Controllability by In-Context Generation},\n  author={Wu, Shaojin and Huang, Mengqi and Wu, Wenxu and Cheng, Yufeng and Ding, Fei and He, Qian},\n  journal={arXiv preprint arXiv:2504.02160},\n  year={2025}\n}\n```","# UNO 快速上手指南\n\nUNO 是一个基于扩散 Transformer 的多图像条件主体生成模型，支持单主体及多主体的高一致性图像生成。本指南将帮助你快速在本地部署并运行 UNO。\n\n## 环境准备\n\n*   **操作系统**: Linux \u002F macOS \u002F Windows\n*   **Python 版本**: 3.10 - 3.12 (推荐 3.10)\n*   **硬件要求**:\n    *   **NVIDIA GPU**: 推荐显存 24GB+ (FP8 模式 + 卸载模式下峰值显存约 16GB，可在 RTX 3090 等消费级显卡运行)。\n    *   **其他硬件**: 如使用 AMD GPU、NVIDIA RTX 50 系列或 macOS MPS，需自行安装对应版本的 PyTorch。\n*   **依赖管理**: 推荐使用 `venv` 或 `conda` 创建独立虚拟环境。\n\n## 安装步骤\n\n### 1. 创建并激活虚拟环境\n\n**使用 Conda:**\n```bash\nconda create -n uno_env python=3.10 -y\nconda activate uno_env\n```\n\n**使用 venv:**\n```bash\npython -m venv uno_env\n# Linux\u002FmacOS\nsource uno_env\u002Fbin\u002Factivate\n# Windows\nuno_env\\Scripts\\activate\n```\n\n### 2. 安装项目依赖\n\n> **注意**: 如果你使用的是 AMD GPU、RTX 50 系列或 macOS，请先手动安装适配的 `torch` 版本，然后再执行以下命令。\n\n**仅用于推理\u002F演示:**\n```bash\npip install -e .\n```\n\n**用于训练模型:**\n```bash\npip install -e .[train]\n```\n\n### 3. 下载模型权重\n\n模型权重会在首次运行推理脚本时通过 `hf_hub_download` 自动下载到 `~\u002F.cache\u002Fhuggingface`。若需手动下载以节省空间或使用特定路径，可参考以下方式：\n\n**方式 A：自动下载（推荐）**\n直接运行下方的推理命令，程序会自动拉取所需模型（包括 `FLUX.1-dev`, `UNO`, `CLIP`, `T5` 等），总大小约 37GB。\n\n**方式 B：手动指定路径**\n使用 `huggingface-cli` 下载到指定目录，并设置环境变量：\n```bash\n# 示例：下载 FLUX 主模型\nhuggingface-cli download black-forest-labs\u002FFLUX.1-dev flux1-dev.safetensors --local-dir .\u002Fmodels\u002Fflux\nhuggingface-cli download black-forest-labs\u002FFLUX.1-dev ae.safetensors --local-dir .\u002Fmodels\u002Fflux\n\n# 设置环境变量 (根据实际路径修改)\nexport AE=\".\u002Fmodels\u002Fflux\u002Fae.safetensors\"\nexport FLUX_DEV=\".\u002Fmodels\u002Fflux\u002Fflux1-dev.safetensors\"\nexport LORA=\".\u002Fmodels\u002Funo\u002Funet.safetensors\" \n# 其他 T5, CLIP 等同理设置\n```\n\n## 基本使用\n\n### 1. 启动 Web 演示界面 (Gradio)\n\n最简单的体验方式是启动本地 Gradio 服务。\n\n**标准模式:**\n```bash\npython app.py\n```\n\n**低显存模式 (推荐显存 \u003C 24GB 用户):**\n启用 `--offload` 和 `--name flux-dev-fp8` 参数，峰值显存可降至 ~16GB。\n```bash\npython app.py --offload --name flux-dev-fp8\n```\n启动后在浏览器访问显示的本地地址（通常为 `http:\u002F\u002F127.0.0.1:7860`）即可上传参考图并生成图像。\n\n### 2. 命令行推理\n\n你可以直接使用命令行进行单主体或多主体生成。\n\n**单主体生成示例:**\n将时钟图片合成到海滩场景中。\n```bash\npython inference.py --prompt \"A clock on the beach is under a red sun umbrella\" --image_paths \"assets\u002Fclock.png\" --width 704 --height 704\n```\n\n**多主体生成示例:**\n将小雕像放入水晶球中。\n```bash\npython inference.py --prompt \"The figurine is in the crystal ball\" --image_paths \"assets\u002Ffigurine.png\" \"assets\u002Fcrystal_ball.png\" --width 704 --height 704\n```\n\n**复杂组合示例:**\n将 Logo 印在杯子上。\n```bash\npython inference.py --prompt \"The logo is printed on the cup\" --image_paths \"assets\u002Fcat_cafe.png\" \"assets\u002Fcup.png\" --width 704 --height 704\n```\n\n### 使用提示\n*   **分辨率**: 单主体场景参考图最长边默认为 512，多主体场景为 320。模型支持多种宽高比，推理时可设置 512, 568, 704 等分辨率。\n*   **数据集测试**: 如需在 DreamBench 数据集上进行评估，请先初始化子模块：`git submodule update --init`，然后运行对应的 eval 脚本。","某电商设计团队需要为即将到来的促销活动，快速生成包含品牌吉祥物（单一主体）与多位不同模特（多主体）共同出镜的高质量宣传海报。\n\n### 没有 UNO 时\n- **训练成本高昂**：每新增一个吉祥物或模特角色，都需要收集大量图片并重新进行微调训练，耗时数小时甚至数天。\n- **多主体控制困难**：现有工具难以在同一张图中同时保持两个以上主体的身份特征，容易出现“脸盲”或特征混淆。\n- **场景适应性差**：一旦更换背景风格或构图，主体的一致性大幅下降，往往需要反复重绘才能勉强可用。\n- **显存门槛高**：运行复杂的定制化模型通常需要高端专业显卡，普通设计师的消费级电脑无法流畅运行。\n\n### 使用 UNO 后\n- **免训练即时生成**：利用上下文生成技术，仅需提供几张参考图即可直接生成新角色，无需任何额外的模型微调过程。\n- **精准的多主体融合**：UNO 能完美处理单主体及多主体条件控制，确保吉祥物与多位模特在同框时各自特征清晰、互不干扰。\n- **极强的泛化能力**：无论是赛博朋克风还是自然实景，UNO 都能将指定主体无缝融入任意新场景，且保持高度一致性。\n- **硬件友好**：支持 fp8 低显存模式，峰值显存占用仅约 16GB，让普通消费级显卡也能高效运行高质量定制生成。\n\nUNO 通过“少样本到强泛化”的技术突破，将定制化图像生成的门槛从“专业训练”降低为“即时推理”，极大提升了创意落地的效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbytedance_UNO_de152083.webp","bytedance","Bytedance Inc.","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fbytedance_7fee2b15.png","",null,"ByteDanceOSS","https:\u002F\u002Fopensource.bytedance.com","https:\u002F\u002Fgithub.com\u002Fbytedance",[81],{"name":82,"color":83,"percentage":84},"Python","#3572A5",100,1352,77,"2026-04-09T18:05:21","Apache-2.0","Linux, macOS, Windows","必需。支持 NVIDIA GPU (提及 RTX 3090, RTX 50 系列需自行安装对应 Torch)、AMD GPU 或 macOS MPS。标准模式显存需求较高，开启 fp8 和 offload 模式后峰值显存约 16GB。","未说明",{"notes":93,"python":94,"dependencies":95},"1. AMD GPU、NVIDIA RTX 50 系列或 macOS MPS 用户需先手动安装正确版本的 PyTorch，再运行安装命令。\n2. 提供 fp8 模式以支持低显存设备（峰值约 16GB），启动 Demo 时需添加 '--offload --name flux-dev-fp8' 参数。\n3. 模型检查点总大小约 37GB，首次运行会自动下载或通过 huggingface-cli 下载。\n4. 训练需准备 UNO-1M 数据集。",">=3.10, \u003C=3.12",[96,97,98,99,100],"torch","accelerate","huggingface_hub","gradio","diffusers",[35,15],[103,104,105,106,107,108,109,110],"diffusion","diffusion-transformer","flux","image-generation","in-context-learning","subject-driven-generation","text-to-image","universal-image-generation","2026-03-27T02:49:30.150509","2026-04-11T08:11:50.811920",[114,119,124,129,134,138,142,146],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},29072,"在 RTX 3090 (24G) 上运行速度极慢（约 30 分钟\u002F张），如何解决？","这是因为模型参数量大导致显存不足，系统使用了缓慢的共享内存机制。解决方案是启用 fp8 模式和 offload 功能。请使用以下命令启动：\npython app.py --offload --name flux-dev-fp8\n这将显著降低显存占用并提升生成速度（可缩短至 50 秒左右）。","https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO\u002Fissues\u002F19",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},29073,"加载模型时报错 'Tensor on device meta is not on the expected device' 或出现大量 missing\u002Funexpected keys 错误怎么办？","这通常是因为下载了错误的 VAE 模型文件。请检查是否下载了 `black-forest-labs\u002FFLUX.1-dev\u002Fvae\u002Fdiffusion_pytorch_model.safetensors`。\n正确的做法是下载 `black-forest-labs\u002FFLUX.1-dev\u002Fae.safetensors` 文件。前者是为了遵循 diffusers 命名规范重命名的，与本项目不兼容。","https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO\u002Fissues\u002F48",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},29074,"在 Windows 上加载第二个模型分片时程序卡死或无响应，如何解决？","这是由 Windows 系统虚拟内存设置不当引起的。解决方法如下：\n1. 打开系统属性 -> 高级 -> 性能设置 -> 高级 -> 虚拟内存。\n2. 取消勾选“自动管理所有驱动器的分页文件大小”。\n3. 选择系统盘，手动设置一个较大的固定值（例如 35GB 或更大）。\n4. 重启电脑后再次尝试运行。","https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO\u002Fissues\u002F42",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},29075,"README 文档中的启动命令无法执行或报错找不到文件，正确的命令是什么？","README 文档中可能遗漏了文件扩展名。请不要直接运行 `python app ...`，而应明确指定 Python 脚本文件名：\npython app.py --offload --name flux-dev-fp8\n确保包含 `.py` 后缀即可正常启动 WebUI。","https:\u002F\u002Fgithub.com\u002Fbytedance\u002FUNO\u002Fissues\u002F30",{"id":135,"question_zh":136,"answer_zh":137,"source_url":133},29076,"如何配置环境变量以使用手动下载的模型文件（方法 3）？","README 文档中关于方法 3 的环境变量名称可能存在错误。请以代码 `uno\u002Fflux\u002Futil.py` 中定义的变量名为准进行配置，而不是盲目照搬文档。建议在配置前查看源码确认具体的环境变量键名，确保路径指向正确。",{"id":139,"question_zh":140,"answer_zh":141,"source_url":133},29077,"如何在局域网内其他设备访问本地部署的 WebUI 界面？","默认情况下 WebUI 仅监听本地回环地址。需要修改 `app.py` 文件，在最后一行启动代码中添加 `server_name=\"0.0.0.0\"` 参数。修改后重新启动服务，即可通过局域网 IP 地址访问。",{"id":143,"question_zh":144,"answer_zh":145,"source_url":128},29078,"安装 deepspeed 时在 Windows 上报错 'fatal error LNK1181: 无法打开输入文件 aio.lib' 怎么办？","该错误通常与编译环境缺失有关，但在本项目的上下文中，用户反馈表明这往往伴随着虚拟内存问题。请优先检查并增大 Windows 的虚拟内存（分页文件）至 35GB 以上，这不仅能解决加载卡死问题，有时也能缓解因资源不足导致的编译或运行时链接错误。如果问题依旧，可能需要安装 Visual Studio Build Tools 并确保 C++ 构建组件已安装。",{"id":147,"question_zh":148,"answer_zh":149,"source_url":118},29079,"有没有更快的分支或版本推荐用于低显存显卡？","社区推荐使用包含低显存优化的分支。例如，可以使用 `feat\u002Flow_mem` 分支（如果可用），或者在主程序中务必加上 `--offload` 和 `--name flux-dev-fp8` 参数。有用户反馈在使用优化方案后，生成时间从 30 分钟降低到了 50 秒甚至 20 秒。",[]]