协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
setup-and-weights【开发与工程】Installs and diagnoses the official FlashVSR CUDA/LCSA runtime, validates v1 or v1.1 model bundles, and wires ModelManager, projection, decoder, and context assets.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill before any FlashVSR model allocation. It owns the Python, PyTorch, CUDA, Block-Sparse-Attention, model-bundle, ModelManager, projection, decoder, and positive-context gates. Route prepared video geometry, temporal framing, full/tiny/tiny-long selection, and pipeline calls to inference.
pkg_resources, compiler, CUDA, or extension build: read
install.md.The verified backend-smoke profile is Python 3.11, PyTorch 2.6.0+cu124,
CUDA 12.4, and NVIDIA A100 SM80. FlashVSR's official Wan DiT imports and calls
block_sparse_attn; a CUDA-enabled torch import alone is not sufficient.
Build the extension separately for the target toolkit/ABI/SM profile and require:
python -c "from block_sparse_attn import block_sparse_attn_func; print('LCSA import OK')"
The import gate and a small bf16 CUDA streaming-attention call passed on the profile above. Real FlashVSR checkpoint loading remains a separate native gate. Run the bundled read-only diagnostic from any directory:
python <skill-root>/sub-skills/setup-and-weights/scripts/check_environment.py
It reports target-version and backend readiness without downloading, building, or printing module/cache locations.
Use one application-owned model directory containing the official v1 or v1.1 files:
diffusion_pytorch_model_streaming_dmd.safetensors
Wan2.1_VAE.pth
LQ_proj_in.ckpt
TCDecoder.ckpt
README.md
Before ModelManager, reject missing, empty, and Git LFS pointer files:
python <skill-root>/sub-skills/setup-and-weights/scripts/check_weights.py \
<MODEL_DIR> --version v1.1
Do not mix versions. Full uses the DiT and Wan VAE; tiny and tiny-long use the DiT and TCDecoder. All routes use the matching LQ projection and positive cross-attention context.
ModelManager(torch_dtype=torch.bfloat16, device="cpu"); load
explicit local files and stop unless wan_video_dit is detected. Full must
also detect wan_video_vae.Buffer_LQ4x_Proj; v1.1 uses Causal_LQ4x_Proj. Both use
(in_dim=3, out_dim=1536, layer_num=1) and load LQ_proj_in.ckpt strictly.[512,256,128,128] and latent
channels 16+768; load non-strictly but review all missing/unexpected keys.diffsynth exports; do not depend on a source-checkout utility path.[1,512,4096], and
call pipe.init_cross_kv(context_tensor=context) once before inference.Completed: package and FlashVSR-class imports, CUDA hardware probe,
block_sparse_attn import, bf16 kernel smoke, diagnostic helper checks, and
synthetic incomplete-bundle checks. Not completed: real v1/v1.1 checkpoint
loading, strict projection/decoder compatibility against published weights, or
full/tiny/tiny-long model inference. Do not promote setup checks into an
end-to-end inference claim.