
DreamOmni2简介
DreamOmni2是什么?
DreamOmni2是由香港中文大学、香港科技大学和字节跳动等团队联合研发的基于多模态指令的AI图像编辑与生成系统。支持对象替换、灯光渲染、风格转换、姿势模仿、面部与发型编辑、字体与图案模仿、背景替换等多种功能。用户可通过文字或参考图像实现灵活的创意生成,适用于创意设计、影视游戏、科研探索与个性化内容创作,是一款高效先进的AI图像生成与编辑工具。

DreamOmni2的主要功能
它的目标是通过自然语言或示例图像的指令,实现灵活的图像生成与编辑。具体能力包括:
- 对象替换:把图像中的某个物体替换成指定的新物体。
- 灯光渲染:改变图像的光照条件,让画面呈现不同的氛围。
- 风格转换:将图像转换为另一种艺术风格或视觉效果。
- 姿势模仿:让目标人物模仿参考图像中的姿势。
- 面部表情与发型替换:根据参考图像改变人物的表情或发型。
- 字体与图案模仿:生成与参考图像一致的字体或图案。
- 背景替换:将原有背景替换为新的场景。
- 多参考生成:支持基于三张或四张参考图像进行综合生成。
- 上下文生成:在已有图像的语境下生成符合要求的新内容。
应用场景
- 创意设计:快速生成不同风格的插画、广告素材。
- 影视与游戏:进行角色造型、场景氛围的快速迭代。
- 教育与科研:作为多模态 AI 编辑与生成的研究平台。
- 个性化内容创作:比如换背景、改发型、模仿姿势等。
DreamOmni2使用教程
- 项目页面:https://pbihao.github.io/projects/DreamOmni2/index.html
- 演示空间:https://huggingface.co/spaces/wcy1122/DreamOmni2-Edit
- 代码仓库:https://github.com/dvlab-research/DreamOmni2
一、环境准备
1. 克隆项目代码
git clone https://github.com/dvlab-research/DreamOmni2
cd DreamOmni2
2. 安装依赖
pip install -r requirements.txt
3. 下载模型权重
使用 Hugging Face CLI 下载:huggingface-cli download –resume-download –local-dir-use-symlinks False xiabs/DreamOmni2 –local-dir ./models
二、推理使用
1. 图像编辑(Editing)
将要编辑的图像放在第一个位置,参考图像放在后面。
示例命令:
python3 inference_edit.py \
–input_img_path “example_input/edit_tests/src.jpg” “example_input/edit_tests/ref.jpg” \
–input_instruction “Make the woman from the second image stand on the road in the first image.” \
–output_path “example_input/edit_tests/edit_res.png”
2. 图像生成(Generation)
支持多张参考图像 + 文本指令。
示例命令:
python3 inference_gen.py \
–input_img_path “example_input/gen_tests/img1.jpg” “example_input/gen_tests/img2.jpg” \
–input_instruction “In the scene, the character from the first image stands on the left, and the character from the second image stands on the right. They are shaking hands against the backdrop of a spaceship interior.” \
–output_path “example_input/gen_tests/gen_res.png” \
–height 1024 \
–width 1024
三、Web界面演示
DreamOmni2还提供了WebUI,可以更直观地操作。
1. 启动编辑服务
CUDA_VISIBLE_DEVICES=0 python web_edit.py \
–vlm_path PATH_TO_VLM \
–edit_lora_path PATH_TO_DEIT_LORA \
–server_name “0.0.0.0” \
–server_port 7860
2. 启动生成服务
CUDA_VISIBLE_DEVICES=1 python web_generate.py \
–vlm_path PATH_TO_VLM \
–gen_lora_path PATH_TO_GENERATION_LORA \
–server_name “0.0.0.0” \
–server_port 7861
然后在浏览器中访问http://localhost:7860或http://localhost:7861即可使用。
数据评估
本站新媒派提供的该工具内容都来源于网络,不保证外部链接的准确性和完整性,同时,对于该外部链接的指向,不由新媒派实际控制,在2025年10月26日 下午3:35收录时,该网页上的内容,都属于合规合法,后期网页的内容如出现违规,可以直接联系网站管理员进行删除,新媒派不承担任何责任。
与DreamOmni2相关工具


STranslate

Zread AI
Anda

LogoCreator

AB Download Manager

NeuralAgent

AiNiee

OpenShot

File Find

Pasteme

yt-dlp

n8n

IronRDP

ReactBits









