Buckets:

hf-doc-build/doc / diffusers /v0.43.0 /ja /api /models /autoencoder_kl_kvae_video.md
mishig's picture
|
download
raw
5.08 kB

AutoencoderKLKVAEVideo

KL損失付きの3次元変分オートエンコーダ(VAE)モデル。

モデルは、以下のコードスニペットで読み込むことができます。

import torch
from diffusers import AutoencoderKLKVAEVideo

vae = AutoencoderKLKVAEVideo.from_pretrained("kandinskylab/KVAE-3D-1.0", subfolder="diffusers", dtype=torch.float16)

AutoencoderKLKVAEVideo[[diffusers.AutoencoderKLKVAEVideo]]

diffusers.AutoencoderKLKVAEVideo[[diffusers.AutoencoderKLKVAEVideo]]

diffusers.AutoencoderKLKVAEVideo(ch: int = 128, ch_mult: typing.Tuple[int, ...] = (1, 2, 4, 8), num_res_blocks: int = 2, in_channels: int = 3, out_ch: int = 3, z_channels: int = 16, temporal_compress_times: int = 4)

ソース

パラメータ:

ch (int、任意、デフォルトは 128) : 基本チャネル数。

ch_mult (Tuple[int]、任意、デフォルトは(1, 2, 4, 8)) : レベルごとのチャネル乗数。

num_res_blocks (int、任意、デフォルトは 2) : レベルごとの残差ブロックの数。

in_channels (int、任意、デフォルトは 3) : 入力チャネル数。

out_ch (int、任意、デフォルトは 3) : 出力チャネル数。

z_channels (int、optional、デフォルトは 16) : 潜在チャネルの数。

temporal_compress_times (int、optional、デフォルトは 4) : 時間方向の圧縮係数。

KL損失を用いて動画を潜在変数にエンコードし、潜在表現を動画にデコードするためのVAEモデル。KVAEで使用されます。

このモデルは ModelMixin を継承しています。すべてのモデルに実装されている汎用的なメソッド(ダウンロードや保存など)については、スーパークラスのドキュメントを参照してください。

decode[[diffusers.AutoencoderKLKVAEVideo.decode]]

decode(z: Tensor, return_dict: bool = True)

ソース

パラメータ:

z (torch.Tensor) : 形状が (B, C, T, H, W) の潜在ベクトルの入力バッチ。

return_dict (bool、任意、デフォルトはTrue) : プレーンなタプルではなく~models.vae.DecoderOutputを返すかどうか。

戻り値: ~models.vae.DecoderOutput または tuple

デコードされた動画。

バッチの動画をデコードします。

disable_slicing[[diffusers.AutoencoderKLKVAEVideo.disable_slicing]]

disable_slicing()

ソース

スライスされたVAEデコーディングを無効にします。

enable_slicing[[diffusers.AutoencoderKLKVAEVideo.enable_slicing]]

enable_slicing()

ソース

スライスされたVAEデコーディングを有効にします。

encode[[diffusers.AutoencoderKLKVAEVideo.encode]]

encode(x: Tensor, return_dict: bool = True)

ソース

パラメータ:

x (torch.Tensor) : 形状が (B, C, T, H, W) の動画の入力バッチ。

return_dict (bool、任意、デフォルトはTrue) : プレーンなタプルではなく~models.autoencoder_kl.AutoencoderKLOutputを返すかどうか。

戻り値:

エンコードされた動画の潜在表現。

バッチの動画を潜在変数にエンコードします。

forward[[diffusers.AutoencoderKLKVAEVideo.forward]]

forward(sample: Tensor, sample_posterior: bool = False, return_dict: bool = True, generator: typing.Optional[torch.Generator] = None)

ソース

パラメータ:

sample (torch.Tensor) : 入力サンプル。

sample_posterior (bool、任意、デフォルトはFalse) : 事後分布からサンプリングするかどうか。

return_dict (bool、任意、デフォルトはTrue) : プレーンなタプルではなくDecoderOutputを返すかどうか。

generator (torch.Generator, 任意) : サンプリングを決定論的にするための torch.Generator。

戻り値: ~models.vae.DecoderOutput または tuple

return_dict が True の場合、~models.vae.DecoderOutput が返され、それ以外の場合は通常の tuple が返されます。

Xet Storage Details

Size:
5.08 kB
·
Xet hash:
908ab19fa03b07431c9a2dfe42d0cd965f823ccdeaee0454eb15b6c23a405460

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.