Shortcuts

mmedit.models.editors.ddpm.embeddings

Module Contents

Classes

TimestepEmbedding

Module which uses linear to embed timestep.

Timesteps

A module which transforms timesteps to embedding.

class mmedit.models.editors.ddpm.embeddings.TimestepEmbedding(in_channels: int, time_embed_dim: int, act_fn: str = 'silu', out_dim: int = None)[source]

Bases: torch.nn.Module

Module which uses linear to embed timestep.

forward(sample)[source]

forward with sample.

class mmedit.models.editors.ddpm.embeddings.Timesteps(num_channels: int, flip_sin_to_cos: bool = True, downscale_freq_shift: float = 0)[source]

Bases: torch.nn.Module

A module which transforms timesteps to embedding.

forward(timesteps)[source]

forward with timesteps.

Read the Docs v: latest
Versions
master
latest
stable
zyh-re-docs
zyh-doc-notfound-extend
zyh-api-rendering
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.