Skip to content

feat(image): support HiDream-O1 models - #5370

Merged
qinxuye merged 2 commits into
xorbitsai:mainfrom
Minamiyama:models/hidream-o1-image
Aug 20, 2026
Merged

feat(image): support HiDream-O1 models#5370
qinxuye merged 2 commits into
xorbitsai:mainfrom
Minamiyama:models/hidream-o1-image

Conversation

@Minamiyama

Copy link
Copy Markdown
Collaborator

Summary

Add native Xinference support for the HiDream-O1 image model family using the official inference implementation.

Supported models:

Model Text-to-image Image-to-image Hugging Face ModelScope
HiDream-O1-Image Yes Yes main master
HiDream-O1-Image-Dev Yes Yes main master
HiDream-O1-Image-Dev-2604 Yes No main master

Changes

  • Add a dedicated HiDream-O1 image engine adapter.
  • Register the adapter before the generic Diffusers engine.
  • Vendor and adapt runtime components from the official HiDream-O1 inference code.
  • Preserve official schedulers, noise parameters, and the 28-step Dev timestep schedule.
  • Support multiple reference images for editing and subject-driven generation.
  • Add Hugging Face and ModelScope model sources.
  • Add built-in model documentation and image ability listings.

Upstream

@XprobeBot XprobeBot added this to the v3.x milestone Aug 18, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the HiDream-O1-Image model family (including base and distilled dev variants) in Xinference. It adds model specifications, documentation, and registers the new PyTorch-based image engine while vendoring the necessary third-party model implementation. The review identified several critical and medium-severity issues in the vendored code, including an incorrect PyTorch version check that would prevent the model from loading, an incompatible torch.Generator instantiation, incorrect type hints, a potential AttributeError in the UniPC solver, and a potential crash when parsing layout bounding boxes.

Comment thread xinference/model/image/hidream_o1.py
Comment thread xinference/thirdparty/hidream_o1/pipeline.py
Comment thread xinference/thirdparty/hidream_o1/utils.py
Comment thread xinference/thirdparty/hidream_o1/fm_solvers_unipc.py
Comment thread xinference/thirdparty/hidream_o1/utils.py
Comment thread doc/source/models/builtin/image/hidream-o1-image.rst Outdated
@qinxuye
qinxuye force-pushed the models/hidream-o1-image branch from 3e50bc1 to 14277a6 Compare August 19, 2026 07:21

@qinxuye qinxuye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Minamiyama
Minamiyama force-pushed the models/hidream-o1-image branch from 14277a6 to 21d52aa Compare August 19, 2026 11:45
@qinxuye
qinxuye merged commit 9b3bb5f into xorbitsai:main Aug 20, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants