Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cf3248c
fix(models): gate channels_last_3d activations to CUDA devices
yx0716 Aug 31, 2026
e9fd116
fix(distributed): default device mesh to the detected platform
yx0716 Aug 31, 2026
7d5c8f4
fix(worker): marshal parallel-worker queue tensors through CPU off CUDA
yx0716 Aug 31, 2026
74dd3ab
refactor(ops): move fused FP8 QKV Triton kernels into kernel.triton
yx0716 Aug 31, 2026
b6dea52
fix(distributed): allocate pipeline P2P buffers on the platform device
yx0716 Aug 31, 2026
00a2124
fix(worker): keep marshalled queue results device-agnostic
yx0716 Sep 1, 2026
1b96425
feat(examples): auto-detect device in the wan22 5B T2V example
yx0716 Sep 1, 2026
edf966d
fix(models): accept batched tensors in wan22 VAE parallel decode
yx0716 Aug 31, 2026
d34c842
fix(worker): isolate HCCL socket ranges per parallel worker group
yx0716 Aug 31, 2026
54a2b94
docs: register Ascend NPU in the platform, installation, and wan_vide…
yx0716 Sep 11, 2026
9c36c15
Merge branch 'main' into feat/npu-adapt
lzx1413 Nov 5, 2026
e451e7a
fix(ops): restore lazy FP8 attention kernels and native helpers
yx0716 Nov 20, 2026
cff81cc
fix(worker): isolate Ascend rank placement, queues and HCCL ports
yx0716 Nov 20, 2026
2770453
feat(docker): add the CANN 9.3 arm64 image and Wan runbook
yx0716 Nov 20, 2026
515c39e
fix(docker): isolate TeleFuser dependency validation
yx0716 Nov 20, 2026
7428f04
build(ascend): reuse verified base and wheel archives on restricted h…
yx0716 Nov 20, 2026
c27fabd
fix(docker): pin the arm64 CPU TorchCodec wheel and load its decoder
yx0716 Nov 20, 2026
682992b
docs(ascend): record 910B2 hardware results and tested offline instal…
yx0716 Nov 20, 2026
f3b177f
test(ascend): collect mesh and pipeline tests without Triton
yx0716 Nov 20, 2026
3ebeec8
fix(ops): defer sparse attention Triton imports until use
yx0716 Nov 20, 2026
aa45a13
docs(ascend): clarify the four-card qualification status
yx0716 Nov 20, 2026
a9a3495
build(ascend): ship a prebuilt TeleFuser application image
yx0716 Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ The project treats a world model as more than a function that returns a single c
pip install -e .
```

For NVIDIA Triton and quantization support, install `pip install -e ".[cuda]"`. Ascend 910B2 users can build the pinned container and run the Wan example. [Ascend installation](docs/en/ascend_910b.md)

For development:

```bash
Expand Down
2 changes: 2 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ TeleFuser 是一个开源的多模态生成与世界模型流式推理和服务
pip install -e .
```

NVIDIA 的 Triton 与量化功能使用 `pip install -e ".[cuda]"`。Atlas 910B2 可从固定版本镜像运行 Wan 示例。[昇腾镜像安装](docs/zh/ascend_910b.md)

开发环境安装:

```bash
Expand Down
55 changes: 55 additions & 0 deletions docker/Dockerfile.ascend
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
ARG CANN_REPOSITORY=swr.cn-south-1.myhuaweicloud.com/ascendhub/cann
ARG CANN_IMAGE=${CANN_REPOSITORY}:9.3.0-beta.1-910b-ubuntu22.04-py3.11@sha256:cf6ab60eefb56b8d0e3ecad6d03c30c457b4dff86bcbf5dd7ff1a90427348b7b
FROM ${CANN_IMAGE} AS system

USER root
RUN test "$(uname -m)" = aarch64 && apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/opt/telefuser/venv/bin:${PATH}"

