🚀 3D溶解動画生成モデル
このプロジェクトは、[THUDM/CogVideoX - 5b](https://huggingface.co/THUDM/CogVideoX - 5b) モデルを [finetrainers/3dgs - dissolve](https://huggingface.co/datasets/finetrainers/3dgs - dissolve) データセットでファインチューニングしたものです。また、パラメータのLoRAバリアントも提供しています。詳細は こちら をご覧ください。
🚀 クイックスタート
このモデルは、特定の3D溶解効果を持つ動画を生成するためにファインチューニングされています。以下のコードで推論を行うことができます。
from diffusers import CogVideoXTransformer3DModel, DiffusionPipeline
from diffusers.utils import export_to_video
import torch
transformer = CogVideoXTransformer3DModel.from_pretrained(
"finetrainers/3dgs-v0", torch_dtype=torch.bfloat16
)
pipeline = DiffusionPipeline.from_pretrained(
"THUDM/CogVideoX-5b", transformer=transformer, torch_dtype=torch.bfloat16
).to("cuda")
prompt = """
3D_dissolve In a 3D appearance, a bookshelf filled with books is surrounded by a burst of red sparks, creating a dramatic and explosive effect against a black background.
"""
negative_prompt = "inconsistent motion, blurry motion, worse quality, degenerate outputs, deformed outputs"
video = pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
num_frames=81,
height=512,
width=768,
num_inference_steps=50
).frames[0]
export_to_video(video, "output.mp4", fps=25)
✨ 主な機能
- 3D溶解動画生成:特定の3D溶解効果を持つ動画を生成できます。
- LoRAバリアント:LoRAを使用して同様の効果を再現できます。
📦 インストール
このプロジェクトで使用されているライブラリは diffusers
です。必要な依存関係をインストールすることで使用可能です。
💻 使用例
基本的な使用法
from diffusers import CogVideoXTransformer3DModel, DiffusionPipeline
from diffusers.utils import export_to_video
import torch
transformer = CogVideoXTransformer3DModel.from_pretrained(
"finetrainers/3dgs-v0", torch_dtype=torch.bfloat16
)
pipeline = DiffusionPipeline.from_pretrained(
"THUDM/CogVideoX-5b", transformer=transformer, torch_dtype=torch.bfloat16
).to("cuda")
prompt = """
3D_dissolve In a 3D appearance, a bookshelf filled with books is surrounded by a burst of red sparks, creating a dramatic and explosive effect against a black background.
"""
negative_prompt = "inconsistent motion, blurry motion, worse quality, degenerate outputs, deformed outputs"
video = pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
num_frames=81,
height=512,
width=768,
num_inference_steps=50
).frames[0]
export_to_video(video, "output.mp4", fps=25)
高度な使用法
from diffusers import DiffusionPipeline
from diffusers.utils import export_to_video
import torch
pipeline = DiffusionPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to("cuda")
pipeline.load_lora_weights("/fsx/sayak/finetrainers/cogvideox-crush/extracted_crush_smol_lora_64.safetensors", adapter_name="crush")
pipeline.load_lora_weights("/fsx/sayak/finetrainers/cogvideox-3dgs/extracted_3dgs_lora_64.safetensors", adapter_name="3dgs")
pipeline
prompts = ["""
In a 3D appearance, a small bicycle is seen surrounded by a burst of fiery sparks, creating a dramatic and intense visual effect against the dark background.
The video showcases a dynamic explosion of fiery particles in a 3D appearance, with sparks and embers scattering across the screen against a stark black background.
""",
"""
In a 3D appearance, a bookshelf filled with books is surrounded by a burst of red sparks, creating a dramatic and explosive effect against a black background.
""",
]
negative_prompt = "inconsistent motion, blurry motion, worse quality, degenerate outputs, deformed outputs, bad physique"
id_token = "3D_dissolve"
for i, prompt in enumerate(prompts):
video = pipeline(
prompt=f"{id_token} {prompt}",
negative_prompt=negative_prompt,
num_frames=81,
height=512,
width=768,
num_inference_steps=50,
generator=torch.manual_seed(0)
).frames[0]
export_to_video(video, f"output_{i}.mp4", fps=25)
📚 ドキュメント
- コードのリポジトリ: [https://github.com/a - r - r - o - w/finetrainers](https://github.com/a - r - r - o - w/finetrainers)
- 学習ログ: [WandB](https://wandb.ai/sayakpaul/finetrainers - cogvideox/runs/r39sv4do)
🔧 技術詳細
このモデルは、[THUDM/CogVideoX - 5b](https://huggingface.co/THUDM/CogVideoX - 5b) を [finetrainers/3dgs - dissolve](https://huggingface.co/datasets/finetrainers/3dgs - dissolve) データセットでファインチューニングしています。また、LoRAを使用してパラメータを抽出し、同様の効果を再現できるようにしています。
📄 ライセンス
このモデルのライセンスは [other](https://huggingface.co/THUDM/CogVideoX - 5b/blob/main/LICENSE) です。
その他情報
属性 |
详情 |
モデルタイプ |
ファインチューニングされたCogVideoX - 5b |
学習データ |
finetrainers/3dgs - dissolve |
⚠️ 重要提示
これは実験的なチェックポイントであり、汎化性能が低いことは知られています。