[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-VectorSpaceLab--OmniGen":3,"tool-VectorSpaceLab--OmniGen":62},[4,18,26,35,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},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,2,"2026-04-10T11:39:34",[14,15,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":32,"last_commit_at":41,"category_tags":42,"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",[43,13,15,14],"插件",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"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",[52,15,13,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},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,61],"视频",{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":76,"owner_url":77,"languages":78,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":10,"env_os":91,"env_gpu":92,"env_ram":93,"env_deps":94,"category_tags":103,"github_topics":104,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":111,"updated_at":112,"faqs":113,"releases":143},7636,"VectorSpaceLab\u002FOmniGen","OmniGen","OmniGen: Unified Image Generation. https:\u002F\u002Farxiv.org\u002Fpdf\u002F2409.11340","OmniGen 是一款统一的图像生成模型，旨在通过多模态指令直接生成各种类型的图像。与传统工具不同，它无需加载 ControlNet、IP-Adapter 等额外插件，也省去了人脸检测、姿态估计等繁琐的预处理步骤。用户只需输入自然的文字描述或参考图，即可像使用大语言模型一样灵活地控制生成结果，真正实现了“所念即所得”。\n\n这一设计解决了现有图像生成流程复杂、依赖特定任务模块的痛点，让创作过程回归简单与直观。无论是需要快速原型的设计师、希望探索新算法的研究人员，还是想要轻松创作图像的普通用户，都能从中受益。开发者更可以基于其开放的代码和数据进行微调，轻松构建专属的图像生成任务，而无需重新设计网络架构。\n\nOmniGen 的核心理念是构建一个通用且灵活的生成范式，将复杂的图像处理逻辑内化于模型之中。目前，项目已开源模型权重、推理代码及微调脚本，并提供了 Hugging Face 在线演示和 API 接口，方便各类用户立即体验。随着社区的反馈与迭代，OmniGen 正不断激发着图像生成领域的无限创意可能。","\u003Ch1 align=\"center\">OmniGen: Unified Image Generation\u003C\u002Fh1>\n\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fvectorspacelab.github.io\u002FOmniGen\u002F\">\n        \u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject%20Page-OmniGen-yellow\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2409.11340\">\n            \u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv%20paper-2409.11340-b31b1b.svg\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FShitao\u002FOmniGen\">\n        \u003Cimg alt=\"License\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF%20Demo-🤗-lightblue\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FShitao\u002FOmniGen-v1\">\n        \u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF%20Model-🤗-yellow\">\n    \u003C\u002Fa>    \n    \u003Ca href=\"https:\u002F\u002Freplicate.com\u002Fchenxwh\u002Fomnigen\">\n        \u003Cimg alt=\"Build\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_7dacf1cc5d87.png\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch4 align=\"center\">\n    \u003Cp>\n        \u003Ca href=#1-news>News\u003C\u002Fa> |\n        \u003Ca href=#3-methodology>Methodology\u003C\u002Fa> |\n        \u003Ca href=#4-what-can-omnigen-do>Capabilities\u003C\u002Fa> |\n        \u003Ca href=#5-quick-start>Quick Start\u003C\u002Fa> |\n        \u003Ca href=\"#6-finetune\">Finetune\u003C\u002Fa> |\n        \u003Ca href=\"#license\">License\u003C\u002Fa> |\n        \u003Ca href=\"#citation\">Citation\u003C\u002Fa>\n    \u003Cp>\n\u003C\u002Fh4>\n\n## 1. News\n\n- 2025-06-16: 🔥🔥OmniGen2 is released at https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen2. Welcome to use and give some feedback.\n- 2025-02-12: 🔥🔥OmniGen is available in [Diffusers](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fdiffusers\u002Fmain\u002Fen\u002Fusing-diffusers\u002Fomnigen). \n- 2024-12-14: 🚀️🚀Open-source [X2I Dataset](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fyzwang\u002Fx2i-dataset-674c66d1d700f7f816a9590d)\n- 2024-11-03: Added Replicate Demo and API: [![Replicate](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_7dacf1cc5d87.png)](https:\u002F\u002Freplicate.com\u002Fchenxwh\u002Fomnigen)\n- 2024-10-28: We release a new version of inference code, optimizing the memory usage and time cost. You can refer to [docs\u002Finference.md](docs\u002Finference.md#requiremented-resources) for detailed information.\n- 2024-10-22: We release the code for OmniGen. Inference: [docs\u002Finference.md](docs\u002Finference.md) Train: [docs\u002Ffine-tuning.md](docs\u002Ffine-tuning.md) \n- 2024-10-22: We release the first version of OmniGen. Model Weight: [Shitao\u002FOmniGen-v1](https:\u002F\u002Fhuggingface.co\u002FShitao\u002FOmniGen-v1) HF Demo: [🤗](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FShitao\u002FOmniGen)  \n- 2024-09-17: ⚡️⚡️We release the first OmniGen Report: [ArXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2409.11340)  \n\n\n## 2. Overview\n\nOmniGen is a unified image generation model that can generate a wide range of images from multi-modal prompts. It is designed to be simple, flexible, and easy to use. We provide [inference code](#5-quick-start) so that everyone can explore more functionalities of OmniGen.\n\nExisting image generation models often require loading several additional network modules (such as ControlNet, IP-Adapter, Reference-Net, etc.) and performing extra preprocessing steps (e.g., face detection, pose estimation, cropping, etc.) to generate a satisfactory image. However, **we believe that the future image generation paradigm should be more simple and flexible, that is, generating various images directly through arbitrarily multi-modal instructions without the need for additional plugins and operations, similar to how GPT works in language generation.** \n\nDue to the limited resources, OmniGen still has room for improvement. We will continue to optimize it, and hope it inspires more universal image-generation models. You can also easily fine-tune OmniGen without worrying about designing networks for specific tasks; you just need to prepare the corresponding data, and then run the [script](#6-finetune). Imagination is no longer limited; everyone can construct any image-generation task, and perhaps we can achieve very interesting, wonderful, and creative things.\n\nIf you have any questions, ideas, or interesting tasks you want OmniGen to accomplish, feel free to discuss with us: 2906698981@qq.com, wangyueze@tju.edu.cn, zhengliu1026@gmail.com. We welcome any feedback to help us improve the model.\n\n\n\n## 3. Methodology\n\nYou can see details in our [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2409.11340). \n\n\n\n## 4. What Can OmniGen do?\n\nOmniGen is a unified image generation model that you can use to perform various tasks, including but not limited to text-to-image generation, subject-driven generation, Identity-Preserving Generation, image editing, and image-conditioned generation. **OmniGen doesn't need additional plugins or operations, it can automatically identify the features (e.g., required object, human pose, depth mapping) in input images according to the text prompt.**\nWe showcase some examples in [inference.ipynb](inference.ipynb). And in [inference_demo.ipynb](inference_demo.ipynb), we show an interesting pipeline to generate and modify an image.\n\nHere is the illustrations of OmniGen's capabilities: \n- You can control the image generation flexibly via OmniGen\n![demo](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_f5d902e9c941.png)\n- Referring Expression Generation: You can input multiple images and use simple, general language to refer to the objects within those images. OmniGen can automatically recognize the necessary objects in each image and generate new images based on them. No additional operations, such as image cropping or face detection, are required.\n![demo](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_91968baf5b2f.png)\n\nIf you are not entirely satisfied with certain functionalities or wish to add new capabilities, you can try [fine-tuning OmniGen](#6-finetune).\n\n\n\n## 5. Quick Start\n\n\n### Using OmniGen\nInstall via Github:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen.git\ncd OmniGen\npip install -e .\n```\n\nYou also can create a new environment to avoid conflicts:\n```bash\n# Create a python 3.10.13 conda env (you could also use virtualenv)\nconda create -n omnigen python=3.10.13\nconda activate omnigen\n\n# Install pytorch with your CUDA version, e.g.\npip install torch==2.3.1+cu118 torchvision --extra-index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\n\ngit clone https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen.git\ncd OmniGen\npip install -e .\n```\n\nHere are some examples:\n```python\nfrom OmniGen import OmniGenPipeline\n\npipe = OmniGenPipeline.from_pretrained(\"Shitao\u002FOmniGen-v1\")  \n# Note: Your local model path is also acceptable, such as 'pipe = OmniGenPipeline.from_pretrained(your_local_model_path)', where all files in your_local_model_path should be organized as https:\u002F\u002Fhuggingface.co\u002FShitao\u002FOmniGen-v1\u002Ftree\u002Fmain\n\n## Text to Image\nimages = pipe(\n    prompt=\"A curly-haired man in a red shirt is drinking tea.\", \n    height=1024, \n    width=1024, \n    guidance_scale=2.5,\n    seed=0,\n)\nimages[0].save(\"example_t2i.png\")  # save output PIL Image\n\n## Multi-modal to Image\n# In the prompt, we use the placeholder to represent the image. The image placeholder should be in the format of \u003Cimg>\u003C|image_*|>\u003C\u002Fimg>\n# You can add multiple images in the input_images. Please ensure that each image has its placeholder. For example, for the list input_images [img1_path, img2_path], the prompt needs to have two placeholders: \u003Cimg>\u003C|image_1|>\u003C\u002Fimg>, \u003Cimg>\u003C|image_2|>\u003C\u002Fimg>.\nimages = pipe(\n    prompt=\"A man in a black shirt is reading a book. The man is the right man in \u003Cimg>\u003C|image_1|>\u003C\u002Fimg>.\",\n    input_images=[\".\u002Fimgs\u002Ftest_cases\u002Ftwo_man.jpg\"],\n    height=1024, \n    width=1024,\n    guidance_scale=2.5, \n    img_guidance_scale=1.6,\n    seed=0\n)\nimages[0].save(\"example_ti2i.png\")  # save output PIL image\n```\n- If out of memory, you can set `offload_model=True`. If the inference time is too long when inputting multiple images, you can reduce the `max_input_image_size`.  For the required resources and the method to run OmniGen efficiently, please refer to [docs\u002Finference.md#requiremented-resources](docs\u002Finference.md#requiremented-resources).\n- For more examples of image generation, you can refer to [inference.ipynb](inference.ipynb) and [inference_demo.ipynb](inference_demo.ipynb)\n- For more details about the argument in inference, please refer to [docs\u002Finference.md](docs\u002Finference.md). \n\n\n### Using Diffusers\n\n[Diffusers docs](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fdiffusers\u002Fmain\u002Fen\u002Fusing-diffusers\u002Fomnigen)\n\n\n### Gradio Demo\n\nWe construct an online demo in [Huggingface](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FShitao\u002FOmniGen).\n\nFor the local gradio demo, you need to install `pip install gradio spaces`, and then you can run:\n```python\npip install gradio spaces\npython app.py\n```\n\n#### Use Google Colab\nTo use with Google Colab, please use the following command:\n\n```\n!git clone https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen.git\n%cd OmniGen\n!pip install -e .\n!pip install gradio spaces\n!python app.py --share\n```\n\n## 6. Finetune\nWe provide a training script `train.py` to fine-tune OmniGen. \nHere is a toy example about LoRA finetune:\n```bash\naccelerate launch --num_processes=1 train.py \\\n    --model_name_or_path Shitao\u002FOmniGen-v1 \\\n    --batch_size_per_device 2 \\\n    --condition_dropout_prob 0.01 \\\n    --lr 1e-3 \\\n    --use_lora \\\n    --lora_rank 8 \\\n    --json_file .\u002Ftoy_data\u002Ftoy_subject_data.jsonl \\\n    --image_path .\u002Ftoy_data\u002Fimages \\\n    --max_input_length_limit 18000 \\\n    --keep_raw_resolution \\\n    --max_image_size 1024 \\\n    --gradient_accumulation_steps 1 \\\n    --ckpt_every 10 \\\n    --epochs 200 \\\n    --log_every 1 \\\n    --results_dir .\u002Fresults\u002Ftoy_finetune_lora\n```\n\nPlease refer to [docs\u002Ffine-tuning.md](docs\u002Ffine-tuning.md) for more details (e.g. full finetune).\n\n### Contributors:\nThank all our contributors for their efforts and warmly welcome new members to join in!\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_1684122ab9fd.png\" \u002F>\n\u003C\u002Fa>\n\n## License\nThis repo is licensed under the [MIT License](LICENSE). \n\n\n## Citation\nIf you find this repository useful, please consider giving a star ⭐ and citation\n```\n@article{xiao2024omnigen,\n  title={Omnigen: Unified image generation},\n  author={Xiao, Shitao and Wang, Yueze and Zhou, Junjie and Yuan, Huaying and Xing, Xingrun and Yan, Ruiran and Wang, Shuting and Huang, Tiejun and Liu, Zheng},\n  journal={arXiv preprint arXiv:2409.11340},\n  year={2024}\n}\n```\n\n\n\n\n\n","\u003Ch1 align=\"center\">OmniGen：统一的图像生成\u003C\u002Fh1>\n\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fvectorspacelab.github.io\u002FOmniGen\u002F\">\n        \u003Cimg alt=\"构建\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F项目页面-OmniGen-黄色\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2409.11340\">\n            \u003Cimg alt=\"构建\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv%20论文-2409.11340-b31b1b.svg\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FShitao\u002FOmniGen\">\n        \u003Cimg alt=\"许可证\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF%20演示-🤗-浅蓝色\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FShitao\u002FOmniGen-v1\">\n        \u003Cimg alt=\"构建\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF%20模型-🤗-黄色\">\n    \u003C\u002Fa>    \n    \u003Ca href=\"https:\u002F\u002Freplicate.com\u002Fchenxwh\u002Fomnigen\">\n        \u003Cimg alt=\"构建\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_7dacf1cc5d87.png\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch4 align=\"center\">\n    \u003Cp>\n        \u003Ca href=#1-news>新闻\u003C\u002Fa> |\n        \u003Ca href=#3-methodology>方法论\u003C\u002Fa> |\n        \u003Ca href=#4-what-can-omnigen-do>功能特性\u003C\u002Fa> |\n        \u003Ca href=#5-quick-start>快速入门\u003C\u002Fa> |\n        \u003Ca href=\"#6-finetune>微调\u003C\u002Fa> |\n        \u003Ca href=\"#license>许可证\u003C\u002Fa> |\n        \u003Ca href=\"#citation>引用\u003C\u002Fa>\n    \u003Cp>\n\u003C\u002Fh4>\n\n## 1. 新闻\n\n- 2025年6月16日：🔥🔥OmniGen2已在https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen2发布。欢迎使用并提供反馈。\n- 2025年2月12日：🔥🔥OmniGen现已在[Diffusers](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fdiffusers\u002Fmain\u002Fen\u002Fusing-diffusers\u002Fomnigen)中可用。\n- 2024年12月14日：🚀️🚀开源[X2I数据集](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fyzwang\u002Fx2i-dataset-674c66d1d700f7f816a9590d)\n- 2024年11月3日：新增Replicate演示和API：[![Replicate](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_7dacf1cc5d87.png)](https:\u002F\u002Freplicate.com\u002Fchenxwh\u002Fomnigen)\n- 2024年10月28日：我们发布了推理代码的新版本，优化了内存占用和运行时间。详细信息请参阅[docs\u002Finference.md](docs\u002Finference.md#requiremented-resources)。\n- 2024年10月22日：我们发布了OmniGen的代码。推理：[docs\u002Finference.md](docs\u002Finference.md) 训练：[docs\u002Ffine-tuning.md](docs\u002Ffine-tuning.md) \n- 2024年10月22日：我们发布了OmniGen的第一个版本。模型权重：[Shitao\u002FOmniGen-v1](https:\u002F\u002Fhuggingface.co\u002FShitao\u002FOmniGen-v1) HF演示：[🤗](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FShitao\u002FOmniGen)  \n- 2024年9月17日：⚡️⚡️我们发布了第一份OmniGen报告：[ArXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2409.11340)  \n\n\n## 2. 概述\n\nOmniGen是一个统一的图像生成模型，能够根据多模态提示生成各种类型的图像。它设计简单、灵活且易于使用。我们提供了[推理代码](#5-quick-start)，以便大家探索OmniGen的更多功能。\n\n现有的图像生成模型通常需要加载多个额外的网络模块（如ControlNet、IP-Adapter、Reference-Net等），并进行额外的预处理步骤（例如人脸检测、姿态估计、裁剪等）才能生成令人满意的图像。然而，**我们认为未来的图像生成范式应该更加简单和灵活，即无需额外插件和操作，直接通过任意多模态指令生成各种图像，就像GPT在语言生成中的工作方式一样。** \n\n由于资源有限，OmniGen仍有改进空间。我们将继续优化它，并希望它能启发更多通用的图像生成模型。您也可以轻松地对OmniGen进行微调，而无需为特定任务设计网络；只需准备好相应数据，然后运行[脚本](#6-finetune)即可。想象力不再受限；每个人都可以构建任何图像生成任务，或许我们可以实现非常有趣、精彩和富有创意的事情。\n\n如果您有任何问题、想法，或希望OmniGen完成的有趣任务，请随时与我们讨论：2906698981@qq.com、wangyueze@tju.edu.cn、zhengliu1026@gmail.com。我们欢迎任何反馈，以帮助我们改进模型。\n\n\n\n## 3. 方法论\n\n详情请参阅我们的[论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2409.11340)。 \n\n\n\n## 4. OmniGen能做什么？\n\nOmniGen是一个统一的图像生成模型，可用于执行多种任务，包括但不限于文本到图像生成、主体驱动生成、身份保持生成、图像编辑以及图像条件生成。**OmniGen不需要额外的插件或操作，它可以根据文本提示自动识别输入图像中的特征（例如所需对象、人体姿态、深度图）。**\n我们在[inference.ipynb](inference.ipynb)中展示了一些示例。而在[inference_demo.ipynb](inference_demo.ipynb)中，我们展示了一个有趣的流程来生成和修改图像。\n\n以下是OmniGen的功能示意图：\n- 您可以通过OmniGen灵活地控制图像生成\n![demo](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_f5d902e9c941.png)\n- 引用表达生成：您可以输入多张图片，并使用简单、通用的语言来指代这些图片中的物体。OmniGen会自动识别每张图片中所需的物体，并基于它们生成新图像。无需额外的操作，例如图像裁剪或人脸检测。\n![demo](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_91968baf5b2f.png)\n\n如果您对某些功能不太满意，或者希望添加新的功能，可以尝试[微调OmniGen](#6-finetune)。\n\n\n\n## 5. 快速入门\n\n\n### 使用OmniGen\n通过Github安装：\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen.git\ncd OmniGen\npip install -e .\n```\n\n您也可以创建一个新环境以避免冲突：\n```bash\n# 创建一个Python 3.10.13的conda环境（您也可以使用virtualenv）\nconda create -n omnigen python=3.10.13\nconda activate omnigen\n\n# 根据您的CUDA版本安装PyTorch，例如\npip install torch==2.3.1+cu118 torchvision --extra-index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\n\ngit clone https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen.git\ncd OmniGen\npip install -e .\n```\n\n以下是一些示例：\n```python\nfrom OmniGen import OmniGenPipeline\n\npipe = OmniGenPipeline.from_pretrained(\"Shitao\u002FOmniGen-v1\")  \n# 注意：您也可以使用本地模型路径，例如 'pipe = OmniGenPipeline.from_pretrained(your_local_model_path)'，其中your_local_model_path中的所有文件应按照https:\u002F\u002Fhuggingface.co\u002FShitao\u002FOmniGen-v1\u002Ftree\u002Fmain的结构组织\n\n## 文本到图像\nimages = pipe(\n    prompt=\"一个红衬衫的卷发男子正在喝茶。\",\n    height=1024,\n    width=1024,\n    guidance_scale=2.5,\n    seed=0,\n)\nimages[0].save(\"example_t2i.png\")  # 保存输出的PIL图像\n\n## 多模态到图像\n# 在提示中，我们使用占位符来表示图像。图像占位符应采用\u003Cimg>\u003C|image_*|>\u003C\u002Fimg>的格式\n\n# 您可以在 input_images 中添加多张图片。请确保每张图片都有对应的占位符。例如，对于列表 input_images [img1_path, img2_path]，提示词中需要有两个占位符： \u003Cimg>\u003C|image_1|>\u003C\u002Fimg>, \u003Cimg>\u003C|image_2|>\u003C\u002Fimg>。\nimages = pipe(\n    prompt=\"一个穿着黑衬衫的男人正在读书。这个男人就是 \u003Cimg>\u003C|image_1|>\u003C\u002Fimg> 中的那位男士。\",\n    input_images=[\".\u002Fimgs\u002Ftest_cases\u002Ftwo_man.jpg\"],\n    height=1024, \n    width=1024,\n    guidance_scale=2.5, \n    img_guidance_scale=1.6,\n    seed=0\n)\nimages[0].save(\"example_ti2i.png\")  # 保存输出的 PIL 图像\n```\n- 如果内存不足，可以设置 `offload_model=True`。如果输入多张图片时推理时间过长，可以减小 `max_input_image_size`。有关所需资源及高效运行 OmniGen 的方法，请参阅 [docs\u002Finference.md#requiremented-resources](docs\u002Finference.md#requiremented-resources)。\n- 更多图像生成示例，请参考 [inference.ipynb](inference.ipynb) 和 [inference_demo.ipynb](inference_demo.ipynb)。\n- 关于推理参数的更多详细信息，请参阅 [docs\u002Finference.md](docs\u002Finference.md)。\n\n\n### 使用 Diffusers\n\n[Diffusers 文档](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fdiffusers\u002Fmain\u002Fen\u002Fusing-diffusers\u002Fomnigen)\n\n\n### Gradio 演示\n\n我们在 [Huggingface](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FShitao\u002FOmniGen) 上构建了一个在线演示。\n\n若要运行本地 Gradio 演示，您需要安装 `pip install gradio spaces`，然后执行以下命令：\n```python\npip install gradio spaces\npython app.py\n```\n\n#### 使用 Google Colab\n如需在 Google Colab 中使用，请执行以下命令：\n\n```\n!git clone https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen.git\n%cd OmniGen\n!pip install -e .\n!pip install gradio spaces\n!python app.py --share\n```\n\n## 6. 微调\n我们提供了一个训练脚本 `train.py` 来微调 OmniGen。\n以下是一个 LoRA 微调的示例：\n```bash\naccelerate launch --num_processes=1 train.py \\\n    --model_name_or_path Shitao\u002FOmniGen-v1 \\\n    --batch_size_per_device 2 \\\n    --condition_dropout_prob 0.01 \\\n    --lr 1e-3 \\\n    --use_lora \\\n    --lora_rank 8 \\\n    --json_file .\u002Ftoy_data\u002Ftoy_subject_data.jsonl \\\n    --image_path .\u002Ftoy_data\u002Fimages \\\n    --max_input_length_limit 18000 \\\n    --keep_raw_resolution \\\n    --max_image_size 1024 \\\n    --gradient_accumulation_steps 1 \\\n    --ckpt_every 10 \\\n    --epochs 200 \\\n    --log_every 1 \\\n    --results_dir .\u002Fresults\u002Ftoy_finetune_lora\n```\n\n更多详细信息（例如全量微调）请参阅 [docs\u002Ffine-tuning.md](docs\u002Ffine-tuning.md)。\n\n### 贡献者：\n感谢所有贡献者的辛勤付出，并热烈欢迎新成员加入！\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_readme_1684122ab9fd.png\" \u002F>\n\u003C\u002Fa>\n\n## 许可证\n本仓库采用 [MIT 许可证](LICENSE) 许可。\n\n\n## 引用\n如果您觉得本仓库有用，请考虑给个星 ⭐ 并引用：\n```\n@article{xiao2024omnigen,\n  title={Omnigen: 统一的图像生成},\n  author={Xiao, Shitao and Wang, Yueze and Zhou, Junjie and Yuan, Huaying and Xing, Xingrun and Yan, Ruiran and Wang, Shuting and Huang, Tiejun and Liu, Zheng},\n  journal={arXiv 预印本 arXiv:2409.11340},\n  year={2024}\n}\n```","# OmniGen 快速上手指南\n\nOmniGen 是一个统一的图像生成模型，支持通过多模态指令（文本 + 图片）直接生成图像，无需额外的插件（如 ControlNet、IP-Adapter）或复杂的预处理步骤。\n\n## 1. 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux (推荐) 或 Windows\n*   **Python 版本**: 3.10.13 (推荐使用 Conda 管理环境)\n*   **GPU**: 支持 CUDA 的 NVIDIA 显卡 (建议显存 16GB 以上，低显存可开启模型卸载)\n*   **依赖库**: PyTorch (需匹配您的 CUDA 版本)\n\n> **国内加速建议**：\n> 如果遇到网络问题，建议使用国内镜像源安装依赖，并配置 Hugging Face 镜像。\n> *   Pip 镜像：`pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple ...`\n> *   Hugging Face 镜像：设置环境变量 `export HF_ENDPOINT=https:\u002F\u002Fhf-mirror.com`\n\n## 2. 安装步骤\n\n推荐使用 Conda 创建独立环境以避免依赖冲突。\n\n### 第一步：创建并激活环境\n```bash\nconda create -n omnigen python=3.10.13\nconda activate omnigen\n```\n\n### 第二步：安装 PyTorch\n请根据您的 CUDA 版本选择对应的安装命令。以下为 CUDA 11.8 示例（国内用户可使用清华源加速）：\n```bash\npip install torch==2.3.1+cu118 torchvision --extra-index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\n# 或使用清华源加速\n# pip install torch==2.3.1+cu118 torchvision -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple --extra-index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\n```\n\n### 第三步：克隆项目并安装 OmniGen\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen.git\ncd OmniGen\npip install -e .\n# 国内用户建议使用：pip install -e . -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 3. 基本使用\n\n以下是最简单的文生图（Text-to-Image）和多模态生图示例。模型权重会自动从 Hugging Face 下载（首次运行需保持网络通畅）。\n\n### 示例代码：文生图与多模态生图\n\n创建一个 Python 文件（如 `demo.py`）并运行以下代码：\n\n```python\nfrom OmniGen import OmniGenPipeline\n\n# 加载模型 (首次运行会自动下载 Shitao\u002FOmniGen-v1)\n# 如果网络受限，可先手动下载模型到本地，然后填入本地路径\npipe = OmniGenPipeline.from_pretrained(\"Shitao\u002FOmniGen-v1\")  \n\n## 1. 文生图 (Text to Image)\nimages = pipe(\n    prompt=\"A curly-haired man in a red shirt is drinking tea.\", \n    height=1024, \n    width=1024, \n    guidance_scale=2.5,\n    seed=0,\n)\nimages[0].save(\"example_t2i.png\")  # 保存输出图片\n\n## 2. 多模态生图 (Multi-modal to Image)\n# 在 prompt 中使用占位符 \u003Cimg>\u003C|image_*|>\u003C\u002Fimg> 代表输入图片\n# input_images 列表中的图片顺序需与占位符编号对应\nimages = pipe(\n    prompt=\"A man in a black shirt is reading a book. The man is the right man in \u003Cimg>\u003C|image_1|>\u003C\u002Fimg>.\",\n    input_images=[\".\u002Fimgs\u002Ftest_cases\u002Ftwo_man.jpg\"], # 请替换为您本地的图片路径\n    height=1024, \n    width=1024,\n    guidance_scale=2.5, \n    img_guidance_scale=1.6,\n    seed=0\n)\nimages[0].save(\"example_ti2i.png\")  # 保存输出图片\n```\n\n### 显存优化提示\n如果您的显存不足导致报错（Out of Memory），可以在初始化 pipeline 或调用时添加参数 `offload_model=True`，或者减少 `max_input_image_size`。\n\n```python\n# 显存不足时的调用示例\nimages = pipe(\n    prompt=\"...\",\n    offload_model=True,  # 启用模型卸载以节省显存\n    # 其他参数...\n)\n```","一位独立游戏开发者需要为角色设计一套包含不同姿态、表情及特定背景的动作立绘，以快速推进原型开发。\n\n### 没有 OmniGen 时\n- **工具链繁琐**：必须分别加载主模型、ControlNet（控制姿态）、IP-Adapter（保持角色一致性）和 Reference-Net 等多个插件，显存占用极高且配置复杂。\n- **预处理耗时**：每次生成前需手动提取参考图的面部特征、估算骨骼关键点或进行复杂的图像裁剪，流程断裂且容易出错。\n- **一致性难控**：在多轮生成中，角色面部特征极易发生漂移，难以在变换动作的同时维持统一的画风和人设。\n- **试错成本高**：调整任何一个环节（如姿势微调）都需要重新运行整个预处理管线，迭代效率极低。\n\n### 使用 OmniGen 后\n- **单一模型搞定**：仅需加载 OmniGen 一个模型，无需任何额外插件或网络模块，直接通过多模态指令即可生成高质量图像。\n- **零预处理流程**：直接将“参考图 + 文本描述（如‘让该角色做出奔跑动作’）”作为输入，省去了人脸检测、姿态估计等所有中间步骤。\n- **原生一致性保持**：模型内部统一理解多模态上下文，能在自由改变角色姿态和背景的同时，完美锁定角色身份特征与艺术风格。\n- **自然语言交互**：像使用 GPT 一样通过灵活的指令调整细节，修改需求只需重写提示词，实现了真正的端到端快速迭代。\n\nOmniGen 将碎片化的图像生成工作流整合为简单的“指令即结果”模式，让创作者从复杂的工程配置中解放，专注于创意本身。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FVectorSpaceLab_OmniGen_1c178d3e.png","VectorSpaceLab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FVectorSpaceLab_d15d123f.png","",null,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab",[79,83],{"name":80,"color":81,"percentage":82},"Jupyter Notebook","#DA5B0B",99.5,{"name":84,"color":85,"percentage":86},"Python","#3572A5",0.5,4315,364,"2026-04-13T20:47:11","MIT","Linux, macOS, Windows","必需 NVIDIA GPU（用于加速），具体显存需求未明确说明，但文档提到若显存不足可设置 `offload_model=True`；推荐安装与本地环境匹配的 CUDA 版本（示例中使用了 CUDA 11.8）","未说明（建议根据模型大小和是否开启 offload 模式调整，若显存不足可使用 CPU 卸载）",{"notes":95,"python":96,"dependencies":97},"1. 建议使用 conda 创建 Python 3.10.13 环境以避免依赖冲突。\n2. PyTorch 需根据本地 CUDA 版本安装（示例为 cu118）。\n3. 若遇到显存溢出（OOM），可在推理时设置 `offload_model=True`。\n4. 输入多张图片导致推理时间过长时，可减少 `max_input_image_size` 参数。\n5. 模型权重托管在 Hugging Face (Shitao\u002FOmniGen-v1)，首次运行需下载。","3.10.13",[98,99,100,101,102],"torch>=2.3.1","torchvision","gradio","spaces","accelerate",[15],[105,106,107,108,109,110],"diffusion","image","image-generation","multi-modal","image-edit","multi-task","2026-03-27T02:49:30.150509","2026-04-15T10:58:41.114490",[114,119,124,129,134,139],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},34202,"运行 Gradio 应用 (app.py) 时出现 'ModuleNotFoundError: No module named spaces' 错误怎么办？","这是因为缺少必要的依赖包。请运行以下命令安装缺失的模块：\npip install gradio spaces\n安装完成后即可正常运行 app.py。","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen\u002Fissues\u002F1",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},34203,"运行示例代码生成的图片是全黑的，或者结果不正确，如何解决？","生成黑图通常由显存不足或 PyTorch 版本不兼容导致。建议尝试以下解决方案：\n1. 降低生成分辨率（例如从 1024x1024 降至更低），因为默认设置可能超出 24GB 显存限制。\n2. 确保安装了项目根目录下的 requirements.txt 中的所有依赖。\n3. 更新或降级 PyTorch 到稳定版本。维护者推荐使用 Torch 2.3.1 或 2.1.2+cu121，有用户反馈降级到 2.2.1 也解决了问题。","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen\u002Fissues\u002F21",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},34204,"我的显卡较旧（如 GTX 2080 Ti）不支持 bf16，运行时报错 'cutlassF: no kernel found' 或生成黑图，该怎么办？","对于不支持 bf16 的旧显卡，官方已在新版更新中添加了 FP8 支持。如果您使用 ComfyUI，请更新自定义节点并将 model_precision 设置为 FP8。具体更新说明可参考：https:\u002F\u002Fgithub.com\u002F1038lab\u002FComfyUI-OmniGen\u002Fblob\u002Fmain\u002FUPDATE.md\n注意：直接修改配置文件将 dtype 改为 float16 可能导致生成黑图，建议使用官方支持的 FP8 选项。","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen\u002Fissues\u002F108",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},34205,"运行时出现 'FileNotFoundError: ... model.pt' 错误，提示找不到模型文件怎么办？","该项目已将模型格式从 model.pt 转换为 model.safetensors，脚本会自动下载 safetensors 格式的文件。\n解决方法：\n1. 删除本地缓存中的旧模型文件夹（例如 \u002Froot\u002FOmniGen-v1\u002F）。\n2. 确保您的网络可以访问 Hugging Face Hub。\n3. 重新运行脚本，系统会自动下载正确的 safetensors 模型文件，无需手动寻找 model.pt。","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen\u002Fissues\u002F37",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},34206,"之前运行成功，但几天后再次运行时突然报错，可能是什么原因？","这通常是由于环境中 PyTorch 版本自动更新导致的不兼容问题。官方建议的 PyTorch 版本是 2.3.1。\n解决方法：检查当前的 PyTorch 版本，如果版本过高或不匹配，请将其降级到推荐版本。有用户通过将版本从最新版降级到 2.2.1 或安装指定的 2.3.1 版本解决了该问题。","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FOmniGen\u002Fissues\u002F172",{"id":140,"question_zh":141,"answer_zh":142,"source_url":133},34207,"如何更改模型缓存路径以避免占用 C 盘空间？","虽然 Issue 中未直接给出代码行号，但通常可以通过设置环境变量来更改 Hugging Face 的缓存路径。在运行脚本前，设置 HF_HOME 或 TRANSFORMERS_CACHE 环境变量指向其他磁盘分区。例如在 Linux\u002FMac 上：\nexport HF_HOME=\"\u002Fpath\u002Fto\u002Fyour\u002Flarge\u002Fdisk\u002Fcache\"\n在 Windows PowerShell 上：\n$env:HF_HOME=\"D:\\path\\to\\cache\"\n设置后再运行程序，模型将下载到指定位置。",[]]