> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-zh/shi-pin-sheng-cheng/skyreels.md).

# SkyReels-V3

在 Clore.ai GPU 上使用 SkyReels-V3 生成 24fps 视频，它是昆仑基于 Wan2.1 的开源视频模型。

SkyReels-V3 是昆仑（SkyWork AI）推出的开源视频生成模型，基于 Wan2.1 视频架构构建。它支持文本生成视频（T2V）和图像生成视频（I2V），可生成平滑的 24 fps 片段。该模型继承了 Wan2.1 强大的运动连贯性和时间一致性，同时加入了 SkyWork 的训练优化，以提升视觉质量和提示词遵循能力。

在以下平台运行 SkyReels-V3 [Clore.ai](https://clore.ai/) 即可在无需购买硬件的情况下访问它所需的 24 GB VRAM——花几美元租一张 RTX 4090，就可以开始生成。

## 主要特性

* **24 fps 输出** ——开箱即用即可获得平滑、广播级的帧率。
* **文生视频** ——可根据自然语言描述生成片段，且具备很强的提示词遵循能力。
* **图像转视频** ——可让参考图像动起来，并可控地调整镜头运动和主体运动。
* **基于 Wan2.1 构建** ——继承了 Wan 架构经过验证的时间注意力和运动建模能力。
* **多分辨率** ——根据显存预算，支持 480p 和 720p 生成。
* **开源权重** ——在开放许可证下提供，可用于研究和商业用途。
* **中文 + 英文** ——来自 Wan2.1 文本编码器的双语提示支持。

## 需求

| 组件     | 最低               | 推荐    |
| ------ | ---------------- | ----- |
| GPU 显存 | 16 GB（带卸载的 480p） | 24 GB |
| 系统内存   | 32 GB            | 64 GB |
| 磁盘     | 25 GB            | 50 GB |
| Python | 3.10+            | 3.11  |
| CUDA   | 12.8+            | 12.8+ |

**Clore.ai GPU 推荐：** 一台 **RTX 4090** （24 GB，$0.14–0.42/小时）是最佳平衡点——有足够的 VRAM 以全精度生成 720p。一个 **RTX 3090** （24 GB，$0.07–0.21/小时）适用于 480p，并提供市场上最佳的单片性价比。

## 快速开始

```bash
# 安装核心依赖
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
pip install diffusers transformers accelerate sentencepiece
pip install imageio[ffmpeg]

# 验证 GPU
python -c "import torch; print(torch.cuda.get_device_name(0))"
```

## 使用示例

### 文生视频

```python
import torch
from diffusers import WanPipeline
from diffusers.utils import export_to_video

# SkyReels-V3 使用 Wan2.1 管线架构
pipe = WanPipeline.from_pretrained(
    "SkyworkAI/SkyReels-V3-T2V",
    torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
pipe.enable_model_cpu_offload()

prompt = (
    "一名武士在晨雾中的竹林里行走，"
    "阳光穿过高耸的竹竿洒下，电影感构图，"
    "缓慢而克制的动作"
)

video_frames = pipe(
    prompt=prompt,
    negative_prompt="模糊，低质量，水印，静态",
    num_frames=97,               # 约 24 fps 下 4 秒
    width=1280,
    height=720,
    num_inference_steps=30,
    guidance_scale=5.0,
    generator=torch.Generator("cuda").manual_seed(42),
).frames[0]

export_to_video(video_frames, "samurai_forest.mp4", fps=24)
print("已保存 samurai_forest.mp4")
```

### 图像转视频

```python
import torch
from PIL import Image
from diffusers import WanImageToVideoPipeline
from diffusers.utils import export_to_video

pipe = WanImageToVideoPipeline.from_pretrained(
    "SkyworkAI/SkyReels-V3-I2V",
    torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
pipe.enable_model_cpu_offload()

image = Image.open("landscape.png").resize((1280, 720))

video_frames = pipe(
    prompt="镜头缓慢向前推进进入场景，云朵从头顶飘过",
    image=image,
    negative_prompt="静态，抖动，模糊",
    num_frames=97,
    num_inference_steps=30,
    guidance_scale=5.0,
).frames[0]

export_to_video(video_frames, "landscape_anim.mp4", fps=24)
```

### 低分辨率快速预览

```python
import torch
from diffusers import WanPipeline
from diffusers.utils import export_to_video

pipe = WanPipeline.from_pretrained(
    "SkyworkAI/SkyReels-V3-T2V", torch_dtype=torch.bfloat16
).to("cuda")

# 480p 便于快速迭代
frames = pipe(
    prompt="海浪拍击岩石，飞溅壮观，日落",
    num_frames=49,
    width=854,
    height=480,
    num_inference_steps=20,
    guidance_scale=5.0,
).frames[0]

export_to_video(frames, "waves_preview.mp4", fps=24)
```

## 给 Clore.ai 用户的建议

1. **使用 Wan 管线类** —— SkyReels-V3 在架构上基于 Wan2.1，因此它使用 `WanPipeline` / `WanImageToVideoPipeline` 来自 diffusers。
2. **从 480p 开始** ——先在较低分辨率下迭代提示词，然后在对构图满意后再以 720p 生成最终片段。
3. **CPU 卸载** — `enable_model_cpu_offload()` 建议在 24 GB 显卡上用于 720p 生成，以避免 OOM。
4. **持久化存储** ——将 `HF_HOME=/workspace/hf_cache` 在 Clore.ai 持久卷上；模型大小约为 15–20 GB。
5. **原生 24 fps** ——不要更改导出 fps；模型的时间注意力是按 24 fps 输出训练的。
6. **双语提示词** ——Wan2.1 文本编码器同时支持英文和中文；如有需要，可以混合使用语言。
7. **引导系数** ——4.0–6.0 效果最佳。更高的值（>8）可能导致过饱和。
8. **tmux 是必需的** ——始终在一个 `tmux` Clore.ai 会话中运行生成，以防 SSH 断开。

## 故障排查

| 问题                          | 修复                                                                                  |
| --------------------------- | ----------------------------------------------------------------------------------- |
| `OutOfMemoryError` 在 720p 下 | 启用 `pipe.enable_model_cpu_offload()`；如果仍然 OOM，则降低到 480p                             |
| 在 HuggingFace 上找不到模型        | 请在以下位置检查确切的仓库名称： [SkyworkAI 的 HF 页面](https://huggingface.co/SkyworkAI) ——它可能以变体名称列出 |
| 抖动或闪烁的运动                    | 增大 `推理步数` 调到 40；将其降低 `guidance_scale` 到 4.0                                         |
| 生成缓慢                        | 在 RTX 4090 上，每个 4 秒片段约需 1–3 分钟，属于正常范围；480p 大约快 2 倍                                  |
| 颜色偏移 / 过饱和                  | 将 `guidance_scale` 到 4.0–5.0                                                        |
| `导入错误：imageio`              | `pip install imageio[ffmpeg]`                                                       |
| 重启后重新下载权重                   | 挂载持久存储并设置 `HF_HOME` 环境变量                                                            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-zh/shi-pin-sheng-cheng/skyreels.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
