Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f261486ffe | ||
|
|
15ec1576b2 | ||
|
|
8a6e3b410d | ||
|
|
abc67b7a1e | ||
|
|
6ad5a694be | ||
|
|
10478729cd | ||
|
|
ad83593912 | ||
|
|
eebcf26843 | ||
|
|
a0eb3971fe | ||
|
|
be8f0e08cc |
@@ -31,7 +31,6 @@ EasyAnimate is a pipeline based on the transformer architecture, designed for ge
|
|||||||
We will support quick pull-ups from different platforms, refer to [Quick Start](#quick-start).
|
We will support quick pull-ups from different platforms, refer to [Quick Start](#quick-start).
|
||||||
|
|
||||||
**New Features:**
|
**New Features:**
|
||||||
- EasyAnimate-V5.1 is now supported in diffusers. For more implementation details, please refer to the [PR](https://github.com/huggingface/diffusers/pull/10626). Relevant weights can be downloaded from [EasyAnimate-V5.1-diffusers](https://huggingface.co/collections/alibaba-pai/easyanimate-v51-diffusers-67c81d1d19b236e056675cce). For usage instructions, please refer to [Usage](https://huggingface.co/alibaba-pai/EasyAnimateV5.1-7b-zh-diffusers#a%E3%80%81text-to-video). [ 2025.03.06 ]
|
|
||||||
- **Updated to version v5.1**, the Qwen2 VL is used as the text encoder, and Flow is used as the sampling method. It supports bilingual prediction in both Chinese and English. In addition to common controls such as Canny and Pose, it also supports trajectory control, camera control. [2025.01.21]
|
- **Updated to version v5.1**, the Qwen2 VL is used as the text encoder, and Flow is used as the sampling method. It supports bilingual prediction in both Chinese and English. In addition to common controls such as Canny and Pose, it also supports trajectory control, camera control. [2025.01.21]
|
||||||
- Use reward backpropagation to train Lora and optimize the video, aligning it better with human preferences, detailes in [here](scripts/README_TRAIN_REWARD.md). EasyAnimateV5-7b is released now. [2024.11.27]
|
- Use reward backpropagation to train Lora and optimize the video, aligning it better with human preferences, detailes in [here](scripts/README_TRAIN_REWARD.md). EasyAnimateV5-7b is released now. [2024.11.27]
|
||||||
- **Updated to v5**, supporting video generation up to 1024x1024, 49 frames, 6s, 8fps, with expanded model scale to 12B, incorporating the MMDIT structure, and enabling control models with diverse inputs; supports bilingual predictions in Chinese and English. [2024.11.08]
|
- **Updated to v5**, supporting video generation up to 1024x1024, 49 frames, 6s, 8fps, with expanded model scale to 12B, incorporating the MMDIT structure, and enabling control models with diverse inputs; supports bilingual predictions in Chinese and English. [2024.11.08]
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ EasyAnimateは、トランスフォーマーアーキテクチャに基づいた
|
|||||||
異なるプラットフォームからのクイックプルアップをサポートします。詳細は[クイックスタート](#クイックスタート)を参照してください。
|
異なるプラットフォームからのクイックプルアップをサポートします。詳細は[クイックスタート](#クイックスタート)を参照してください。
|
||||||
|
|
||||||
**新機能:**
|
**新機能:**
|
||||||
- EasyAnimate-V5.1は現在diffusersでサポートされています。実装の詳細については、[PR](https://github.com/huggingface/diffusers/pull/10626)をご覧ください。関連する重みは[EasyAnimate-V5.1-diffusers](https://huggingface.co/collections/alibaba-pai/easyanimate-v51-diffusers-67c81d1d19b236e056675cce)からダウンロードできます。使用方法については、[Usage](https://huggingface.co/alibaba-pai/EasyAnimateV5.1-7b-zh-diffusers#a%E3%80%81text-to-video)を参照してください。 [ 2025.03.06 ]
|
|
||||||
- **バージョンv5.1に更新**、Qwen2 VLがテキストエンコーダーとして使用され、Flowがサンプリング方法として使用されます。中国語と英語の両方でバイリンガル予測をサポートしています。CannyやPoseといった一般的なコントロールに加えて、軌道制御やカメラ制御もサポートしています。[2025.01.21]
|
- **バージョンv5.1に更新**、Qwen2 VLがテキストエンコーダーとして使用され、Flowがサンプリング方法として使用されます。中国語と英語の両方でバイリンガル予測をサポートしています。CannyやPoseといった一般的なコントロールに加えて、軌道制御やカメラ制御もサポートしています。[2025.01.21]
|
||||||
- インセンティブ逆伝播を使用してLoraを訓練し、人間の好みに合うようにビデオを最適化します。詳細は、[ここ](scripts/README _ train _ REVARD.md)を参照してください。EasyAnimateV 5-7 bがリリースされました。[2024.11.27]
|
- インセンティブ逆伝播を使用してLoraを訓練し、人間の好みに合うようにビデオを最適化します。詳細は、[ここ](scripts/README _ train _ REVARD.md)を参照してください。EasyAnimateV 5-7 bがリリースされました。[2024.11.27]
|
||||||
- **v5に更新**、1024x1024までの動画生成をサポート、49フレーム、6秒、8fps、モデルスケールを12Bに拡張、MMDIT構造を組み込み、さまざまな入力を持つ制御モデルをサポート。中国語と英語のバイリンガル予測をサポート。[2024.11.08]
|
- **v5に更新**、1024x1024までの動画生成をサポート、49フレーム、6秒、8fps、モデルスケールを12Bに拡張、MMDIT構造を組み込み、さまざまな入力を持つ制御モデルをサポート。中国語と英語のバイリンガル予測をサポート。[2024.11.08]
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ EasyAnimate是一个基于transformer结构的pipeline,可用于生成AI图片
|
|||||||
我们会逐渐支持从不同平台快速启动,请参阅 [快速启动](#快速启动)。
|
我们会逐渐支持从不同平台快速启动,请参阅 [快速启动](#快速启动)。
|
||||||
|
|
||||||
新特性:
|
新特性:
|
||||||
- EasyAnimate-V5.1现已在diffusers中得到支持,更多实现细节请参考[PR](https://github.com/huggingface/diffusers/pull/10626),相关权重可以在[EasyAnimate-V5.1-diffusers](https://huggingface.co/collections/alibaba-pai/easyanimate-v51-diffusers-67c81d1d19b236e056675cce)下载,使用方案请参考[Usage](https://huggingface.co/alibaba-pai/EasyAnimateV5.1-7b-zh-diffusers#a%E3%80%81text-to-video)。 [ 2025.03.06 ]
|
|
||||||
- 更新到v5.1版本,应用Qwen2 VL作为文本编码器,支持多语言预测,使用Flow作为采样方式,除去常见控制如Canny、Pose外,还支持轨迹控制,相机控制等。[ 2025.01.21 ]
|
- 更新到v5.1版本,应用Qwen2 VL作为文本编码器,支持多语言预测,使用Flow作为采样方式,除去常见控制如Canny、Pose外,还支持轨迹控制,相机控制等。[ 2025.01.21 ]
|
||||||
- 使用奖励反向传播来训练Lora并优化视频,使其更好地符合人类偏好,详细信息请参见[此处](scripts/README_train_REVARD.md)。EasyAnimateV5-7b现已发布。[ 2024.11.27 ]
|
- 使用奖励反向传播来训练Lora并优化视频,使其更好地符合人类偏好,详细信息请参见[此处](scripts/README_train_REVARD.md)。EasyAnimateV5-7b现已发布。[ 2024.11.27 ]
|
||||||
- 更新到v5版本,最大支持1024x1024,49帧, 6s, 8fps视频生成,拓展模型规模到12B,应用MMDIT结构,支持不同输入的控制模型,支持中文与英文双语预测。[ 2024.11.08 ]
|
- 更新到v5版本,最大支持1024x1024,49帧, 6s, 8fps视频生成,拓展模型规模到12B,应用MMDIT结构,支持不同输入的控制模型,支持中文与英文双语预测。[ 2024.11.08 ]
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.030612245 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.061224490 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.091836735 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.122448980 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.153061224 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.183673469 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.214285714 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.244897959 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.275510204 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.306122449 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.336734694 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.367346939 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.397959184 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.428571429 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.459183673 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.489795918 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.520408163 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.551020408 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.581632653 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.612244898 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.642857143 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.673469388 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.704081633 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.734693878 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.765306122 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.795918367 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.826530612 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.857142857 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.887755102 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.918367347 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.948979592 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -0.979591837 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.010204082 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.040816327 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.071428571 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.102040816 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.132653061 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.163265306 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.193877551 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.224489796 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.255102041 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.285714286 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.316326531 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.346938776 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.377551020 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.408163265 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.438775510 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 -1.469387755 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.030612245 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.061224490 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.091836735 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.122448980 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.153061224 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.183673469 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.214285714 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.244897959 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.275510204 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.306122449 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.336734694 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.367346939 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.397959184 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.428571429 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.459183673 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.489795918 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.520408163 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.551020408 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.581632653 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.612244898 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.642857143 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.673469388 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.704081633 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.734693878 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.765306122 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.795918367 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.826530612 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.857142857 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.887755102 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.918367347 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.948979592 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.979591837 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.010204082 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.040816327 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.071428571 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.102040816 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.132653061 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.163265306 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.193877551 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.224489796 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.255102041 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.285714286 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.316326531 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.346938776 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.377551020 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.408163265 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.438775510 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 1.469387755 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.030612245 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.061224490 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.091836735 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.122448980 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.153061224 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.183673469 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.214285714 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.244897959 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.275510204 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.306122449 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.336734694 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.367346939 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.397959184 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.428571429 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.459183673 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.489795918 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.520408163 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.551020408 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.581632653 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.612244898 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.642857143 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.673469388 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.704081633 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.734693878 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.765306122 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.795918367 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.826530612 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.857142857 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.887755102 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.918367347 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.948979592 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -0.979591837 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.010204082 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.040816327 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.071428571 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.102040816 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.132653061 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.163265306 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.193877551 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.224489796 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.255102041 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.285714286 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.316326531 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.346938776 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.377551020 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.408163265 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.438775510 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 -1.469387755 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.030612245 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.061224490 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.091836735 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.122448980 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.153061224 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.183673469 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.214285714 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.244897959 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.275510204 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.306122449 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.336734694 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.367346939 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.397959184 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.428571429 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.459183673 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.489795918 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.520408163 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.551020408 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.581632653 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.612244898 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.642857143 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.673469388 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.704081633 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.734693878 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.765306122 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.795918367 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.826530612 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.857142857 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.887755102 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.918367347 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.948979592 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 0.979591837 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.010204082 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.040816327 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.071428571 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.102040816 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.132653061 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.163265306 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.193877551 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.224489796 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.255102041 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.285714286 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.316326531 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.346938776 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.377551020 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.408163265 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.438775510 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
0 0.532139961 0.946026558 0.500000000 0.500000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 0.000000000 0.000000000 1.000000000 0.000000000 1.469387755 0.000000000 0.000000000 1.000000000 0.000000000
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Executable → Regular
-20
@@ -185,8 +185,6 @@ class AutoencoderKLMagvit(ModelMixin, ConfigMixin, FromOriginalVAEMixin):
|
|||||||
self.slice_compression_vae = slice_compression_vae
|
self.slice_compression_vae = slice_compression_vae
|
||||||
self.cache_compression_vae = cache_compression_vae
|
self.cache_compression_vae = cache_compression_vae
|
||||||
self.cache_mag_vae = cache_mag_vae
|
self.cache_mag_vae = cache_mag_vae
|
||||||
self.cache_compression_vae_copy = cache_compression_vae
|
|
||||||
self.cache_mag_vae_copy = cache_mag_vae
|
|
||||||
self.mini_batch_encoder = mini_batch_encoder
|
self.mini_batch_encoder = mini_batch_encoder
|
||||||
self.mini_batch_decoder = mini_batch_decoder
|
self.mini_batch_decoder = mini_batch_decoder
|
||||||
self.use_slicing = False
|
self.use_slicing = False
|
||||||
@@ -199,24 +197,6 @@ class AutoencoderKLMagvit(ModelMixin, ConfigMixin, FromOriginalVAEMixin):
|
|||||||
self.tile_latent_min_size = int(self.tile_sample_min_size / (2 ** (len(ch_mult) - 1)))
|
self.tile_latent_min_size = int(self.tile_sample_min_size / (2 ** (len(ch_mult) - 1)))
|
||||||
self.scaling_factor = scaling_factor
|
self.scaling_factor = scaling_factor
|
||||||
|
|
||||||
def disable_cache_in_vae(self):
|
|
||||||
self.cache_compression_vae = False
|
|
||||||
self.encoder.cache_compression_vae = False
|
|
||||||
self.decoder.cache_compression_vae = False
|
|
||||||
|
|
||||||
self.cache_mag_vae = False
|
|
||||||
self.encoder.cache_mag_vae = False
|
|
||||||
self.decoder.cache_mag_vae = False
|
|
||||||
|
|
||||||
def enable_cache_in_vae(self):
|
|
||||||
self.cache_compression_vae = self.cache_compression_vae_copy
|
|
||||||
self.encoder.cache_compression_vae = self.cache_compression_vae_copy
|
|
||||||
self.decoder.cache_compression_vae = self.cache_compression_vae_copy
|
|
||||||
|
|
||||||
self.cache_mag_vae = self.cache_mag_vae_copy
|
|
||||||
self.encoder.cache_mag_vae = self.cache_mag_vae_copy
|
|
||||||
self.decoder.cache_mag_vae = self.cache_mag_vae_copy
|
|
||||||
|
|
||||||
def _set_gradient_checkpointing(self, module, value=False):
|
def _set_gradient_checkpointing(self, module, value=False):
|
||||||
if isinstance(module, (omnigen_Mag_Encoder, omnigen_Mag_Decoder)):
|
if isinstance(module, (omnigen_Mag_Encoder, omnigen_Mag_Decoder)):
|
||||||
module.gradient_checkpointing = value
|
module.gradient_checkpointing = value
|
||||||
|
|||||||
@@ -1,38 +1,30 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from natsort import natsorted
|
from natsort import natsorted
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
from .logger import logger
|
from .logger import logger
|
||||||
|
|
||||||
ALL_VIDEO_EXT = set(["mp4", "webm", "mkv", "avi", "flv", "mov", "rmvb"])
|
ALL_VIDEO_EXT = set(["mp4", "webm", "mkv", "avi", "flv", "mov", "rmvb"])
|
||||||
ALL_IMGAE_EXT = set(["png", "webp", "jpg", "jpeg", "bmp", "gif"])
|
ALL_IMGAE_EXT = set(["png", "webp", "jpg", "jpeg", "bmp", "gif"])
|
||||||
|
|
||||||
|
def parallel_rglob(root_path, pattern, max_workers=8):
|
||||||
|
root = Path(root_path)
|
||||||
|
futures = []
|
||||||
|
results = []
|
||||||
|
with ThreadPoolExecutor(max_workers=max_workers) as executor:
|
||||||
|
for sub_path in root.iterdir():
|
||||||
|
if sub_path.is_dir():
|
||||||
|
futures.append(executor.submit(lambda p=sub_path: list(p.rglob(pattern))))
|
||||||
|
for future in as_completed(futures):
|
||||||
|
results.extend(future.result())
|
||||||
|
results.extend(root.glob(pattern))
|
||||||
|
|
||||||
def get_relative_file_paths(directory, recursive=False, ext_set=None):
|
return results
|
||||||
"""Get the relative paths of subfiles (recursively) in the directory that match the extension set.
|
|
||||||
"""
|
|
||||||
if not recursive:
|
|
||||||
for entry in os.scandir(directory):
|
|
||||||
if entry.is_file():
|
|
||||||
file_name = entry.name
|
|
||||||
if ext_set is not None:
|
|
||||||
ext = os.path.splitext(file_name)[1][1:].lower()
|
|
||||||
if ext in ext_set:
|
|
||||||
yield file_name
|
|
||||||
else:
|
|
||||||
yield file_name
|
|
||||||
else:
|
|
||||||
for root, _, files in os.walk(directory):
|
|
||||||
for file in files:
|
|
||||||
relative_path = os.path.relpath(os.path.join(root, file), directory)
|
|
||||||
if ext_set is not None:
|
|
||||||
ext = os.path.splitext(file)[1][1:].lower()
|
|
||||||
if ext in ext_set:
|
|
||||||
yield relative_path
|
|
||||||
else:
|
|
||||||
yield relative_path
|
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
@@ -72,12 +64,24 @@ def main():
|
|||||||
|
|
||||||
# Use the path name instead of the file name as video_path/image_path (unique ID).
|
# Use the path name instead of the file name as video_path/image_path (unique ID).
|
||||||
if args.video_folder is not None:
|
if args.video_folder is not None:
|
||||||
video_path_list = list(get_relative_file_paths(args.video_folder, recursive=args.recursive, ext_set=ALL_VIDEO_EXT))
|
video_path_list = []
|
||||||
|
video_folder = Path(args.video_folder)
|
||||||
|
for ext in tqdm(list(ALL_VIDEO_EXT)):
|
||||||
|
if args.recursive:
|
||||||
|
video_path_list += [str(file.relative_to(video_folder)) for file in parallel_rglob(video_folder, f"*.{ext}")]
|
||||||
|
else:
|
||||||
|
video_path_list += [str(file.relative_to(video_folder)) for file in video_folder.glob(f"*.{ext}")]
|
||||||
video_path_list = natsorted(video_path_list)
|
video_path_list = natsorted(video_path_list)
|
||||||
meta_file_df = pd.DataFrame({args.video_path_column: video_path_list})
|
meta_file_df = pd.DataFrame({args.video_path_column: video_path_list})
|
||||||
|
|
||||||
if args.image_folder is not None:
|
if args.image_folder is not None:
|
||||||
image_path_list = list(get_relative_file_paths(args.image_folder, recursive=args.recursive, ext_set=ALL_IMGAE_EXT))
|
image_path_list = []
|
||||||
|
image_folder = Path(args.image_folder)
|
||||||
|
for ext in tqdm(list(ALL_IMGAE_EXT)):
|
||||||
|
if args.recursive:
|
||||||
|
image_path_list += [str(file.relative_to(image_folder)) for file in parallel_rglob(video_folder, f"*.{ext}")]
|
||||||
|
else:
|
||||||
|
image_path_list += [str(file.relative_to(image_folder)) for file in image_folder.glob(f"*.{ext}")]
|
||||||
image_path_list = natsorted(image_path_list)
|
image_path_list = natsorted(image_path_list)
|
||||||
meta_file_df = pd.DataFrame({args.image_path_column: image_path_list})
|
meta_file_df = pd.DataFrame({args.image_path_column: image_path_list})
|
||||||
|
|
||||||
|
|||||||
+2
-6
@@ -68,12 +68,8 @@ fps = 8
|
|||||||
# Use torch.float16 if GPU does not support torch.bfloat16
|
# Use torch.float16 if GPU does not support torch.bfloat16
|
||||||
# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16
|
# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16
|
||||||
weight_dtype = torch.bfloat16
|
weight_dtype = torch.bfloat16
|
||||||
# If you are preparing to redraw the reference video, set validation_video and validation_video_mask.
|
# If you want to generate from text, please set the validation_image_start = None and validation_image_end = None
|
||||||
# If you do not use validation_video_mask, the entire video will be redrawn;
|
|
||||||
# if you use validation_video_mask, as shown in asset/mask.jpg, only a portion of the video will be redrawn.
|
|
||||||
# Please set a larger denoise_strength when using validation_video_mask, such as 1.00 instead of 0.70
|
|
||||||
validation_video = "asset/1.mp4"
|
validation_video = "asset/1.mp4"
|
||||||
validation_video_mask = None
|
|
||||||
denoise_strength = 0.70
|
denoise_strength = 0.70
|
||||||
|
|
||||||
# 使用更长的neg prompt如"模糊,突变,变形,失真,画面暗,文本字幕,画面固定,连环画,漫画,线稿,没有主体。",可以增加稳定性
|
# 使用更长的neg prompt如"模糊,突变,变形,失真,画面暗,文本字幕,画面固定,连环画,漫画,线稿,没有主体。",可以增加稳定性
|
||||||
@@ -277,7 +273,7 @@ if vae.cache_mag_vae:
|
|||||||
video_length = int((video_length - 1) // vae.mini_batch_encoder * vae.mini_batch_encoder) + 1 if video_length != 1 else 1
|
video_length = int((video_length - 1) // vae.mini_batch_encoder * vae.mini_batch_encoder) + 1 if video_length != 1 else 1
|
||||||
else:
|
else:
|
||||||
video_length = int(video_length // vae.mini_batch_encoder * vae.mini_batch_encoder) if video_length != 1 else 1
|
video_length = int(video_length // vae.mini_batch_encoder * vae.mini_batch_encoder) if video_length != 1 else 1
|
||||||
input_video, input_video_mask, clip_image = get_video_to_video_latent(validation_video, video_length=video_length, fps=fps, validation_video_mask=validation_video_mask, sample_size=sample_size)
|
input_video, input_video_mask, clip_image = get_video_to_video_latent(validation_video, video_length=video_length, fps=fps, sample_size=sample_size)
|
||||||
|
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
sample = pipeline(
|
sample = pipeline(
|
||||||
|
|||||||
Executable → Regular
+178
-185
@@ -1148,10 +1148,8 @@ def main():
|
|||||||
if args.vae_gradient_checkpointing:
|
if args.vae_gradient_checkpointing:
|
||||||
# Since 3D casual VAE need a cache to decode all latents autoregressively, .Thus, gradient checkpointing can only be
|
# Since 3D casual VAE need a cache to decode all latents autoregressively, .Thus, gradient checkpointing can only be
|
||||||
# enabled when decoding the first batch (i.e. the first three) of latents, in which case the cache is not being used.
|
# enabled when decoding the first batch (i.e. the first three) of latents, in which case the cache is not being used.
|
||||||
|
if args.num_decoded_latents > 3:
|
||||||
# num_decoded_latents > 3 is support in EasyAnimate now.
|
raise ValueError("The vae_gradient_checkpointing is not supported for num_decoded_latents > 3.")
|
||||||
# if args.num_decoded_latents > 3:
|
|
||||||
# raise ValueError("The vae_gradient_checkpointing is not supported for num_decoded_latents > 3.")
|
|
||||||
vae.enable_gradient_checkpointing()
|
vae.enable_gradient_checkpointing()
|
||||||
|
|
||||||
# Enable TF32 for faster training on Ampere GPUs,
|
# Enable TF32 for faster training on Ampere GPUs,
|
||||||
@@ -1416,196 +1414,193 @@ def main():
|
|||||||
]
|
]
|
||||||
|
|
||||||
with accelerator.accumulate(transformer3d):
|
with accelerator.accumulate(transformer3d):
|
||||||
latents = torch.randn(*latent_shape, device=accelerator.device, dtype=weight_dtype)
|
with accelerator.autocast():
|
||||||
|
latents = torch.randn(*latent_shape, device=accelerator.device, dtype=weight_dtype)
|
||||||
|
|
||||||
if hasattr(noise_scheduler, "init_noise_sigma"):
|
if hasattr(noise_scheduler, "init_noise_sigma"):
|
||||||
latents = latents * noise_scheduler.init_noise_sigma
|
latents = latents * noise_scheduler.init_noise_sigma
|
||||||
if hasattr(vae, "enable_cache_in_vae"):
|
|
||||||
vae.enable_cache_in_vae()
|
|
||||||
|
|
||||||
# Prepare inpaint latents if it needs.
|
# Prepare inpaint latents if it needs.
|
||||||
# Use zero latents if we want to t2v.
|
# Use zero latents if we want to t2v.
|
||||||
mask_latents = torch.zeros_like(latents)[:, :1].to(latents.device, latents.dtype)
|
mask_latents = torch.zeros_like(latents)[:, :1].to(latents.device, latents.dtype)
|
||||||
masked_video_latents = torch.zeros_like(latents).to(latents.device, latents.dtype)
|
masked_video_latents = torch.zeros_like(latents).to(latents.device, latents.dtype)
|
||||||
|
|
||||||
mask_input = torch.cat([mask_latents] * 2) if do_classifier_free_guidance else mask_latents
|
mask_input = torch.cat([mask_latents] * 2) if do_classifier_free_guidance else mask_latents
|
||||||
masked_video_latents_input = (
|
masked_video_latents_input = (
|
||||||
torch.cat([masked_video_latents] * 2) if do_classifier_free_guidance else masked_video_latents
|
torch.cat([masked_video_latents] * 2) if do_classifier_free_guidance else masked_video_latents
|
||||||
)
|
)
|
||||||
inpaint_latents = torch.cat([mask_input, masked_video_latents_input], dim=1).to(latents.dtype)
|
inpaint_latents = torch.cat([mask_input, masked_video_latents_input], dim=1).to(latents.dtype)
|
||||||
|
|
||||||
# Check that sizes of mask, masked image and latents match
|
# Check that sizes of mask, masked image and latents match
|
||||||
if num_channels_transformer != num_channels_latents:
|
if num_channels_transformer != num_channels_latents:
|
||||||
num_channels_mask = mask_latents.shape[1]
|
num_channels_mask = mask_latents.shape[1]
|
||||||
num_channels_masked_image = masked_video_latents.shape[1]
|
num_channels_masked_image = masked_video_latents.shape[1]
|
||||||
if num_channels_latents + num_channels_mask + num_channels_masked_image != transformer3d.config.in_channels:
|
if num_channels_latents + num_channels_mask + num_channels_masked_image != transformer3d.config.in_channels:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Incorrect configuration settings! The config of `pipeline.transformer`: {transformer3d.config} expects"
|
f"Incorrect configuration settings! The config of `pipeline.transformer`: {transformer3d.config} expects"
|
||||||
f" {transformer3d.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
|
f" {transformer3d.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
|
||||||
f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
|
f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
|
||||||
f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
|
f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
|
||||||
" `pipeline.transformer` or your `mask_image` or `image` input."
|
" `pipeline.transformer` or your `mask_image` or `image` input."
|
||||||
|
)
|
||||||
|
|
||||||
|
generator = torch.Generator(device=accelerator.device).manual_seed(args.seed)
|
||||||
|
# Prepare extra step kwargs.
|
||||||
|
extra_step_kwargs = prepare_extra_step_kwargs(noise_scheduler, generator, args.eta)
|
||||||
|
|
||||||
|
# Create image_rotary_emb, style embedding & time ids
|
||||||
|
grid_height = height // 8 // transformer3d.config.patch_size
|
||||||
|
grid_width = width // 8 // transformer3d.config.patch_size
|
||||||
|
base_size_width = 720 // 8 // transformer3d.config.patch_size
|
||||||
|
base_size_height = 480 // 8 // transformer3d.config.patch_size
|
||||||
|
grid_crops_coords = get_resize_crop_region_for_grid(
|
||||||
|
(grid_height, grid_width), base_size_width, base_size_height
|
||||||
|
)
|
||||||
|
image_rotary_emb = get_3d_rotary_pos_embed(
|
||||||
|
transformer3d.config.attention_head_dim, grid_crops_coords, grid_size=(grid_height, grid_width),
|
||||||
|
temporal_size=latents.size(2), use_real=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get other hunyuan params
|
||||||
|
style = torch.tensor([0], device=accelerator.device)
|
||||||
|
|
||||||
|
original_size = (1024, 1024)
|
||||||
|
crops_coords_top_left = (0, 0)
|
||||||
|
target_size = (height, width)
|
||||||
|
add_time_ids = list(original_size + target_size + crops_coords_top_left)
|
||||||
|
add_time_ids = torch.tensor([add_time_ids], dtype=prompt_embeds.dtype)
|
||||||
|
|
||||||
|
if do_classifier_free_guidance:
|
||||||
|
prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds])
|
||||||
|
prompt_attention_mask = torch.cat([negative_prompt_attention_mask, prompt_attention_mask])
|
||||||
|
if prompt_embeds_2 is not None:
|
||||||
|
prompt_embeds_2 = torch.cat([negative_prompt_embeds_2, prompt_embeds_2])
|
||||||
|
prompt_attention_mask_2 = torch.cat([negative_prompt_attention_mask_2, prompt_attention_mask_2])
|
||||||
|
add_time_ids = torch.cat([add_time_ids] * 2, dim=0)
|
||||||
|
style = torch.cat([style] * 2, dim=0)
|
||||||
|
|
||||||
|
prompt_embeds = prompt_embeds.to(device=accelerator.device)
|
||||||
|
prompt_attention_mask = prompt_attention_mask.to(device=accelerator.device)
|
||||||
|
if prompt_embeds_2 is not None:
|
||||||
|
prompt_embeds_2 = prompt_embeds_2.to(device=accelerator.device)
|
||||||
|
prompt_attention_mask_2 = prompt_attention_mask_2.to(device=accelerator.device)
|
||||||
|
add_time_ids = add_time_ids.to(dtype=prompt_embeds.dtype, device=accelerator.device).repeat(
|
||||||
|
args.train_batch_size, 1
|
||||||
|
)
|
||||||
|
style = style.to(device=accelerator.device).repeat(args.train_batch_size)
|
||||||
|
|
||||||
|
# Denoising loop
|
||||||
|
if args.backprop:
|
||||||
|
if args.backprop_step_list is None:
|
||||||
|
if args.backprop_strategy == "last":
|
||||||
|
backprop_step_list = [args.num_inference_steps - 1]
|
||||||
|
elif args.backprop_strategy == "tail":
|
||||||
|
backprop_step_list = list(range(args.num_inference_steps))[-args.backprop_num_steps:]
|
||||||
|
elif args.backprop_strategy == "uniform":
|
||||||
|
interval = args.num_inference_steps // args.backprop_num_steps
|
||||||
|
random_start = random.randint(0, interval)
|
||||||
|
backprop_step_list = [random_start + i * interval for i in range(args.backprop_num_steps)]
|
||||||
|
elif args.backprop_strategy == "random":
|
||||||
|
backprop_step_list = random.sample(
|
||||||
|
range(args.backprop_random_start_step, args.backprop_random_end_step + 1), args.backprop_num_steps
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
raise ValueError(f"Invalid backprop strategy: {args.backprop_strategy}.")
|
||||||
|
else:
|
||||||
|
backprop_step_list = args.backprop_step_list
|
||||||
|
|
||||||
|
for i, t in enumerate(tqdm(timesteps)):
|
||||||
|
# expand the latents if we are doing classifier free guidance
|
||||||
|
latent_model_input = torch.cat([latents] * 2) if do_classifier_free_guidance else latents
|
||||||
|
if hasattr(noise_scheduler, "scale_model_input"):
|
||||||
|
latent_model_input = noise_scheduler.scale_model_input(latent_model_input, t)
|
||||||
|
|
||||||
|
# expand scalar t to 1-D tensor to match the 1st dim of latent_model_input
|
||||||
|
t_expand = torch.tensor([t] * latent_model_input.shape[0], device=accelerator.device).to(
|
||||||
|
dtype=latent_model_input.dtype
|
||||||
)
|
)
|
||||||
|
|
||||||
generator = torch.Generator(device=accelerator.device).manual_seed(args.seed)
|
# predict the noise residual
|
||||||
# Prepare extra step kwargs.
|
if args.stop_latent_model_input_gradient:
|
||||||
extra_step_kwargs = prepare_extra_step_kwargs(noise_scheduler, generator, args.eta)
|
# See https://arxiv.org/abs/2405.00760
|
||||||
|
latent_model_input = latent_model_input.detach()
|
||||||
|
noise_pred = transformer3d(
|
||||||
|
latent_model_input,
|
||||||
|
t_expand,
|
||||||
|
encoder_hidden_states=prompt_embeds,
|
||||||
|
text_embedding_mask=prompt_attention_mask,
|
||||||
|
encoder_hidden_states_t5=prompt_embeds_2,
|
||||||
|
text_embedding_mask_t5=prompt_attention_mask_2,
|
||||||
|
image_meta_size=add_time_ids,
|
||||||
|
style=style,
|
||||||
|
image_rotary_emb=image_rotary_emb,
|
||||||
|
inpaint_latents=inpaint_latents,
|
||||||
|
clip_encoder_hidden_states=None,
|
||||||
|
clip_attention_mask=None,
|
||||||
|
return_dict=False,
|
||||||
|
)[0]
|
||||||
|
|
||||||
# Create image_rotary_emb, style embedding & time ids
|
# Optimize the denoising results only for the specified steps.
|
||||||
grid_height = height // 8 // transformer3d.config.patch_size
|
if i in backprop_step_list:
|
||||||
grid_width = width // 8 // transformer3d.config.patch_size
|
noise_pred = noise_pred
|
||||||
base_size_width = 720 // 8 // transformer3d.config.patch_size
|
|
||||||
base_size_height = 480 // 8 // transformer3d.config.patch_size
|
|
||||||
grid_crops_coords = get_resize_crop_region_for_grid(
|
|
||||||
(grid_height, grid_width), base_size_width, base_size_height
|
|
||||||
)
|
|
||||||
image_rotary_emb = get_3d_rotary_pos_embed(
|
|
||||||
transformer3d.config.attention_head_dim, grid_crops_coords, grid_size=(grid_height, grid_width),
|
|
||||||
temporal_size=latents.size(2), use_real=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Get other hunyuan params
|
|
||||||
style = torch.tensor([0], device=accelerator.device)
|
|
||||||
|
|
||||||
original_size = (1024, 1024)
|
|
||||||
crops_coords_top_left = (0, 0)
|
|
||||||
target_size = (height, width)
|
|
||||||
add_time_ids = list(original_size + target_size + crops_coords_top_left)
|
|
||||||
add_time_ids = torch.tensor([add_time_ids], dtype=prompt_embeds.dtype)
|
|
||||||
|
|
||||||
if do_classifier_free_guidance:
|
|
||||||
prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds])
|
|
||||||
prompt_attention_mask = torch.cat([negative_prompt_attention_mask, prompt_attention_mask])
|
|
||||||
if prompt_embeds_2 is not None:
|
|
||||||
prompt_embeds_2 = torch.cat([negative_prompt_embeds_2, prompt_embeds_2])
|
|
||||||
prompt_attention_mask_2 = torch.cat([negative_prompt_attention_mask_2, prompt_attention_mask_2])
|
|
||||||
add_time_ids = torch.cat([add_time_ids] * 2, dim=0)
|
|
||||||
style = torch.cat([style] * 2, dim=0)
|
|
||||||
|
|
||||||
prompt_embeds = prompt_embeds.to(device=accelerator.device)
|
|
||||||
prompt_attention_mask = prompt_attention_mask.to(device=accelerator.device)
|
|
||||||
if prompt_embeds_2 is not None:
|
|
||||||
prompt_embeds_2 = prompt_embeds_2.to(device=accelerator.device)
|
|
||||||
prompt_attention_mask_2 = prompt_attention_mask_2.to(device=accelerator.device)
|
|
||||||
add_time_ids = add_time_ids.to(dtype=prompt_embeds.dtype, device=accelerator.device).repeat(
|
|
||||||
args.train_batch_size, 1
|
|
||||||
)
|
|
||||||
style = style.to(device=accelerator.device).repeat(args.train_batch_size)
|
|
||||||
|
|
||||||
# Denoising loop
|
|
||||||
if args.backprop:
|
|
||||||
if args.backprop_step_list is None:
|
|
||||||
if args.backprop_strategy == "last":
|
|
||||||
backprop_step_list = [args.num_inference_steps - 1]
|
|
||||||
elif args.backprop_strategy == "tail":
|
|
||||||
backprop_step_list = list(range(args.num_inference_steps))[-args.backprop_num_steps:]
|
|
||||||
elif args.backprop_strategy == "uniform":
|
|
||||||
interval = args.num_inference_steps // args.backprop_num_steps
|
|
||||||
random_start = random.randint(0, interval)
|
|
||||||
backprop_step_list = [random_start + i * interval for i in range(args.backprop_num_steps)]
|
|
||||||
elif args.backprop_strategy == "random":
|
|
||||||
backprop_step_list = random.sample(
|
|
||||||
range(args.backprop_random_start_step, args.backprop_random_end_step + 1), args.backprop_num_steps
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Invalid backprop strategy: {args.backprop_strategy}.")
|
noise_pred = noise_pred.detach()
|
||||||
else:
|
|
||||||
backprop_step_list = args.backprop_step_list
|
# perform guidance
|
||||||
|
if do_classifier_free_guidance:
|
||||||
for i, t in enumerate(tqdm(timesteps)):
|
noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
|
||||||
# expand the latents if we are doing classifier free guidance
|
noise_pred = noise_pred_uncond + args.guidance_scale * (noise_pred_text - noise_pred_uncond)
|
||||||
latent_model_input = torch.cat([latents] * 2) if do_classifier_free_guidance else latents
|
|
||||||
if hasattr(noise_scheduler, "scale_model_input"):
|
# compute the previous noisy sample x_t -> x_t-1
|
||||||
latent_model_input = noise_scheduler.scale_model_input(latent_model_input, t)
|
latents = noise_scheduler.step(noise_pred, t, latents, **extra_step_kwargs, return_dict=False)[0]
|
||||||
|
|
||||||
|
# decode latents (tensor)
|
||||||
|
# latents = latents.permute(0, 2, 1, 3, 4) # [B, C, T, H, W]
|
||||||
|
# Since the casual VAE decoding consumes a large amount of VRAM, and we need to keep the decoding
|
||||||
|
# operation within the computational graph. Thus, we only decode the first args.num_decoded_latents
|
||||||
|
# to calculate the reward.
|
||||||
|
# TODO: Decode all latents but keep a portion of the decoding operation within the computational graph.
|
||||||
|
sampled_latent_indices = list(range(args.num_decoded_latents))
|
||||||
|
sampled_latents = latents[:, :, sampled_latent_indices, :, :]
|
||||||
|
sampled_latents = 1 / vae.config.scaling_factor * sampled_latents
|
||||||
|
sampled_frames = vae.decode(sampled_latents)[0]
|
||||||
|
sampled_frames = sampled_frames.clamp(-1, 1)
|
||||||
|
sampled_frames = (sampled_frames / 2 + 0.5).clamp(0, 1) # [-1, 1] -> [0, 1]
|
||||||
|
|
||||||
|
if global_step % args.checkpointing_steps == 0:
|
||||||
|
saved_file = f"sample-{global_step}-{accelerator.process_index}.mp4"
|
||||||
|
save_videos_grid(
|
||||||
|
sampled_frames.to(torch.float32).detach().cpu(),
|
||||||
|
os.path.join(args.output_dir, "train_sample", saved_file),
|
||||||
|
fps=8
|
||||||
|
)
|
||||||
|
|
||||||
# expand scalar t to 1-D tensor to match the 1st dim of latent_model_input
|
if args.num_sampled_frames is not None:
|
||||||
t_expand = torch.tensor([t] * latent_model_input.shape[0], device=accelerator.device).to(
|
num_frames = sampled_frames.size(2) - 1
|
||||||
dtype=latent_model_input.dtype
|
sampled_frames_indices = torch.linspace(0, num_frames, steps=args.num_sampled_frames).long()
|
||||||
)
|
sampled_frames = sampled_frames[:, :, sampled_frames_indices, :, :]
|
||||||
|
# compute loss and reward
|
||||||
|
loss, reward = loss_fn(sampled_frames, train_prompt)
|
||||||
|
|
||||||
# predict the noise residual
|
# Gather the losses and rewards across all processes for logging (if we use distributed training).
|
||||||
if args.stop_latent_model_input_gradient:
|
avg_loss = accelerator.gather(loss.repeat(args.train_batch_size)).mean()
|
||||||
# See https://arxiv.org/abs/2405.00760
|
avg_reward = accelerator.gather(reward.repeat(args.train_batch_size)).mean()
|
||||||
latent_model_input = latent_model_input.detach()
|
train_loss += avg_loss.item() / args.gradient_accumulation_steps
|
||||||
noise_pred = transformer3d(
|
train_reward += avg_reward.item() / args.gradient_accumulation_steps
|
||||||
latent_model_input,
|
|
||||||
t_expand,
|
|
||||||
encoder_hidden_states=prompt_embeds,
|
|
||||||
text_embedding_mask=prompt_attention_mask,
|
|
||||||
encoder_hidden_states_t5=prompt_embeds_2,
|
|
||||||
text_embedding_mask_t5=prompt_attention_mask_2,
|
|
||||||
image_meta_size=add_time_ids,
|
|
||||||
style=style,
|
|
||||||
image_rotary_emb=image_rotary_emb,
|
|
||||||
inpaint_latents=inpaint_latents,
|
|
||||||
clip_encoder_hidden_states=None,
|
|
||||||
clip_attention_mask=None,
|
|
||||||
return_dict=False,
|
|
||||||
)[0]
|
|
||||||
|
|
||||||
# Optimize the denoising results only for the specified steps.
|
# Backpropagate
|
||||||
if i in backprop_step_list:
|
accelerator.backward(loss)
|
||||||
noise_pred = noise_pred
|
if accelerator.sync_gradients:
|
||||||
else:
|
total_norm = accelerator.clip_grad_norm_(trainable_params, args.max_grad_norm)
|
||||||
noise_pred = noise_pred.detach()
|
# If use_deepspeed, `total_norm` cannot be logged by accelerator.
|
||||||
|
if not args.use_deepspeed:
|
||||||
# perform guidance
|
accelerator.log({"total_norm": total_norm}, step=global_step)
|
||||||
if do_classifier_free_guidance:
|
else:
|
||||||
noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
|
if hasattr(optimizer, "optimizer") and hasattr(optimizer.optimizer, "_global_grad_norm"):
|
||||||
noise_pred = noise_pred_uncond + args.guidance_scale * (noise_pred_text - noise_pred_uncond)
|
accelerator.log({"total_norm": optimizer.optimizer._global_grad_norm}, step=global_step)
|
||||||
|
optimizer.step()
|
||||||
# compute the previous noisy sample x_t -> x_t-1
|
lr_scheduler.step()
|
||||||
latents = noise_scheduler.step(noise_pred, t, latents, **extra_step_kwargs, return_dict=False)[0]
|
optimizer.zero_grad()
|
||||||
|
|
||||||
if hasattr(vae, "disable_cache_in_vae"):
|
|
||||||
vae.disable_cache_in_vae()
|
|
||||||
# decode latents (tensor)
|
|
||||||
# latents = latents.permute(0, 2, 1, 3, 4) # [B, C, T, H, W]
|
|
||||||
# Since the casual VAE decoding consumes a large amount of VRAM, and we need to keep the decoding
|
|
||||||
# operation within the computational graph. Thus, we only decode the first args.num_decoded_latents
|
|
||||||
# to calculate the reward.
|
|
||||||
# TODO: Decode all latents but keep a portion of the decoding operation within the computational graph.
|
|
||||||
sampled_latent_indices = list(range(args.num_decoded_latents))
|
|
||||||
sampled_latents = latents[:, :, sampled_latent_indices, :, :]
|
|
||||||
sampled_latents = 1 / vae.config.scaling_factor * sampled_latents
|
|
||||||
sampled_frames = vae.decode(sampled_latents)[0]
|
|
||||||
sampled_frames = sampled_frames.clamp(-1, 1)
|
|
||||||
sampled_frames = (sampled_frames / 2 + 0.5).clamp(0, 1) # [-1, 1] -> [0, 1]
|
|
||||||
|
|
||||||
if global_step % args.checkpointing_steps == 0:
|
|
||||||
saved_file = f"sample-{global_step}-{accelerator.process_index}.mp4"
|
|
||||||
save_videos_grid(
|
|
||||||
sampled_frames.to(torch.float32).detach().cpu(),
|
|
||||||
os.path.join(args.output_dir, "train_sample", saved_file),
|
|
||||||
fps=8
|
|
||||||
)
|
|
||||||
|
|
||||||
if args.num_sampled_frames is not None:
|
|
||||||
num_frames = sampled_frames.size(2) - 1
|
|
||||||
sampled_frames_indices = torch.linspace(0, num_frames, steps=args.num_sampled_frames).long()
|
|
||||||
sampled_frames = sampled_frames[:, :, sampled_frames_indices, :, :]
|
|
||||||
# compute loss and reward
|
|
||||||
loss, reward = loss_fn(sampled_frames, train_prompt)
|
|
||||||
|
|
||||||
# Gather the losses and rewards across all processes for logging (if we use distributed training).
|
|
||||||
avg_loss = accelerator.gather(loss.repeat(args.train_batch_size)).mean()
|
|
||||||
avg_reward = accelerator.gather(reward.repeat(args.train_batch_size)).mean()
|
|
||||||
train_loss += avg_loss.item() / args.gradient_accumulation_steps
|
|
||||||
train_reward += avg_reward.item() / args.gradient_accumulation_steps
|
|
||||||
|
|
||||||
# Backpropagate
|
|
||||||
accelerator.backward(loss)
|
|
||||||
if accelerator.sync_gradients:
|
|
||||||
total_norm = accelerator.clip_grad_norm_(trainable_params, args.max_grad_norm)
|
|
||||||
# If use_deepspeed, `total_norm` cannot be logged by accelerator.
|
|
||||||
if not args.use_deepspeed:
|
|
||||||
accelerator.log({"total_norm": total_norm}, step=global_step)
|
|
||||||
else:
|
|
||||||
if hasattr(optimizer, "optimizer") and hasattr(optimizer.optimizer, "_global_grad_norm"):
|
|
||||||
accelerator.log({"total_norm": optimizer.optimizer._global_grad_norm}, step=global_step)
|
|
||||||
optimizer.step()
|
|
||||||
lr_scheduler.step()
|
|
||||||
optimizer.zero_grad()
|
|
||||||
|
|
||||||
# Checks if the accelerator has performed an optimization step behind the scenes
|
# Checks if the accelerator has performed an optimization step behind the scenes
|
||||||
if accelerator.sync_gradients:
|
if accelerator.sync_gradients:
|
||||||
@@ -1658,8 +1653,6 @@ def main():
|
|||||||
args.validation_prompts = validation_prompts[:args.validation_batch_size]
|
args.validation_prompts = validation_prompts[:args.validation_batch_size]
|
||||||
validation_prompts_idx = [(i, p) for i, p in enumerate(args.validation_prompts)]
|
validation_prompts_idx = [(i, p) for i, p in enumerate(args.validation_prompts)]
|
||||||
|
|
||||||
if hasattr(vae, "enable_cache_in_vae"):
|
|
||||||
vae.enable_cache_in_vae()
|
|
||||||
accelerator.wait_for_everyone()
|
accelerator.wait_for_everyone()
|
||||||
with accelerator.split_between_processes(validation_prompts_idx) as splitted_prompts_idx:
|
with accelerator.split_between_processes(validation_prompts_idx) as splitted_prompts_idx:
|
||||||
validation_loss, validation_reward = log_validation(
|
validation_loss, validation_reward = log_validation(
|
||||||
|
|||||||
Reference in New Issue
Block a user