immanuelzhu commited on
Commit
cc04eca
·
verified ·
1 Parent(s): ecd462b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -169,19 +169,21 @@ def generate_image(
169
 
170
  _HEADER_ = '''
171
  <div style="text-align: center; max-width: 650px; margin: 0 auto;">
172
- <h1 style="font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; display: contents;">DreamO</h1>
173
- <p style="font-size: 1rem; margin-bottom: 1.5rem;">Paper: <a href='https://arxiv.org/abs/2504.16915' target='_blank'>DreamO: A Unified Framework for Image Customization</a> | Codes: <a href='https://github.com/bytedance/DreamO' target='_blank'>GitHub</a></p>
174
  </div>
175
 
176
- 🚩 Update Notes:
177
- - 2025.05.11: We have updated the model to mitigate over-saturation and plastic-face issues. The new version shows consistent improvements over the previous release.
178
-
179
- ❗️❗️❗️**User Guide:**
180
- - The most important thing to do first is to try the examples provided below the demo, which will help you better understand the capabilities of the DreamO model and the types of tasks it currently supports
181
- - For each input, please select the appropriate task type. For general objects, characters, or clothing, choose IP — we will remove the background from the input image. If you select ID, we will extract the face region from the input image (similar to PuLID). If you select Style, the background will be preserved, and you must prepend the prompt with the instruction: 'generate a same style image.' to activate the style task.
182
- - The most import hyperparameter in this demo is the guidance scale, which is set to 3.5 by default. If you notice that faces appear overly glossy or unrealistic—especially in ID tasks—you can lower the guidance scale (e.g., to 3). Conversely, if text rendering is poor or limb distortion occurs, increasing the guidance scale (e.g., to 4) may help.
183
- - To accelerate inference, we adopt FLUX-turbo LoRA, which reduces the sampling steps from 25 to 12 compared to FLUX-dev. Additionally, we distill a CFG LoRA, achieving nearly a twofold reduction in steps by eliminating the need for true CFG
184
-
 
 
185
  ''' # noqa E501
186
 
187
  _CITE_ = r"""
 
169
 
170
  _HEADER_ = '''
171
  <div style="text-align: center; max-width: 650px; margin: 0 auto;">
172
+ <h1 style="font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; display: contents;">ihome AI Design</h1>
173
+ <p style="font-size: 1rem; margin-bottom: 1.5rem;"> ihome AI Design: 家居AI图片处理</a> | </p>
174
  </div>
175
 
176
+ 核心功能:轻松“换装”您的家居场景!您可以上传一张家居单品(如沙发、灯具)的图片,通过文字描述您想要的房间风格,模型会将其无缝融入到一个全新的家居环境照片中,或者添加到您指定的现有房间照片里。
177
+ 重要提示: 请务必先尝试下方的示例,这将帮助您更好地理解我们模型在家居场景生成与修改方面的能力以及目前支持的操作类型。
178
+ 为每个输入选择合适的任务类型:
179
+ 若为单个家居物品(如沙发、椅子、灯具等): 选择 “家居物品放置”(Item Placement) 模式。我们会自动识别并尝试移除该物品的原始背景。您只需在提示词 (prompt) 中描述希望它融入的房间环境和风格(例如:“将这个沙发放在一个现代简约风格的客厅窗边”),即可生成全新的家居场景图。
180
+ 若为完整家居场景图(用于风格参考或局部修改): 选择 “场景风格编辑”(Scene Style/Edit) 模式。此模式下,原图的整体环境和风格将被保留。
181
+ 如需进行风格化生成 (例如,将一个空房间照片变得充满某种特定风格并添置家具),您需要在提示词前加上:'generate a same style image.' (生成一张同样风格的图片) 来激活此任务,并描述您想添加或修改的内容。
182
+ 如需在现有场景中直接添加或替换物品,请直接在提示词中描述您的具体操作(例如:“在图片中的壁炉旁添加这个上传的椅子”或“把图片中的茶几替换成一个圆形的木质茶几”)。
183
+ 关键参数 - 引导强度 (Guidance Scale): 默认值为 3.5。
184
+ 如果您发现家具材质显得过于光亮、不真实,或者物品与环境光照融合不自然,可以适当降低引导强度 (例如调整到 3.0)。
185
+ 反之,如果家具或场景细节呈现不佳,或者物品摆放出现扭曲变形、与场景透视不符,可以尝试提高引导强度 (例如调整到 4.0)。
186
+ 加速推理: 我们采用了 FLUX-turbo LoRA 技术,将采样步数从25步减少到12步(相较于FLUX-dev版本)。此外,我们还蒸馏了CFG LoRA,通过免除真正的CFG计算,实现了近两倍的步数削减,大幅提升了生成速度
187
  ''' # noqa E501
188
 
189
  _CITE_ = r"""