AGENT SKILL

magi-1

Operate MAGI-1 autoregressive video generation inference, ComfyUI nodes, configs, and prompt enhancement assets.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
magi-1
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Operate MAGI-1 autoregressive video generation inference, ComfyUI nodes, configs, and prompt enhancement assets.
disable-model-invocation
true

02 资源文件 8

03 SKILL.md 正文

MAGI-1 repo skill

Use this skill when a task is about MAGI-1, the SandAI autoregressive video generation repository, including source-code inference, model/config selection, CUDA/runtime setup, ComfyUI custom nodes, or the bundled Dify prompt-enhancement workflow.

MAGI-1 is not a lightweight CPU library. Real generation needs CUDA, the MAGI DiT weights, T5 weights, VAE weights, special-token assets, and ffmpeg. This skill provides self-contained operating guidance and safe preflight helpers; it does not include model weights.

Route by task

User task Read
Build or debug t2v, i2v, or v2v source-code commands sub-skills/inference/SKILL.md
Edit or validate MAGI JSON configs, checkpoint paths, process counts, or CFG/distill/fp8 settings sub-skills/inference/SKILL.md and sub-skills/inference/references/configuration.md
Use the Python MagiPipeline API sub-skills/inference/references/cli-and-api.md
Install, recognize, or operate the MAGI-1 ComfyUI custom node sub-skills/comfyui/SKILL.md
Import or adapt MAGI ComfyUI workflow JSONs sub-skills/comfyui/references/comfyui-nodes-and-workflows.md
Prepare weights, runtime dependencies, or safe environment checks references/installation-and-assets.md and scripts/magi_runtime_preflight.py
Understand model families and hardware expectations references/model-and-config-overview.md
Use the prompt enhancement DSL outside MAGI generation references/dify-prompt-enhancement.md
Diagnose install/import, asset, CUDA, ffmpeg, or cross-workflow issues references/troubleshooting.md plus the nearest sub-skill troubleshooting reference

Common operating path

  1. Choose the user-facing surface:
    • Source CLI/API inference: use the inference sub-skill.
    • ComfyUI node graph: use the comfyui sub-skill.
    • Prompt rewriting in Dify: use the Dify reference.
  2. Choose a model family from references/model-and-config-overview.md. Prefer 4.5B variants for single-GPU use; 24B examples are multi-GPU configurations.
  3. Download or locate local MAGI DiT, T5, and VAE weights. Edit a copied JSON config so load, t5_pretrained, and vae_pretrained point to local paths.
  4. Run scripts/magi_runtime_preflight.py in the runtime Python to check CUDA, attention packages, ffmpeg, and optional source assets.
  5. For source CLI/API, run sub-skills/inference/scripts/magi_config_check.py before generation and sub-skills/inference/scripts/magi_command_builder.py to print a command.
  6. For ComfyUI, import one of the bundled workflow JSONs from sub-skills/comfyui/references/workflows/ and reassign every placeholder path inside the UI before queueing.
  7. If anything fails, read references/troubleshooting.md first, then the workflow-specific troubleshooting page.

Strong constraints and safety notes

  • Do not present a config parse, helper output, or import check as a successful video generation. A real MAGI smoke test must load weights and write a playable MP4.
  • Do not tell users to run original repository examples from an absent checkout. Use this skill's bundled helpers and references to reconstruct safe commands and checks.
  • Do not claim CPU-only generation support. CUDA is required by MAGI source distributed initialization and model code paths.
  • Match engine_config.pp_size * engine_config.cp_size to the launched process count. The bundled inference config checker validates this preflight.
  • Treat model architecture fields as checkpoint-coupled. For most tasks, copy a release-family config and edit paths, seed, output dimensions, frame count, steps, FPS, and parallel sizes only when launch topology changes.
  • The ComfyUI node path is single-process/single-GPU by default because MagiProcess sets its own distributed and CUDA visibility environment variables.
  • Large model downloads, full generation, and ComfyUI host operation may be expensive or environment-specific. Ask for user approval before long downloads or long generation runs.

Bundled helpers

Provenance and routing metadata

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351