FROM system AS python-runtime
RUN python3.11 -m venv /opt/telefuser/venv
COPY docker/ascend/ /tmp/ascend/
# The upstream PYTHONPATH also includes optional CANN development and profiling tools.
# Keep hashes in both modes, including wheels with explicit publisher URLs.
RUN if [ -d /tmp/ascend/wheelhouse ]; then \
sed -E 's# @ https://[^ ]*/([^ ]+\.whl) # @ file:///tmp/ascend/wheelhouse/\1 #' \
/tmp/ascend/requirements.lock > /tmp/offline.lock && \
set -- --no-index --find-links=/tmp/ascend/wheelhouse -r /tmp/offline.lock; \
else \
set -- --index-url https://pypi.org/simple -r /tmp/ascend/requirements.lock; \
fi && python -I -m pip install --no-cache-dir --only-binary=:all: --require-hashes "$@"

FROM system AS installed
COPY --from=python-runtime /opt/telefuser/venv /opt/telefuser/venv
COPY docker/ascend/requirements.lock /opt/telefuser/requirements.lock
ARG TELEFUSER_VERSION=0.0.0+local
ARG SOURCE_REVISION=local
LABEL org.opencontainers.image.source="https://github.com/Tele-AI/TeleFuser" \
org.opencontainers.image.revision="${SOURCE_REVISION}" \
org.opencontainers.image.version="${TELEFUSER_VERSION}"

WORKDIR /opt/telefuser
COPY pyproject.toml README.md LICENSE /tmp/telefuser-src/
COPY telefuser /tmp/telefuser-src/telefuser
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TELEFUSER="${TELEFUSER_VERSION}" \
python -I -m pip wheel --no-build-isolation --no-deps -w /tmp/telefuser-dist /tmp/telefuser-src \
&& python -I -m pip install --no-deps /tmp/telefuser-dist/telefuser-*.whl \
&& python -I -m pip check && rm -rf /tmp/telefuser-src /tmp/telefuser-dist \
&& ffprobe -version > /dev/null && hf --version \
&& TORCH_DEVICE_BACKEND_AUTOLOAD=0 python -I -c 'from torchcodec.decoders import VideoDecoder'
COPY examples/wan_video/wan22_t2v_5b.py ./examples/wan_video/wan22_t2v_5b.py

# Publish the application files separately from the vendor runtime.
FROM scratch AS runtime-payload
ARG SOURCE_REVISION=local
ARG TELEFUSER_VERSION=0.0.0+local
LABEL org.opencontainers.image.source="https://github.com/Tele-AI/TeleFuser" \
org.opencontainers.image.revision="${SOURCE_REVISION}" \
org.opencontainers.image.version="${TELEFUSER_VERSION}"
COPY --from=installed /opt/telefuser/ /opt/telefuser/

