Skip to content

Add ABot-World - #14539

Open
yiyixuxu wants to merge 7 commits into
refactor-iterative-loop-blocksfrom
abot-world-modular
Open

Add ABot-World#14539
yiyixuxu wants to merge 7 commits into
refactor-iterative-loop-blocksfrom
abot-world-modular

Conversation

@yiyixuxu

@yiyixuxuyiyixuxu commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

hub repo: https://huggingface.co/YiYiXu/ABot-World-0-5B-LF-Diffusers
space demo: https://huggingface.co/spaces/diffusers-internal-dev/abot-world-interactive

to run it iteractively

pipe=ABotWorldStreamingBlocks().init_pipeline("YiYiXu/ABot-World-0-5B-LF-Diffusers") pipe.load_components(dtype=torch.bfloat16)
pipe.to("cuda")
defaction_fn(block_index):
returnread_player_keys() # the current [W,A,S,D,I,J,K,L] vector, or None to stopforeventinpipe.stream(prompt="| unknown |", image=image, reference_images=refs, actions=action_fn):
ifevent.path=="denoise.rollout":
show(event.state.get("frames")) # this block's decoded frames, 12 frames ≈ 0.75 s of video

…-5B)
Integrates https://github.com/amap-cvlab/ABot-World (acvlab/ABot-World-0-5B-LF,
Apache-2.0) as a modular pipeline.
- ABotWorldTransformer3DModel: block-causal rollout over a rolling K/V cache
(window eviction, pinned reference-token prefix, relative RoPE with periodic
rebase), per-frame timesteps, keyboard-action adapter added onto the patch
tokens, per-stream cross-attention cache. Bit-exact vs the reference
(CPU/fp32) incl. eviction, rebase, and the real 5B weights.
- scripts/convert_abot_world_to_diffusers.py: pure key renames, no surgery.
VAE and umt5 are byte-identical to Wan-AI/Wan2.2-TI2V-5B and are reused from
Wan-AI/Wan2.2-TI2V-5B-Diffusers; FlowMatchEulerDiscreteScheduler(shift=5.0)
covers the warped DMD grid (scale_noise == the reference re-noise).
- modular_pipelines/abot_world: text/image/reference encoders -> core denoise
(prepare + rollout IterativePipelineBlocks over blocks k, with a nested
distilled denoise loop over (i, t) and a KV-cache context update) -> decode.
Streams via pipe.stream() (events per denoise step and per ~1s block) and
drives interactively via loop_step, writing new actions into the state
between calls.
- Converted checkpoint + runnable example: YiYiXu/ABot-World-0-5B-LF-Diffusers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

yiyixuxuand others added 4 commits August 20, 2026 06:21
- ABotWorldStreamingBlocks: like the default blockset, but each block is
decoded to pixels inside the rollout loop (trailing-window decode with the
previous block as temporal context; independent per-block decode of the
causal VAE produces artifacts), so stream() yields ready frames per ~1 s
block
- the rollout takes a scripted `actions` list or an `action_source` callable
polled once per block (return None to stop) — a live driver is just a
stream() consumer whose callable returns the player's current action; with
__call__ the callable combination raises, since no frames flow back between
polls
- set_action reads the single current `action` from state (no actions[k]
indexing); `actions` becomes optional in the prepare step
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Without reference images the ref encoder emits zero reference latents with a zero
reference_mask, matching the reference implementation's ref-less mode; the mask is
plumbed through both transformer calls in the streaming rollout.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… the ABot-World streaming rollout
decode(z, cache=cache) keeps the causal-conv feature cache across calls so a video can be
decoded chunk by chunk with results identical to a single decode. The streaming decode step
carries the cache through the rollout loop instead of re-decoding a trailing window of the
previous block (bit-exact vs. a full decode; 3.3 -> 2.3 s per block on H100 at 704x1280).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ock in both presets
AutoencoderTinyVideo ports madebyollin's TAEHV family as one class (config per checkpoint;
defaults are taew2_2 for the Wan 2.2 latent space) with a TinyVideoDecodeCache for chunk-by-chunk
decode, plus scripts/convert_taehv_to_diffusers.py and a docs page. Parity against the reference:
decode 1.5e-8, streaming 2.5e-6, encode exact.
The ABot-World presets now mirror the reference's vae_type switch: ABotWorldBlocks decodes every
block inside the rollout loop with the full Wan VAE (ABotWorldDecodeStep + WanDecodeCache, as
scripts/inference.py does), ABotWorldStreamingBlocks with the tiny VAE (ABotWorldTinyDecodeStep,
as the interactive space does). The one-shot end decode is removed; it mirrored an entry point
the reference never uses and needed all latents decoded at once. Streaming block time on H100:
2.3 s -> 0.9 s.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 21, 2026
yiyixuxuand others added 2 commits August 21, 2026 15:06
…ist or a callable `actions`
- `action` is a loop variable next to `k`: the rollout loop passes each block's vector to
its sub-blocks instead of writing it into the state, so a single
`ABotWorldSetActionStep` serves both presets (`ABotWorldCurrentActionStep` removed) and
a live driver calls `loop_step(components, state, k=k, action=action)`.
- `actions` is either a scripted list (one block per vector) or, with `stream()`, a
callable `(block_index) -> vector or None` polled once per block; `action_source` and
the separate streaming wrapper are gone. The presets now differ only in their decode
step.
- Adopt `loop_inputs` / `loop_intermediate_outputs` from the base: `actions` and
`denoise_timesteps` are loop inputs, `videos` is written through `set_block_state`.
- `decode_cache` is seeded as `None` by the prepare step (created by the decode step on
the first block) instead of being filtered out of the loop's inputs; the prepare step
no longer validates `actions` — the set-action step checks each block's vector.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationmodelsmodular-pipelinessize/LPR with diff > 200 LOCutils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yiyixuxu@HuggingFaceDocBuilderDev