Skip to content

[Model] Add circlestone-labs/Anima - #4083

Merged
tzhouam merged 20 commits into
vllm-project:mainfrom
akshatvishu:anima
Sep 19, 2026
Merged

tzhouam merged 20 commits into
vllm-project:mainfrom
akshatvishu:anima

Conversation

@akshatvishu

@akshatvishu akshatvishu commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #3658

Adds native diffusion support for circlestone-labs/Anima, a Cosmos-style text-to-image model as a local single-file safetensors checkpoint.

The new AnimaPipeline loads the transformer and text-conditioner weights from the checkpoint, maps the original Cosmos-style keys when needed and reuses the existing Diffusers-style component directory for the text encoder, tokenizers, VAE and scheduler.

TP, SP, CFG parallel, HSDP, Cache-DiT/TeaCache, quantization, CPU/layerwise offload and step execution are left for follow-up work.

Key Changes

Native Anima Pipeline

  • Adds vllm_omni/diffusion/models/anima/ with AnimaPipeline, AnimaTransformer3DModel and AnimaTextConditioner.
  • Loads Anima directly from a local single-file safetensors checkpoint.
  • Converts the original Cosmos-style transformer keys before strict native loading.
  • Adds prompt encoding, true CFG, denoising, VAE decode, and Anima post-processing.
  • Uses custom_pipeline_args for Anima-specific paths, for example components_path.

Native Single-File Resolution

  • Registers AnimaPipeline in the diffusion registry.
  • Maps Anima single-file aliases, including AnimaModularPipeline, to AnimaPipeline.
  • Lets local Anima single-file checkpoints use the default diffusion load format and native pipeline path.
  • Lets local Anima single-file serving use the default single-stage config without a deploy YAML.

Worker / Custom Pipeline Args

  • Updates the custom_pipeline_args worker path so skip_load_model and re_init_pipeline() only run when pipeline_class is set.
  • This lets native pipelines pass model-specific paths through custom_pipeline_args without being treated as dynamic custom pipelines.

Tests:

  • Adds unit tests for native Anima loading, alias resolution, component path handling, CFG behavior and worker wrapper behavior.
  • Adds offline and online Anima serving tests.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e64bd1902

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

pipeline.enable_vae_tiling()

self._pipeline = pipeline
self._accept_call_kwargs = set(inspect.signature(pipeline.__call__).parameters.keys())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve ModularPipeline runtime kwargs

When the native Anima path is used, pipeline is a Diffusers ModularPipeline, whose __call__ signature is generic (state, output, **kwargs) rather than listing model inputs like prompt, height, or num_inference_steps. Caching that signature here makes _build_call_kwargs() later reject and drop the actual request fields, so a normal text-to-image request reaches the modular blocks without the required prompt and fails before generation. For modular pipelines this needs to allow block input names (or accept all kwargs) instead of using inspect.signature(pipeline.__call__) directly.

Useful? React with 👍 / 👎.

@akshatvishu

Copy link
Copy Markdown
Contributor Author

Doing a major refactoring , not ready for review yet!

@timzsu

timzsu commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Hi @akshatvishu, may I ask when this PR will be ready?

@akshatvishu akshatvishu changed the title [WIP] Add circlestone-labs/Anima [Model] Add circlestone-labs/Anima Jun 13, 2026
@akshatvishu

akshatvishu commented Jun 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@timzsu It's ready review!

The benchmarking code is included temporarily for validating this port. Once we're happy with the implementation, I'll run the benchmarks against the native diffuser implementation and remove the benchmarking code afterward before merging!

@timzsu

timzsu commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Hi @akshatvishu, is it possible to split the performance optimizations from the model support? The current PR is too big (>3k lines) and hard to review. I suggest keeping the first PR as an integration with no extra optimizations. Then you can create separate PRs for offloading, quantization, and cache based on it.

Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
@hsliuustc0106 hsliuustc0106 added enhancement New feature or request new model add new model labels Jul 17, 2026 — with ChatGPT Codex Connector
@vllm-omni-review-bot

vllm-omni-review-bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Omni ReviewBot triage note

Automated triage of commit ff9057781caf produced:

  • Priority: high. Prompt maintainer attention is suggested.

These are automated triage suggestions only — the final decision belongs to the maintainers.

@vllm-omni-review-bot

Copy link
Copy Markdown

Omni ReviewBot: no human activity for 15 days

@akshatvishu this pull request has had no human commit, comment or review since 2026-08-31. Per repository policy it may be closed if it stays inactive.

To keep it moving, any one of these is enough: push an update, reply to the open blocker, or post the current plan and timeline.

Signed-off-by: akshatvishu <akshatnayak197@gmail.com>

# Conflicts:
#	docs/models/supported_models.md
#	examples/offline_inference/text_to_image/text_to_image.py
#	tests/entrypoints/test_utils.py
#	vllm_omni/diffusion/data.py
#	vllm_omni/diffusion/registry.py
#	vllm_omni/entrypoints/utils.py
@akshatvishu

akshatvishu commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @alex-jw-brooks @tzhouam @yuanheng-zhao , following up on the suggestion to replace the Anima allowlist with a local-file plus explicit-class check.

My concern is that an explicit class name does not guarantee its loader supports checkpoint files. We could declare that support in the existing DiffusionModelMetadata -> avoiding the pipeline import required by my earlier proposal. However, that still adds a shared field and requires each supported model to opt in.

Would you prefer the simpler file-plus-class rule or the explicit support check? The native loading path and previously suggested worker guard would stay as they are.

@tzhouam tzhouam added the ready label to trigger buildkite CI label Sep 16, 2026
@tzhouam

tzhouam commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

fix the CI error please, thanks

Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
@akshatvishu

akshatvishu commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

@tzhouam CI was failing because Anima was missing shared tiny-model test settings; I added them and also fixed a CLI bug that treated local checkpoint files as HF model IDs. Can you please re-run the CI?

@hsliuustc0106 hsliuustc0106 added the high priority high priority issue, needs to be done asap label Sep 17, 2026
@tzhouam tzhouam added ready label to trigger buildkite CI and removed ready label to trigger buildkite CI labels Sep 17, 2026
@tzhouam

tzhouam commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

still failed, please pass the tests locally
also, please deal with the conflict

Signed-off-by: akshatvishu <akshatnayak197@gmail.com>

# Conflicts:
#	vllm_omni/config/resolver.py
#	vllm_omni/entrypoints/cli/serve.py
@akshatvishu

akshatvishu commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed the conflicts! The CI show 3 failure , none of which is related to changes made in this PR @tzhouam ! Short summary of CI failures:

Failure Existing report / fix Status
NVIDIA NIXL Issue #7699 includes this exact failure. PR #7088 contains the test fix. Open
AMD MAGI2 PR #7606 adds the correct CUDA platform guard. Open
Intel disk full Issue #7587 reports the same runner failure. Open

Checked against main at f5e4f5fa4 .

Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
@tzhouam tzhouam added ready label to trigger buildkite CI and removed ready label to trigger buildkite CI labels Sep 19, 2026
@tzhouam
tzhouam merged commit 415005b into vllm-project:main Sep 19, 2026
6 of 9 checks passed
mlaneuville pushed a commit to mlaneuville/vllm-omni that referenced this pull request Sep 22, 2026
Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
Signed-off-by: Matthieu Laneuville <matthieu.laneuville@surf.nl>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request high priority high priority issue, needs to be done asap new model add new model ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Model]: circlestone-labs/Anima

6 participants