FROM installed
# Inherit the pinned CANN image's entrypoint to initialize the toolkit, AscendNPU IR and ATB.
CMD ["telefuser", "--help"]
17 changes: 17 additions & 0 deletions docker/Dockerfile.ascend.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**
!pyproject.toml
!README.md
!LICENSE
!telefuser/
!telefuser/**
**/__pycache__
**/*.pyc
telefuser/_version.py
!docker/
!docker/ascend/
!docker/ascend/requirements.lock
!docker/ascend/wheelhouse/
!docker/ascend/wheelhouse/*.whl
!examples/
!examples/wan_video/
!examples/wan_video/wan22_t2v_5b.py
19 changes: 19 additions & 0 deletions docker/Dockerfile.ascend.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG TELEFUSER_PAYLOAD=telefuser:ascend910b-c27fabd-payload
ARG CANN_IMAGE=quay.io/ascend/cann:9.3.0-beta.1-910b-ubuntu22.04-py3.11@sha256:cf6ab60eefb56b8d0e3ecad6d03c30c457b4dff86bcbf5dd7ff1a90427348b7b
FROM ${TELEFUSER_PAYLOAD} AS payload
FROM ${CANN_IMAGE}

USER root
RUN test "$(uname -m)" = aarch64 && apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/opt/telefuser/venv/bin:${PATH}"

ARG SOURCE_REVISION=c27fabdcdf6f1156126e1bc22699f1af4580c97e
ARG TELEFUSER_VERSION=0.0.0+gc27fabd.local
LABEL org.opencontainers.image.source="https://github.com/Tele-AI/TeleFuser" \
org.opencontainers.image.revision="${SOURCE_REVISION}" \
org.opencontainers.image.version="${TELEFUSER_VERSION}"
WORKDIR /opt/telefuser
COPY --from=payload /opt/telefuser/ /opt/telefuser/
CMD ["telefuser", "--help"]
76 changes: 76 additions & 0 deletions docker/ascend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Ascend image maintenance

The 910B image targets Linux arm64 and CPython 3.11. The Dockerfile pins the architecture-specific CANN manifest. The runtime lock combines the base dependencies from `pyproject.toml` and the stack from `requirements.in`. Every entry names one compatible wheel and its SHA-256. The Ascend release provides the wheel for torch_npu 2.11.0.post4. [Ascend release artifacts](https://api.gitcode.com/api/v5/repos/Ascend/pytorch/releases/tags/v26.3.0-beta.1-pytorch2.11.0)

The default registry is AscendHub in China. For public pulls use `--build-arg CANN_REPOSITORY=quay.io/ascend/cann` or `--build-arg CANN_REPOSITORY=docker.io/ascendai/cann`. All three registries serve the same pinned arm64 manifest. [Ascend image repositories](https://github.com/Ascend/cann-container-image/blob/main/OVERVIEW.zh.md)

If the upstream base was transferred by `docker save` / `docker load`, Docker may retain only its local tag. Verify the loaded arm64 image ID against `sha256:92ceaadada7011d9179f5854b08fc66981d3d604cfd72445bcbae756c777dee1`, the config referenced by the pinned manifest. Pass that verified local tag via `--build-arg CANN_IMAGE=<local-tag>` to reuse the cached layers.

For a build host with limited access to Python package servers, prepare the wheels on a connected Linux arm64 machine with Python 3.11. Transfer the directory to the same path in the build checkout. The Dockerfile detects it, installs from disk, checks every hash in the release lock and leaves the wheel archives in the build stage. The system stage still needs Ubuntu packages for FFmpeg.

```bash
python3.11 -m pip download --only-binary=:all: --require-hashes \
--index-url https://pypi.org/simple -r docker/ascend/requirements.lock \
--dest docker/ascend/wheelhouse
```

## Update the dependency lock

Run from the repository root in a clean CPython 3.11 environment on Ubuntu 22.04 arm64. Match each direct wheel URL and hash in `requirements.in` to its publisher before resolving. For TorchCodec, use the pinned arm64 CPU wheel. Its decoder must load against the system FFmpeg libraries during the image build. The pip report includes the source checkout as a separate local distribution. [TorchCodec CPU releases](https://download.pytorch.org/whl/cpu/torchcodec/)

```bash
python -m pip install --dry-run --ignore-installed --only-binary=:all: \
--index-url https://pypi.org/simple --report /tmp/telefuser-ascend-resolution.json \
-r docker/ascend/requirements.in .
python - <<'PY'
import json
from pathlib import Path

from packaging.utils import canonicalize_name

directory = Path("docker/ascend")
direct = {
line.split(" @ ")[0]: line.split(" @ ")[1].partition("#")[0]
for line in (directory / "requirements.in").read_text().splitlines() if " @ " in line
}
entries = []
for record in json.loads(Path("/tmp/telefuser-ascend-resolution.json").read_text())["install"]:
name = canonicalize_name(record["metadata"]["name"])
if name == "telefuser":
continue
digest = record["download_info"]["archive_info"]["hashes"]["sha256"]
requirement = f"{name} @ {direct[name]}" if name in direct else f"{name}=={record['metadata']['version']}"
entries.append((name, f"{requirement} --hash=sha256:{digest}"))
header = "# Linux arm64, Ubuntu 22.04, CPython 3.11. One wheel hash per distribution."
(directory / "requirements.lock").write_text("\n".join([header, *(line for _, line in sorted(entries))]) + "\n")
PY
```

## Publish the TeleFuser application image

Build the `runtime-payload` target from a clean release checkout. This target packages the Python environment and Wan example in a scratch image. The runnable image uses CANN layers pulled from the official Ascend registry. Record the source revision, checksums, tested driver and firmware, and validated card counts in the release. [CANN software license](https://www.hiascend.com/en/legal/cannua-download?isNewCon=true) · [Qualification procedure](../../docs/en/ascend_910b.md)

```bash
read -r -p 'TeleFuser package version > ' TF_VERSION
TF_REV=$(git rev-parse HEAD)
TF_PAYLOAD="telefuser:ascend910b-${TF_REV:0:7}-payload"
docker build --platform linux/arm64 --target runtime-payload -f docker/Dockerfile.ascend \
--build-arg "TELEFUSER_VERSION=$TF_VERSION" --build-arg "SOURCE_REVISION=$TF_REV" \
-t "$TF_PAYLOAD" .
```

Assemble the runnable image with `Dockerfile.ascend.install`. Pass `--build-arg TELEFUSER_PAYLOAD="$TF_PAYLOAD"` and the same version and revision arguments. Run the hardware checks on that image. For a GitHub Release, upload the compressed `docker save` archive, `Dockerfile.ascend.install` and their SHA-256 checksums. Verify anonymous download and repeat the documented install from those assets.

## Save a complete image for an existing installation

Use the tag on the qualification host so the recipient loads the exact image that ran the tests. Transfer both files together. The first build qualified on one and two 910B2 devices used the tag below.

```bash
set -o pipefail
TF_IMAGE=telefuser:ascend910b-c27fabd
TF_ARCHIVE=telefuser-ascend910b-c27fabd.tar.gz
docker save "$TF_IMAGE" | gzip -1 > "$TF_ARCHIVE"
sha256sum "$TF_ARCHIVE" > "$TF_ARCHIVE.sha256"
```

On the target host, verify the archive, load it with `docker load -i` and compare the resulting image ID with the hardware qualification record. [Tested image and run instructions](../../docs/en/ascend_910b.md)
12 changes: 12 additions & 0 deletions docker/ascend/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Ubuntu 22.04 (glibc 2.35), CPython 3.11, Linux arm64.
# Match Ascend Extension for PyTorch v26.3.0-beta.1-pytorch2.11.0.
torch @ https://download.pytorch.org/whl/cpu/torch-2.11.0%2Bcpu-cp311-cp311-manylinux_2_28_aarch64.whl#sha256=46fbb0aa257bb781efbfad648f5b045c0e232573b661f1461593db61342e9096
torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.26.0%2Bcpu-cp311-cp311-manylinux_2_28_aarch64.whl#sha256=c11e55041f6b84a6c4fb28981b901475aa81c38695ccec6ddfcc54c3fa9fac4f
torchaudio @ https://download.pytorch.org/whl/cpu/torchaudio-2.11.0%2Bcpu-cp311-cp311-manylinux_2_28_aarch64.whl#sha256=7a5ecdd20fb26d8eb1d62135ddc6db0f806b17667c10e82df913fd509d1f5cfe
torch-npu @ https://gitcode.com/Ascend/pytorch/releases/download/v26.3.0-beta.1-pytorch2.11.0/torch_npu-2.11.0.post4-cp311-cp311-manylinux_2_28_aarch64.whl#sha256=10b3f58c8b9396b4be4027c35cf0e08ef6223699b9cf186c1d89fd5b75652536
torchcodec @ https://download.pytorch.org/whl/cpu/torchcodec-0.13.0%2Bcpu-cp311-cp311-manylinux_2_28_aarch64.whl#sha256=960577cfc46cafef1553dffcc529d19a0fcdb9423d374f504875c16dd5facfe5

# Build the TeleFuser wheel with the same pinned tools in the image.
setuptools==80.9.0
setuptools-scm==8.3.1
wheel==0.45.1
Loading
Loading