SYMBOL INDEX (3841 symbols across 270 files) FILE: ddpm_exp/datasets/__init__.py class Crop (line 14) | class Crop(object): method __init__ (line 15) | def __init__(self, x1, x2, y1, y2): method __call__ (line 21) | def __call__(self, img): method __repr__ (line 24) | def __repr__(self): function get_dataset (line 30) | def get_dataset(args, config): function logit_transform (line 184) | def logit_transform(image, lam=1e-6): function data_transform (line 189) | def data_transform(config, X): function inverse_data_transform (line 206) | def inverse_data_transform(config, X): FILE: ddpm_exp/datasets/celeba.py class CelebA (line 8) | class CelebA(VisionDataset): method __init__ (line 50) | def __init__(self, root, method _check_integrity (line 108) | def _check_integrity(self): method download (line 120) | def download(self): method __getitem__ (line 133) | def __getitem__(self, index): method __len__ (line 158) | def __len__(self): method extra_repr (line 161) | def extra_repr(self): FILE: ddpm_exp/datasets/ffhq.py class FFHQ (line 8) | class FFHQ(Dataset): method __init__ (line 9) | def __init__(self, path, transform, resolution=8): method __len__ (line 28) | def __len__(self): method __getitem__ (line 31) | def __getitem__(self, index): FILE: ddpm_exp/datasets/lsun.py class LSUNClass (line 11) | class LSUNClass(VisionDataset): method __init__ (line 12) | def __init__(self, root, transform=None, target_transform=None): method __getitem__ (line 38) | def __getitem__(self, index): method __len__ (line 57) | def __len__(self): class LSUN (line 61) | class LSUN(VisionDataset): method __init__ (line 75) | def __init__(self, root, classes="train", transform=None, target_trans... method _verify_classes (line 96) | def _verify_classes(self, classes): method __getitem__ (line 146) | def __getitem__(self, index): method __len__ (line 171) | def __len__(self): method extra_repr (line 174) | def extra_repr(self): FILE: ddpm_exp/datasets/utils.py function gen_bar_updater (line 8) | def gen_bar_updater(): function check_integrity (line 20) | def check_integrity(fpath, md5=None): function makedir_exist_ok (line 36) | def makedir_exist_ok(dirpath): function download_url (line 49) | def download_url(url, root, filename=None, md5=None): function list_dir (line 88) | def list_dir(root, prefix=False): function list_files (line 110) | def list_files(root, suffix, prefix=False): function download_file_from_google_drive (line 134) | def download_file_from_google_drive(file_id, root, filename=None, md5=No... function _get_confirm_token (line 169) | def _get_confirm_token(response): function _save_response_content (line 177) | def _save_response_content(response, destination, chunk_size=32768): FILE: ddpm_exp/datasets/vision.py class VisionDataset (line 6) | class VisionDataset(data.Dataset): method __init__ (line 9) | def __init__(self, root, transforms=None, transform=None, target_trans... method __getitem__ (line 28) | def __getitem__(self, index): method __len__ (line 31) | def __len__(self): method __repr__ (line 34) | def __repr__(self): method _format_transform_repr (line 49) | def _format_transform_repr(self, transform, head): method extra_repr (line 54) | def extra_repr(self): class StandardTransform (line 58) | class StandardTransform(object): method __init__ (line 59) | def __init__(self, transform=None, target_transform=None): method __call__ (line 63) | def __call__(self, input, target): method _format_transform_repr (line 70) | def _format_transform_repr(self, transform, head): method __repr__ (line 75) | def __repr__(self): FILE: ddpm_exp/fid_score.py function tqdm (line 49) | def tqdm(x): class ImagePathDataset (line 84) | class ImagePathDataset(torch.utils.data.Dataset): method __init__ (line 85) | def __init__(self, files, transforms=None): method __len__ (line 89) | def __len__(self): method __getitem__ (line 92) | def __getitem__(self, i): function get_activations (line 100) | def get_activations(files, model, batch_size=50, dims=2048, device='cpu', function calculate_frechet_distance (line 182) | def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6): function calculate_activation_statistics (line 239) | def calculate_activation_statistics(files, model, batch_size=50, dims=2048, function compute_statistics_of_path (line 264) | def compute_statistics_of_path(path, model, batch_size, dims, device, function calculate_fid_given_paths (line 285) | def calculate_fid_given_paths(paths, batch_size, device, dims, num_worke... function save_fid_stats (line 304) | def save_fid_stats(paths, batch_size, device, dims, num_workers=1, num_s... function main (line 324) | def main(): FILE: ddpm_exp/finetune.py function parse_args_and_config (line 21) | def parse_args_and_config(accelerator): function dict2namespace (line 245) | def dict2namespace(config): function main (line 256) | def main(): FILE: ddpm_exp/finetune_simple.py function parse_args_and_config (line 22) | def parse_args_and_config(): function dict2namespace (line 247) | def dict2namespace(config): function main (line 258) | def main(): FILE: ddpm_exp/functions/__init__.py function get_optimizer (line 4) | def get_optimizer(config, parameters): FILE: ddpm_exp/functions/ckpt_util.py function download (line 40) | def download(url, local_path, chunk_size=1024): function md5_hash (line 52) | def md5_hash(path): function get_ckpt_path (line 58) | def get_ckpt_path(name, root=None, check=False): FILE: ddpm_exp/functions/denoising.py function compute_alpha (line 4) | def compute_alpha(beta, t): function generalized_steps (line 10) | def generalized_steps(x, seq, model, b, **kwargs): function ddpm_steps (line 35) | def ddpm_steps(x, seq, model, b, **kwargs): FILE: ddpm_exp/functions/losses.py function noise_estimation_loss (line 4) | def noise_estimation_loss(model, function noise_estimation_kd_loss (line 17) | def noise_estimation_kd_loss(model, FILE: ddpm_exp/inception.py class InceptionV3 (line 16) | class InceptionV3(nn.Module): method __init__ (line 31) | def __init__(self, method forward (line 129) | def forward(self, inp): function _inception_v3 (line 166) | def _inception_v3(*args, **kwargs): function fid_inception_v3 (line 197) | def fid_inception_v3(): class FIDInceptionA (line 224) | class FIDInceptionA(torchvision.models.inception.InceptionA): method __init__ (line 226) | def __init__(self, in_channels, pool_features): method forward (line 229) | def forward(self, x): class FIDInceptionC (line 249) | class FIDInceptionC(torchvision.models.inception.InceptionC): method __init__ (line 251) | def __init__(self, in_channels, channels_7x7): method forward (line 254) | def forward(self, x): class FIDInceptionE_1 (line 277) | class FIDInceptionE_1(torchvision.models.inception.InceptionE): method __init__ (line 279) | def __init__(self, in_channels): method forward (line 282) | def forward(self, x): class FIDInceptionE_2 (line 310) | class FIDInceptionE_2(torchvision.models.inception.InceptionE): method __init__ (line 312) | def __init__(self, in_channels): method forward (line 315) | def forward(self, x): FILE: ddpm_exp/main.py function parse_args_and_config (line 17) | def parse_args_and_config(): function dict2namespace (line 200) | def dict2namespace(config): function main (line 211) | def main(): FILE: ddpm_exp/models/diffusion.py function get_timestep_embedding (line 6) | def get_timestep_embedding(timesteps, embedding_dim): function nonlinearity (line 27) | def nonlinearity(x): function Normalize (line 32) | def Normalize(in_channels): class Upsample (line 36) | class Upsample(nn.Module): method __init__ (line 37) | def __init__(self, in_channels, with_conv): method forward (line 47) | def forward(self, x): class Downsample (line 55) | class Downsample(nn.Module): method __init__ (line 56) | def __init__(self, in_channels, with_conv): method forward (line 67) | def forward(self, x): class ResnetBlock (line 77) | class ResnetBlock(nn.Module): method __init__ (line 78) | def __init__(self, *, in_channels, out_channels=None, conv_shortcut=Fa... method forward (line 115) | def forward(self, x, temb): class AttnBlock (line 137) | class AttnBlock(nn.Module): method __init__ (line 138) | def __init__(self, in_channels): method forward (line 164) | def forward(self, x): class Model (line 192) | class Model(nn.Module): method __init__ (line 193) | def __init__(self, config): method forward (line 301) | def forward(self, x, t): FILE: ddpm_exp/models/ema.py class EMAHelper (line 4) | class EMAHelper(object): method __init__ (line 5) | def __init__(self, mu=0.999): method to (line 9) | def to(self, device=None) -> None: method copy_to (line 15) | def copy_to(self, parameters) -> None: method store (line 20) | def store(self, parameters) -> None: method restore (line 29) | def restore(self, parameters) -> None: method register (line 36) | def register(self, module): method update (line 41) | def update(self, module): method ema (line 49) | def ema(self, module): method state_dict (line 68) | def state_dict(self): method load_state_dict (line 71) | def load_state_dict(self, state_dict): FILE: ddpm_exp/prune.py function parse_args_and_config (line 22) | def parse_args_and_config(): function dict2namespace (line 164) | def dict2namespace(config): function main (line 175) | def main(): FILE: ddpm_exp/prune_kd.py function parse_args_and_config (line 21) | def parse_args_and_config(): function dict2namespace (line 240) | def dict2namespace(config): function main (line 251) | def main(): FILE: ddpm_exp/prune_ssim.py function parse_args_and_config (line 22) | def parse_args_and_config(): function dict2namespace (line 165) | def dict2namespace(config): function main (line 176) | def main(): FILE: ddpm_exp/prune_test.py function parse_args_and_config (line 22) | def parse_args_and_config(): function dict2namespace (line 158) | def dict2namespace(config): function main (line 169) | def main(): FILE: ddpm_exp/runners/diffusion.py function torch2hwcuint8 (line 21) | def torch2hwcuint8(x, clip=False): function get_beta_schedule (line 28) | def get_beta_schedule(beta_schedule, *, beta_start, beta_end, num_diffus... class Diffusion (line 61) | class Diffusion(object): method __init__ (line 62) | def __init__(self, args, config, device=None): method build_model (line 100) | def build_model(self): method train (line 197) | def train(self, kd=False): method sample (line 375) | def sample(self): method sample_fid (line 390) | def sample_fid(self, model): method sample_sequence (line 429) | def sample_sequence(self, model): method sample_interpolation (line 452) | def sample_interpolation(self, model): method sample_image (line 492) | def sample_image(self, x, model, last=True): method test (line 539) | def test(self): FILE: ddpm_exp/runners/diffusion_simple.py function torch2hwcuint8 (line 19) | def torch2hwcuint8(x, clip=False): function get_beta_schedule (line 26) | def get_beta_schedule(beta_schedule, *, beta_start, beta_end, num_diffus... class Diffusion (line 59) | class Diffusion(object): method __init__ (line 60) | def __init__(self, args, config, device=None): method build_model (line 98) | def build_model(self): method train (line 176) | def train(self): method sample (line 303) | def sample(self): method sample_fid (line 318) | def sample_fid(self, model): method sample_sequence (line 354) | def sample_sequence(self, model): method sample_interpolation (line 377) | def sample_interpolation(self, model): method sample_image (line 417) | def sample_image(self, x, model, last=True): method test (line 464) | def test(self): FILE: ddpm_exp/torch_pruning/_helpers.py function is_scalar (line 8) | def is_scalar(x): class _FlattenIndexMapping (line 18) | class _FlattenIndexMapping(object): method __init__ (line 19) | def __init__(self, stride=1, reverse=False): method __call__ (line 23) | def __call__(self, idxs): class _ConcatIndexMapping (line 36) | class _ConcatIndexMapping(object): method __init__ (line 37) | def __init__(self, offset, reverse=False): method __call__ (line 41) | def __call__(self, idxs): class _SplitIndexMapping (line 54) | class _SplitIndexMapping(object): method __init__ (line 55) | def __init__(self, offset, reverse=False): method __call__ (line 59) | def __call__(self, idxs): class _GroupConvIndexMapping (line 71) | class _GroupConvIndexMapping(object): method __init__ (line 72) | def __init__(self, in_channels, out_channels, groups, reverse=False): method __call__ (line 78) | def __call__(self, idxs): class ScalarSum (line 89) | class ScalarSum: method __init__ (line 90) | def __init__(self): method update (line 93) | def update(self, metric_name, metric_value): method results (line 98) | def results(self): method reset (line 101) | def reset(self): class VectorSum (line 105) | class VectorSum: method __init__ (line 106) | def __init__(self): method update (line 109) | def update(self, metric_name, metric_value): method results (line 119) | def results(self): method reset (line 122) | def reset(self): FILE: ddpm_exp/torch_pruning/dependency.py class Node (line 15) | class Node(object): method __init__ (line 19) | def __init__(self, module: nn.Module, grad_fn, name: str = None): method name (line 35) | def name(self): method add_input (line 44) | def add_input(self, node, allow_dumplicated=False): method add_output (line 52) | def add_output(self, node, allow_dumplicated=False): method __repr__ (line 59) | def __repr__(self): method __str__ (line 62) | def __str__(self): method details (line 65) | def details(self): class Edge (line 83) | class Edge(): # for readability class Dependency (line 87) | class Dependency(Edge): method __init__ (line 88) | def __init__( method __call__ (line 109) | def __call__(self, idxs: list): method __repr__ (line 117) | def __repr__(self): method __str__ (line 120) | def __str__(self): method is_triggered_by (line 128) | def is_triggered_by(self, pruning_fn): method __eq__ (line 131) | def __eq__(self, other): method __hash__ (line 139) | def __hash__(self): class Group (line 146) | class Group(object): method __init__ (line 153) | def __init__(self): method prune (line 157) | def prune(self, idxs=None, record_history=True): method add_dep (line 187) | def add_dep(self, dep, idxs): method __getitem__ (line 190) | def __getitem__(self, k): method items (line 194) | def items(self): method has_dep (line 197) | def has_dep(self, dep): method has_pruning_op (line 203) | def has_pruning_op(self, dep, idxs): method __len__ (line 213) | def __len__(self): method add_and_merge (line 216) | def add_and_merge(self, dep, idxs): method __str__ (line 223) | def __str__(self): method details (line 233) | def details(self): method exec (line 246) | def exec(self): method __call__ (line 250) | def __call__(self): class DependencyGraph (line 255) | class DependencyGraph(object): method __init__ (line 257) | def __init__(self): method pruning_history (line 278) | def pruning_history(self): method load_pruning_history (line 281) | def load_pruning_history(self, pruning_history): method build_dependency (line 295) | def build_dependency( method register_customized_layer (line 385) | def register_customized_layer( method check_pruning_group (line 400) | def check_pruning_group(self, group: Group) -> bool: method is_out_channel_pruning_fn (line 422) | def is_out_channel_pruning_fn(self, fn: typing.Callable) -> bool: method is_in_channel_pruning_fn (line 425) | def is_in_channel_pruning_fn(self, fn: typing.Callable) -> bool: method get_pruning_plan (line 428) | def get_pruning_plan(self, module: nn.Module, pruning_fn: typing.Calla... method get_pruning_group (line 433) | def get_pruning_group( method get_all_groups (line 498) | def get_all_groups(self, ignored_layers=[], root_module_types=(ops.TOR... method get_pruner_of_module (line 529) | def get_pruner_of_module(self, module): method get_out_channels (line 535) | def get_out_channels(self, module_or_node): method get_in_channels (line 548) | def get_in_channels(self, module_or_node): method _infer_out_channels_recursively (line 561) | def _infer_out_channels_recursively(self, node: Node): method _infer_in_channels_recursively (line 584) | def _infer_in_channels_recursively(self, node: Node): method _build_dependency (line 602) | def _build_dependency(self, module2node): method _trace (line 631) | def _trace(self, model, example_inputs, forward_fn, output_transform): method _trace_computational_graph (line 707) | def _trace_computational_graph(self, module2node, grad_fn_root, gradfn... method update_index_mapping (line 813) | def update_index_mapping(self): method _init_shape_information (line 825) | def _init_shape_information(self): method _update_flatten_index_mapping (line 856) | def _update_flatten_index_mapping(self, fc_node: Node): method _update_reshape_index_mapping (line 883) | def _update_reshape_index_mapping(self, reshape_node: Node): method _update_concat_index_mapping (line 946) | def _update_concat_index_mapping(self, cat_node: Node): method _update_split_index_mapping (line 993) | def _update_split_index_mapping(self, split_node: Node): method infer_channels (line 1024) | def infer_channels(self, node_1, node_2): FILE: ddpm_exp/torch_pruning/importance.py class Importance (line 11) | class Importance(abc.ABC): method __call__ (line 15) | def __call__(self, group)-> torch.Tensor: class MagnitudeImportance (line 18) | class MagnitudeImportance(Importance): method __init__ (line 19) | def __init__(self, p=2, group_reduction="mean", normalizer='mean'): method _normalize (line 24) | def _normalize(self, group_importance, normalizer): method _reduce (line 42) | def _reduce(self, group_imp): method __call__ (line 60) | def __call__(self, group, ch_groups=1): class BNScaleImportance (line 129) | class BNScaleImportance(MagnitudeImportance): method __init__ (line 133) | def __init__(self, group_reduction='mean', normalizer='mean'): method __call__ (line 136) | def __call__(self, group, ch_groups=1): class LAMPImportance (line 154) | class LAMPImportance(MagnitudeImportance): method __init__ (line 158) | def __init__(self, p=2, group_reduction="mean", normalizer='mean'): method __call__ (line 162) | def __call__(self, group, **kwargs): method lamp (line 211) | def lamp(self, imp): class RandomImportance (line 221) | class RandomImportance(Importance): method __call__ (line 223) | def __call__(self, group, **kwargs): class GroupNormImportance (line 227) | class GroupNormImportance(MagnitudeImportance): method __init__ (line 228) | def __init__(self, p=2, normalizer='max'): method __call__ (line 234) | def __call__(self, group, ch_groups=1): class TaylorImportance (line 332) | class TaylorImportance(Importance): method __init__ (line 333) | def __init__(self, group_reduction="mean", normalizer='mean'): method set_model (line 337) | def set_model(self, model): method _normalize (line 340) | def _normalize(self, group_importance, normalizer): method _reduce (line 358) | def _reduce(self, group_imp): method __call__ (line 376) | def __call__(self, group, ch_groups=1): class FullTaylorImportance (line 438) | class FullTaylorImportance(Importance): method __init__ (line 439) | def __init__(self, order=1, group_reduction="mean", normalizer='mean'): method set_model (line 444) | def set_model(self, model): method _normalize (line 447) | def _normalize(self, group_importance, normalizer): method _reduce (line 465) | def _reduce(self, group_imp): method __call__ (line 483) | def __call__(self, group, ch_groups=1): class AbsTaylorImportance (line 553) | class AbsTaylorImportance(Importance): method __init__ (line 554) | def __init__(self, order=1, group_reduction="mean", normalizer='mean'): method set_model (line 560) | def set_model(self, model): method _normalize (line 563) | def _normalize(self, group_importance, normalizer): method _reduce (line 581) | def _reduce(self, group_imp): method accum_abs_grad (line 598) | def accum_abs_grad(self, model): method assign_abs_grad (line 606) | def assign_abs_grad(self, model): method __call__ (line 612) | def __call__(self, group, ch_groups=1): class FisherImportance (line 672) | class FisherImportance(Importance): method __init__ (line 673) | def __init__(self, group_reduction="mean", normalizer='mean'): method set_model (line 677) | def set_model(self, model): method _normalize (line 680) | def _normalize(self, group_importance, normalizer): method _reduce (line 698) | def _reduce(self, group_imp): method __call__ (line 716) | def __call__(self, group, ch_groups=1): FILE: ddpm_exp/torch_pruning/ops.py class DummyMHA (line 5) | class DummyMHA(nn.Module): method __init__ (line 6) | def __init__(self): class _CustomizedOp (line 10) | class _CustomizedOp(nn.Module): method __init__ (line 11) | def __init__(self, op_class): method __repr__ (line 14) | def __repr__(self): class _ConcatOp (line 18) | class _ConcatOp(nn.Module): method __init__ (line 19) | def __init__(self, id): method __repr__ (line 25) | def __repr__(self): class _SplitOp (line 29) | class _SplitOp(nn.Module): method __init__ (line 30) | def __init__(self, id): method __repr__ (line 36) | def __repr__(self): class _ReshapeOp (line 39) | class _ReshapeOp(nn.Module): method __init__ (line 40) | def __init__(self, id): method __repr__ (line 43) | def __repr__(self): class _ElementWiseOp (line 47) | class _ElementWiseOp(nn.Module): method __init__ (line 48) | def __init__(self, id, grad_fn): method __repr__ (line 52) | def __repr__(self): class DummyPruner (line 58) | class DummyPruner(object): method __call__ (line 59) | def __call__(self, layer, *args, **kargs): method prune_out_channels (line 62) | def prune_out_channels(self, layer, idxs): method get_out_channels (line 67) | def get_out_channels(self, layer): method get_in_channels (line 70) | def get_in_channels(self, layer): class ConcatPruner (line 74) | class ConcatPruner(DummyPruner): method prune_out_channels (line 75) | def prune_out_channels(self, layer, idxs): class SplitPruner (line 98) | class SplitPruner(DummyPruner): method prune_out_channels (line 99) | def prune_out_channels(self, layer, idxs): class ReshapePruner (line 125) | class ReshapePruner(DummyPruner): class ElementWisePruner (line 128) | class ElementWisePruner(DummyPruner): class OPTYPE (line 150) | class OPTYPE(IntEnum): function module2type (line 170) | def module2type(module): function type2class (line 208) | def type2class(op_type): FILE: ddpm_exp/torch_pruning/pruner/algorithms/batchnorm_scale_pruner.py class BNScalePruner (line 8) | class BNScalePruner(MetaPruner): method __init__ (line 9) | def __init__( method regularize (line 45) | def regularize(self, model): FILE: ddpm_exp/torch_pruning/pruner/algorithms/group_norm_pruner.py class GroupNormPruner (line 9) | class GroupNormPruner(MetaPruner): method __init__ (line 10) | def __init__( method regularize (line 55) | def regularize(self, model, base=16): FILE: ddpm_exp/torch_pruning/pruner/algorithms/magnitude_based_pruner.py class MagnitudePruner (line 3) | class MagnitudePruner(MetaPruner): FILE: ddpm_exp/torch_pruning/pruner/algorithms/metapruner.py class MetaPruner (line 11) | class MetaPruner: method __init__ (line 34) | def __init__( method pruning_history (line 135) | def pruning_history(self): method load_pruning_history (line 138) | def load_pruning_history(self, pruning_history): method get_target_sparsity (line 141) | def get_target_sparsity(self, module): method reset (line 146) | def reset(self): method regularize (line 149) | def regularize(self, model, loss): method step (line 154) | def step(self, interactive=False): method estimate_importance (line 169) | def estimate_importance(self, group, ch_groups=1): method _check_sparsity (line 172) | def _check_sparsity(self, group): method get_channel_groups (line 196) | def get_channel_groups(self, group): method prune_local (line 205) | def prune_local(self): method prune_global (line 256) | def prune_global(self): FILE: ddpm_exp/torch_pruning/pruner/algorithms/scaling_factor_pruner.py class ScalingFactorPruner (line 11) | class ScalingFactorPruner(MetaPruner): method __init__ (line 12) | def __init__( method regularize (line 51) | def regularize(self, model): FILE: ddpm_exp/torch_pruning/pruner/algorithms/scheduler.py function linear_scheduler (line 2) | def linear_scheduler(ch_sparsity_dict, steps): FILE: ddpm_exp/torch_pruning/pruner/algorithms/taylor_pruner.py class TaylorPruner (line 9) | class TaylorPruner(MetaPruner): method __init__ (line 10) | def __init__( method regularize (line 55) | def regularize(self, model, base=16): FILE: ddpm_exp/torch_pruning/pruner/function.py class BasePruningFunc (line 41) | class BasePruningFunc(ABC): method __init__ (line 44) | def __init__(self, pruning_dim=1): method prune_out_channels (line 48) | def prune_out_channels(self, layer: nn.Module, idxs: Sequence[int]): method prune_in_channels (line 52) | def prune_in_channels(self, layer: nn.Module, idxs: Sequence[int]): method get_out_channels (line 56) | def get_out_channels(self, layer: nn.Module): method get_in_channels (line 60) | def get_in_channels(self, layer: nn.Module): method check (line 63) | def check(self, layer, idxs, to_output): method __call__ (line 75) | def __call__(self, layer: nn.Module, idxs: Sequence[int], to_output: b... class ConvPruner (line 85) | class ConvPruner(BasePruningFunc): method prune_out_channels (line 88) | def prune_out_channels(self, layer: nn.Module, idxs: Sequence[int]) ->... method prune_in_channels (line 117) | def prune_in_channels(self, layer: nn.Module, idxs: Sequence[int]) -> ... method get_out_channels (line 142) | def get_out_channels(self, layer): method get_in_channels (line 145) | def get_in_channels(self, layer): class DepthwiseConvPruner (line 149) | class DepthwiseConvPruner(ConvPruner): method prune_out_channels (line 152) | def prune_out_channels(self, layer: nn.Module, idxs: Sequence[int]) ->... class LinearPruner (line 168) | class LinearPruner(BasePruningFunc): method prune_out_channels (line 171) | def prune_out_channels(self, layer: nn.Module, idxs: Sequence[int]) ->... method prune_in_channels (line 190) | def prune_in_channels(self, layer: nn.Module, idxs: Sequence[int]) -> ... method get_out_channels (line 203) | def get_out_channels(self, layer): method get_in_channels (line 206) | def get_in_channels(self, layer): class BatchnormPruner (line 210) | class BatchnormPruner(BasePruningFunc): method prune_out_channels (line 213) | def prune_out_channels(self, layer: nn.Module, idxs: Sequence[int]) ->... method get_out_channels (line 229) | def get_out_channels(self, layer): method get_in_channels (line 232) | def get_in_channels(self, layer): class LayernormPruner (line 236) | class LayernormPruner(BasePruningFunc): method __init__ (line 239) | def __init__(self, metrcis=None, pruning_dim=-1): method check (line 243) | def check(self, layer, idxs): method prune_out_channels (line 246) | def prune_out_channels(self, layer: nn.Module, idxs: Sequence[int]) ->... method get_out_channels (line 268) | def get_out_channels(self, layer): method get_in_channels (line 271) | def get_in_channels(self, layer): class GroupNormPruner (line 274) | class GroupNormPruner(BasePruningFunc): method prune_out_channels (line 275) | def prune_out_channels(self, layer: nn.GroupNorm, idxs: list) -> nn.Mo... method get_out_channels (line 298) | def get_out_channels(self, layer): method get_in_channels (line 301) | def get_in_channels(self, layer): class InstanceNormPruner (line 304) | class InstanceNormPruner(BasePruningFunc): method prune_out_channels (line 305) | def prune_out_channels(self, layer: nn.Module, idxs: Sequence[int]) ->... method get_out_channels (line 317) | def get_out_channels(self, layer): method get_in_channels (line 320) | def get_in_channels(self, layer): class PReLUPruner (line 324) | class PReLUPruner(BasePruningFunc): method prune_out_channels (line 327) | def prune_out_channels(self, layer: nn.PReLU, idxs: list) -> nn.Module: method get_out_channels (line 341) | def get_out_channels(self, layer): method get_in_channels (line 347) | def get_in_channels(self, layer): class EmbeddingPruner (line 350) | class EmbeddingPruner(BasePruningFunc): method prune_out_channels (line 353) | def prune_out_channels(self, layer: nn.Embedding, idxs: list) -> nn.Mo... method get_out_channels (line 367) | def get_out_channels(self, layer): method get_in_channels (line 370) | def get_in_channels(self, layer): class LSTMPruner (line 373) | class LSTMPruner(BasePruningFunc): method prune_out_channels (line 376) | def prune_out_channels(self, layer: nn.LSTM, idxs: list) -> nn.Module: method prune_in_channels (line 405) | def prune_in_channels(self, layer: nn.LSTM, idxs: list): method get_out_channels (line 416) | def get_out_channels(self, layer): method get_in_channels (line 419) | def get_in_channels(self, layer): class ParameterPruner (line 423) | class ParameterPruner(BasePruningFunc): method __init__ (line 425) | def __init__(self, pruning_dim=-1): method prune_out_channels (line 428) | def prune_out_channels(self, tensor, idxs: list) -> nn.Module: method get_out_channels (line 437) | def get_out_channels(self, parameter): method get_in_channels (line 440) | def get_in_channels(self, parameter): class MultiheadAttentionPruner (line 444) | class MultiheadAttentionPruner(BasePruningFunc): method check (line 447) | def check(self, layer, idxs, to_output): method prune_out_channels (line 451) | def prune_out_channels(self, layer, idxs: list) -> nn.Module: method get_out_channels (line 513) | def get_out_channels(self, layer): method get_in_channels (line 516) | def get_in_channels(self, layer): FILE: ddpm_exp/torch_pruning/utils/op_counter.py function count_ops_and_params (line 16) | def count_ops_and_params(model, example_inputs): function empty_flops_counter_hook (line 35) | def empty_flops_counter_hook(module, input, output): function upsample_flops_counter_hook (line 39) | def upsample_flops_counter_hook(module, input, output): function relu_flops_counter_hook (line 48) | def relu_flops_counter_hook(module, input, output): function linear_flops_counter_hook (line 53) | def linear_flops_counter_hook(module, input, output): function pool_flops_counter_hook (line 61) | def pool_flops_counter_hook(module, input, output): function bn_flops_counter_hook (line 66) | def bn_flops_counter_hook(module, input, output): function conv_flops_counter_hook (line 75) | def conv_flops_counter_hook(conv_module, input, output): function rnn_flops (line 106) | def rnn_flops(flops, rnn_module, w_ih, w_hh, input_size): function rnn_flops_counter_hook (line 131) | def rnn_flops_counter_hook(rnn_module, input, output): function rnn_cell_flops_counter_hook (line 164) | def rnn_cell_flops_counter_hook(rnn_cell_module, input, output): function multihead_attention_counter_hook (line 181) | def multihead_attention_counter_hook(multihead_attention_module, input, ... function accumulate_flops (line 308) | def accumulate_flops(self): function get_model_parameters_number (line 318) | def get_model_parameters_number(model): function add_flops_counting_methods (line 323) | def add_flops_counting_methods(net_main_module): function compute_average_flops_cost (line 337) | def compute_average_flops_cost(self): function start_flops_count (line 357) | def start_flops_count(self, **kwargs): function stop_flops_count (line 393) | def stop_flops_count(self): function reset_flops_count (line 405) | def reset_flops_count(self): function batch_counter_hook (line 416) | def batch_counter_hook(module, input, output): function add_batch_counter_variables_or_reset (line 429) | def add_batch_counter_variables_or_reset(module): function add_batch_counter_hook_function (line 434) | def add_batch_counter_hook_function(module): function remove_batch_counter_hook_function (line 442) | def remove_batch_counter_hook_function(module): function add_flops_counter_variable_or_reset (line 448) | def add_flops_counter_variable_or_reset(module): function is_supported_instance (line 460) | def is_supported_instance(module): function remove_flops_counter_hook_function (line 466) | def remove_flops_counter_hook_function(module): function remove_flops_counter_variables (line 473) | def remove_flops_counter_variables(module): FILE: ddpm_exp/torch_pruning/utils/utils.py function count_params (line 8) | def count_params(module): function flatten_as_list (line 11) | def flatten_as_list(obj): function draw_computational_graph (line 27) | def draw_computational_graph(DG, save_as, title='Computational Graph', f... function draw_groups (line 54) | def draw_groups(DG, save_as, title='Group', figsize=(16, 16), dpi=200, c... function draw_dependency_graph (line 95) | def draw_dependency_graph(DG, save_as, title='Group', figsize=(16, 16), ... FILE: ddpm_exp/utils.py class UnlabeledImageFolder (line 5) | class UnlabeledImageFolder(torch.utils.data.Dataset): method __init__ (line 6) | def __init__(self, root, transform=None, exts=["*.jpg", "*.png", "*.jp... method __len__ (line 13) | def __len__(self): method __getitem__ (line 16) | def __getitem__(self, idx): function set_dropout (line 25) | def set_dropout(model, p): FILE: ddpm_prune.py function reset_parameters (line 126) | def reset_parameters(model): FILE: ddpm_train.py function parse_args (line 29) | def parse_args(): function main (line 252) | def main(args): FILE: diffusers/commands/__init__.py class BaseDiffusersCLICommand (line 19) | class BaseDiffusersCLICommand(ABC): method register_subcommand (line 22) | def register_subcommand(parser: ArgumentParser): method run (line 26) | def run(self): FILE: diffusers/commands/diffusers_cli.py function main (line 21) | def main(): FILE: diffusers/commands/env.py function info_command_factory (line 25) | def info_command_factory(_): class EnvironmentCommand (line 29) | class EnvironmentCommand(BaseDiffusersCLICommand): method register_subcommand (line 31) | def register_subcommand(parser: ArgumentParser): method run (line 35) | def run(self): method format_dict (line 83) | def format_dict(d): FILE: diffusers/configuration_utils.py class FrozenDict (line 50) | class FrozenDict(OrderedDict): method __init__ (line 51) | def __init__(self, *args, **kwargs): method __delitem__ (line 59) | def __delitem__(self, *args, **kwargs): method setdefault (line 62) | def setdefault(self, *args, **kwargs): method pop (line 65) | def pop(self, *args, **kwargs): method update (line 68) | def update(self, *args, **kwargs): method __setattr__ (line 71) | def __setattr__(self, name, value): method __setitem__ (line 76) | def __setitem__(self, name, value): class ConfigMixin (line 82) | class ConfigMixin: method register_to_config (line 105) | def register_to_config(self, **kwargs): method __getattr__ (line 122) | def __getattr__(self, name: str) -> Any: method save_config (line 140) | def save_config(self, save_directory: Union[str, os.PathLike], push_to... method from_config (line 161) | def from_config(cls, config: Union[FrozenDict, Dict[str, Any]] = None,... method get_config_dict (line 244) | def get_config_dict(cls, *args, **kwargs): method load_config (line 253) | def load_config( method _get_init_keys (line 429) | def _get_init_keys(cls): method extract_init_dict (line 433) | def extract_init_dict(cls, config_dict, **kwargs): method _dict_from_json_file (line 517) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __repr__ (line 522) | def __repr__(self): method config (line 526) | def config(self) -> Dict[str, Any]: method to_json_string (line 535) | def to_json_string(self) -> str: method to_json_file (line 559) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): function register_to_config (line 571) | def register_to_config(init): function flax_register_to_config (line 616) | def flax_register_to_config(cls): FILE: diffusers/dependency_versions_check.py function dep_version_check (line 46) | def dep_version_check(pkg, hint=None): FILE: diffusers/experimental/rl/value_guided_sampling.py class ValueGuidedRLPipeline (line 25) | class ValueGuidedRLPipeline(DiffusionPipeline): method __init__ (line 42) | def __init__( method normalize (line 70) | def normalize(self, x_in, key): method de_normalize (line 73) | def de_normalize(self, x_in, key): method to_torch (line 76) | def to_torch(self, x_in): method reset_x0 (line 83) | def reset_x0(self, x_in, cond, act_dim): method run_diffusion (line 88) | def run_diffusion(self, x, conditions, n_guide_steps, scale): method __call__ (line 121) | def __call__(self, obs, batch_size=64, planning_horizon=32, n_guide_st... FILE: diffusers/image_processor.py class VaeImageProcessor (line 27) | class VaeImageProcessor(ConfigMixin): method __init__ (line 46) | def __init__( method numpy_to_pil (line 56) | def numpy_to_pil(images): method numpy_to_pt (line 72) | def numpy_to_pt(images): method pt_to_numpy (line 83) | def pt_to_numpy(images): method normalize (line 91) | def normalize(images): method denormalize (line 98) | def denormalize(images): method resize (line 104) | def resize(self, images: PIL.Image.Image) -> PIL.Image.Image: method preprocess (line 113) | def preprocess( method postprocess (line 173) | def postprocess( FILE: diffusers/loaders.py class AttnProcsLayers (line 66) | class AttnProcsLayers(torch.nn.Module): method __init__ (line 67) | def __init__(self, state_dict: Dict[str, torch.Tensor]): class UNet2DConditionLoadersMixin (line 108) | class UNet2DConditionLoadersMixin: method load_attn_procs (line 112) | def load_attn_procs(self, pretrained_model_name_or_path_or_dict: Union... method save_attn_procs (line 327) | def save_attn_procs( class TextualInversionLoaderMixin (line 404) | class TextualInversionLoaderMixin: method maybe_convert_prompt (line 409) | def maybe_convert_prompt(self, prompt: Union[str, List[str]], tokenize... method _maybe_convert_prompt (line 437) | def _maybe_convert_prompt(self, prompt: str, tokenizer: "PreTrainedTok... method load_textual_inversion (line 466) | def load_textual_inversion( class LoraLoaderMixin (line 745) | class LoraLoaderMixin: method load_lora_weights (line 759) | def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Uni... method text_encoder_lora_attn_procs (line 926) | def text_encoder_lora_attn_procs(self): method _modify_text_encoder (line 931) | def _modify_text_encoder(self, attn_processors: Dict[str, LoRAAttnProc... method _get_lora_layer_attribute (line 955) | def _get_lora_layer_attribute(self, name: str) -> str: method _load_text_encoder_attn_procs (line 965) | def _load_text_encoder_attn_procs( method save_lora_weights (line 1131) | def save_lora_weights( class FromCkptMixin (line 1212) | class FromCkptMixin: method from_ckpt (line 1217) | def from_ckpt(cls, pretrained_model_link_or_path, **kwargs): FILE: diffusers/models/attention.py class BasicTransformerBlock (line 26) | class BasicTransformerBlock(nn.Module): method __init__ (line 47) | def __init__( method forward (line 121) | def forward( class FeedForward (line 185) | class FeedForward(nn.Module): method __init__ (line 198) | def __init__( method forward (line 231) | def forward(self, hidden_states): class GELU (line 237) | class GELU(nn.Module): method __init__ (line 242) | def __init__(self, dim_in: int, dim_out: int, approximate: str = "none"): method gelu (line 247) | def gelu(self, gate): method forward (line 253) | def forward(self, hidden_states): class GEGLU (line 259) | class GEGLU(nn.Module): method __init__ (line 268) | def __init__(self, dim_in: int, dim_out: int): method gelu (line 272) | def gelu(self, gate): method forward (line 278) | def forward(self, hidden_states): class ApproximateGELU (line 283) | class ApproximateGELU(nn.Module): method __init__ (line 290) | def __init__(self, dim_in: int, dim_out: int): method forward (line 294) | def forward(self, x): class AdaLayerNorm (line 299) | class AdaLayerNorm(nn.Module): method __init__ (line 304) | def __init__(self, embedding_dim, num_embeddings): method forward (line 311) | def forward(self, x, timestep): class AdaLayerNormZero (line 318) | class AdaLayerNormZero(nn.Module): method __init__ (line 323) | def __init__(self, embedding_dim, num_embeddings): method forward (line 332) | def forward(self, x, timestep, class_labels, hidden_dtype=None): class AdaGroupNorm (line 339) | class AdaGroupNorm(nn.Module): method __init__ (line 344) | def __init__( method forward (line 362) | def forward(self, x, emb): FILE: diffusers/models/attention_flax.py function _query_chunk_attention (line 23) | def _query_chunk_attention(query, key, value, precision, key_chunk_size:... function jax_memory_efficient_attention (line 74) | def jax_memory_efficient_attention( class FlaxAttention (line 119) | class FlaxAttention(nn.Module): method setup (line 145) | def setup(self): method reshape_heads_to_batch_dim (line 156) | def reshape_heads_to_batch_dim(self, tensor): method reshape_batch_dim_to_heads (line 164) | def reshape_batch_dim_to_heads(self, tensor): method __call__ (line 172) | def __call__(self, hidden_states, context=None, deterministic=True): class FlaxBasicTransformerBlock (line 220) | class FlaxBasicTransformerBlock(nn.Module): method setup (line 250) | def setup(self): method __call__ (line 264) | def __call__(self, hidden_states, context, deterministic=True): class FlaxTransformer2DModel (line 286) | class FlaxTransformer2DModel(nn.Module): method setup (line 320) | def setup(self): method __call__ (line 359) | def __call__(self, hidden_states, context, deterministic=True): class FlaxFeedForward (line 384) | class FlaxFeedForward(nn.Module): method setup (line 405) | def setup(self): method __call__ (line 411) | def __call__(self, hidden_states, deterministic=True): class FlaxGEGLU (line 417) | class FlaxGEGLU(nn.Module): method setup (line 434) | def setup(self): method __call__ (line 438) | def __call__(self, hidden_states, deterministic=True): FILE: diffusers/models/attention_processor.py class Attention (line 36) | class Attention(nn.Module): method __init__ (line 51) | def __init__( method set_use_memory_efficient_attention_xformers (line 159) | def set_use_memory_efficient_attention_xformers( method set_attention_slice (line 261) | def set_attention_slice(self, slice_size): method set_processor (line 282) | def set_processor(self, processor: "AttnProcessor"): method forward (line 295) | def forward(self, hidden_states, encoder_hidden_states=None, attention... method batch_to_head_dim (line 307) | def batch_to_head_dim(self, tensor): method head_to_batch_dim (line 314) | def head_to_batch_dim(self, tensor, out_dim=3): method get_attention_scores (line 325) | def get_attention_scores(self, query, key, attention_mask=None): method prepare_attention_mask (line 359) | def prepare_attention_mask(self, attention_mask, target_length, batch_... method norm_encoder_hidden_states (line 395) | def norm_encoder_hidden_states(self, encoder_hidden_states): class AttnProcessor (line 415) | class AttnProcessor: method __call__ (line 416) | def __call__( class LoRALinearLayer (line 473) | class LoRALinearLayer(nn.Module): method __init__ (line 474) | def __init__(self, in_features, out_features, rank=4): method forward (line 486) | def forward(self, hidden_states): class LoRAAttnProcessor (line 496) | class LoRAAttnProcessor(nn.Module): method __init__ (line 497) | def __init__(self, hidden_size, cross_attention_dim=None, rank=4): method __call__ (line 509) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class CustomDiffusionAttnProcessor (line 560) | class CustomDiffusionAttnProcessor(nn.Module): method __init__ (line 561) | def __init__( method __call__ (line 587) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class AttnAddedKVProcessor (line 638) | class AttnAddedKVProcessor: method __call__ (line 639) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class AttnAddedKVProcessor2_0 (line 687) | class AttnAddedKVProcessor2_0: method __init__ (line 688) | def __init__(self): method __call__ (line 694) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class LoRAAttnAddedKVProcessor (line 745) | class LoRAAttnAddedKVProcessor(nn.Module): method __init__ (line 746) | def __init__(self, hidden_size, cross_attention_dim=None, rank=4): method __call__ (line 760) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class XFormersAttnProcessor (line 812) | class XFormersAttnProcessor: method __init__ (line 813) | def __init__(self, attention_op: Optional[Callable] = None): method __call__ (line 816) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class AttnProcessor2_0 (line 870) | class AttnProcessor2_0: method __init__ (line 871) | def __init__(self): method __call__ (line 875) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class LoRAXFormersAttnProcessor (line 938) | class LoRAXFormersAttnProcessor(nn.Module): method __init__ (line 939) | def __init__(self, hidden_size, cross_attention_dim, rank=4, attention... method __call__ (line 952) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class CustomDiffusionXFormersAttnProcessor (line 1004) | class CustomDiffusionXFormersAttnProcessor(nn.Module): method __init__ (line 1005) | def __init__( method __call__ (line 1033) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class SlicedAttnProcessor (line 1089) | class SlicedAttnProcessor: method __init__ (line 1090) | def __init__(self, slice_size): method __call__ (line 1093) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class SlicedAttnAddedKVProcessor (line 1161) | class SlicedAttnAddedKVProcessor: method __init__ (line 1162) | def __init__(self, slice_size): method __call__ (line 1165) | def __call__(self, attn: "Attention", hidden_states, encoder_hidden_st... FILE: diffusers/models/autoencoder_kl.py class AutoencoderKLOutput (line 27) | class AutoencoderKLOutput(BaseOutput): class AutoencoderKL (line 40) | class AutoencoderKL(ModelMixin, ConfigMixin): method __init__ (line 71) | def __init__( method _set_gradient_checkpointing (line 126) | def _set_gradient_checkpointing(self, module, value=False): method enable_tiling (line 130) | def enable_tiling(self, use_tiling: bool = True): method disable_tiling (line 138) | def disable_tiling(self): method enable_slicing (line 145) | def enable_slicing(self): method disable_slicing (line 152) | def disable_slicing(self): method encode (line 160) | def encode(self, x: torch.FloatTensor, return_dict: bool = True) -> Au... method _decode (line 173) | def _decode(self, z: torch.FloatTensor, return_dict: bool = True) -> U... method decode (line 186) | def decode(self, z: torch.FloatTensor, return_dict: bool = True) -> Un... method blend_v (line 198) | def blend_v(self, a, b, blend_extent): method blend_h (line 204) | def blend_h(self, a, b, blend_extent): method tiled_encode (line 210) | def tiled_encode(self, x: torch.FloatTensor, return_dict: bool = True)... method tiled_decode (line 257) | def tiled_decode(self, z: torch.FloatTensor, return_dict: bool = True)... method forward (line 304) | def forward( FILE: diffusers/models/controlnet.py class ControlNetOutput (line 39) | class ControlNetOutput(BaseOutput): class ControlNetConditioningEmbedding (line 44) | class ControlNetConditioningEmbedding(nn.Module): method __init__ (line 54) | def __init__( method forward (line 76) | def forward(self, conditioning): class ControlNetModel (line 89) | class ControlNetModel(ModelMixin, ConfigMixin): method __init__ (line 93) | def __init__( method from_unet (line 263) | def from_unet( method attn_processors (line 318) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 342) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 373) | def set_default_attn_processor(self): method set_attention_slice (line 380) | def set_attention_slice(self, slice_size): method _set_gradient_checkpointing (line 445) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 449) | def forward( function zero_module (line 585) | def zero_module(module): FILE: diffusers/models/controlnet_flax.py class FlaxControlNetOutput (line 34) | class FlaxControlNetOutput(BaseOutput): class FlaxControlNetConditioningEmbedding (line 39) | class FlaxControlNetConditioningEmbedding(nn.Module): method setup (line 44) | def setup(self): method __call__ (line 82) | def __call__(self, conditioning): class FlaxControlNetModel (line 96) | class FlaxControlNetModel(nn.Module, FlaxModelMixin, ConfigMixin): method init_weights (line 167) | def init_weights(self, rng: jax.random.KeyArray) -> FrozenDict: method setup (line 181) | def setup(self): method __call__ (line 302) | def __call__( FILE: diffusers/models/cross_attention.py class CrossAttention (line 41) | class CrossAttention(Attention): method __init__ (line 42) | def __init__(self, *args, **kwargs): class CrossAttnProcessor (line 48) | class CrossAttnProcessor(AttnProcessorRename): method __init__ (line 49) | def __init__(self, *args, **kwargs): class LoRACrossAttnProcessor (line 55) | class LoRACrossAttnProcessor(LoRAAttnProcessor): method __init__ (line 56) | def __init__(self, *args, **kwargs): class CrossAttnAddedKVProcessor (line 62) | class CrossAttnAddedKVProcessor(AttnAddedKVProcessor): method __init__ (line 63) | def __init__(self, *args, **kwargs): class XFormersCrossAttnProcessor (line 69) | class XFormersCrossAttnProcessor(XFormersAttnProcessor): method __init__ (line 70) | def __init__(self, *args, **kwargs): class LoRAXFormersCrossAttnProcessor (line 76) | class LoRAXFormersCrossAttnProcessor(LoRAXFormersAttnProcessor): method __init__ (line 77) | def __init__(self, *args, **kwargs): class SlicedCrossAttnProcessor (line 83) | class SlicedCrossAttnProcessor(SlicedAttnProcessor): method __init__ (line 84) | def __init__(self, *args, **kwargs): class SlicedCrossAttnAddedKVProcessor (line 90) | class SlicedCrossAttnAddedKVProcessor(SlicedAttnAddedKVProcessor): method __init__ (line 91) | def __init__(self, *args, **kwargs): FILE: diffusers/models/dual_transformer_2d.py class DualTransformer2DModel (line 21) | class DualTransformer2DModel(nn.Module): method __init__ (line 48) | def __init__( method forward (line 97) | def forward( FILE: diffusers/models/embeddings.py function get_timestep_embedding (line 22) | def get_timestep_embedding( function get_2d_sincos_pos_embed (line 65) | def get_2d_sincos_pos_embed(embed_dim, grid_size, cls_token=False, extra... function get_2d_sincos_pos_embed_from_grid (line 82) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 94) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): class PatchEmbed (line 115) | class PatchEmbed(nn.Module): method __init__ (line 118) | def __init__( method forward (line 146) | def forward(self, latent): class TimestepEmbedding (line 155) | class TimestepEmbedding(nn.Module): method __init__ (line 156) | def __init__( method forward (line 200) | def forward(self, sample, condition=None): class Timesteps (line 215) | class Timesteps(nn.Module): method __init__ (line 216) | def __init__(self, num_channels: int, flip_sin_to_cos: bool, downscale... method forward (line 222) | def forward(self, timesteps): class GaussianFourierProjection (line 232) | class GaussianFourierProjection(nn.Module): method __init__ (line 235) | def __init__( method forward (line 249) | def forward(self, x): class ImagePositionalEmbeddings (line 262) | class ImagePositionalEmbeddings(nn.Module): method __init__ (line 286) | def __init__( method forward (line 304) | def forward(self, index): class LabelEmbedding (line 327) | class LabelEmbedding(nn.Module): method __init__ (line 337) | def __init__(self, num_classes, hidden_size, dropout_prob): method token_drop (line 344) | def token_drop(self, labels, force_drop_ids=None): method forward (line 355) | def forward(self, labels, force_drop_ids=None): class CombinedTimestepLabelEmbeddings (line 363) | class CombinedTimestepLabelEmbeddings(nn.Module): method __init__ (line 364) | def __init__(self, num_classes, embedding_dim, class_dropout_prob=0.1): method forward (line 371) | def forward(self, timestep, class_labels, hidden_dtype=None): class TextTimeEmbedding (line 382) | class TextTimeEmbedding(nn.Module): method __init__ (line 383) | def __init__(self, encoder_dim: int, time_embed_dim: int, num_heads: i... method forward (line 390) | def forward(self, hidden_states): class AttentionPooling (line 398) | class AttentionPooling(nn.Module): method __init__ (line 401) | def __init__(self, num_heads, embed_dim, dtype=None): method forward (line 411) | def forward(self, x): FILE: diffusers/models/embeddings_flax.py function get_sinusoidal_embeddings (line 20) | def get_sinusoidal_embeddings( class FlaxTimestepEmbedding (line 58) | class FlaxTimestepEmbedding(nn.Module): method __call__ (line 72) | def __call__(self, temb): class FlaxTimesteps (line 79) | class FlaxTimesteps(nn.Module): method __call__ (line 92) | def __call__(self, timesteps): FILE: diffusers/models/modeling_flax_pytorch_utils.py function rename_key (line 28) | def rename_key(key): function rename_key_and_reshape_tensor (line 43) | def rename_key_and_reshape_tensor(pt_tuple_key, pt_tensor, random_flax_s... function convert_pytorch_state_dict_to_flax (line 90) | def convert_pytorch_state_dict_to_flax(pt_state_dict, flax_model, init_k... FILE: diffusers/models/modeling_flax_utils.py class FlaxModelMixin (line 45) | class FlaxModelMixin: method _from_config (line 57) | def _from_config(cls, config, **kwargs): method _cast_floating_to (line 63) | def _cast_floating_to(self, params: Union[Dict, FrozenDict], dtype: jn... method to_bf16 (line 87) | def to_bf16(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp32 (line 126) | def to_fp32(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp16 (line 153) | def to_fp16(self, params: Union[Dict, FrozenDict], mask: Any = None): method init_weights (line 192) | def init_weights(self, rng: jax.random.KeyArray) -> Dict: method from_pretrained (line 196) | def from_pretrained( method save_pretrained (line 487) | def save_pretrained( FILE: diffusers/models/modeling_pytorch_flax_utils.py function load_flax_checkpoint_in_pytorch_model (line 37) | def load_flax_checkpoint_in_pytorch_model(pt_model, model_file): function load_flax_weights_in_pytorch_model (line 58) | def load_flax_weights_in_pytorch_model(pt_model, flax_state): FILE: diffusers/models/modeling_utils.py function get_parameter_device (line 62) | def get_parameter_device(parameter: torch.nn.Module): function get_parameter_dtype (line 78) | def get_parameter_dtype(parameter: torch.nn.Module): function load_state_dict (line 100) | def load_state_dict(checkpoint_file: Union[str, os.PathLike], variant: O... function _load_state_dict_into_model (line 131) | def _load_state_dict_into_model(model_to_load, state_dict): class ModelMixin (line 152) | class ModelMixin(torch.nn.Module): method __init__ (line 166) | def __init__(self): method __getattr__ (line 169) | def __getattr__(self, name: str) -> Any: method is_gradient_checkpointing (line 188) | def is_gradient_checkpointing(self) -> bool: method enable_gradient_checkpointing (line 197) | def enable_gradient_checkpointing(self): method disable_gradient_checkpointing (line 208) | def disable_gradient_checkpointing(self): method set_use_memory_efficient_attention_xformers (line 218) | def set_use_memory_efficient_attention_xformers( method enable_xformers_memory_efficient_attention (line 235) | def enable_xformers_memory_efficient_attention(self, attention_op: Opt... method disable_xformers_memory_efficient_attention (line 267) | def disable_xformers_memory_efficient_attention(self): method save_pretrained (line 273) | def save_pretrained( method from_pretrained (line 334) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method _load_pretrained_model (line 663) | def _load_pretrained_model( method device (line 767) | def device(self) -> device: method dtype (line 775) | def dtype(self) -> torch.dtype: method num_parameters (line 781) | def num_parameters(self, only_trainable: bool = False, exclude_embeddi... method _convert_deprecated_attention_blocks (line 809) | def _convert_deprecated_attention_blocks(self, state_dict): FILE: diffusers/models/prior_transformer.py class PriorTransformerOutput (line 16) | class PriorTransformerOutput(BaseOutput): class PriorTransformer (line 26) | class PriorTransformer(ModelMixin, ConfigMixin): method __init__ (line 52) | def __init__( method forward (line 107) | def forward( method post_process_latents (line 192) | def post_process_latents(self, prior_latents): FILE: diffusers/models/resnet.py class Upsample1D (line 26) | class Upsample1D(nn.Module): method __init__ (line 40) | def __init__(self, channels, use_conv=False, use_conv_transpose=False,... method forward (line 54) | def forward(self, x): class Downsample1D (line 67) | class Downsample1D(nn.Module): method __init__ (line 81) | def __init__(self, channels, use_conv=False, out_channels=None, paddin... method forward (line 96) | def forward(self, x): class Upsample2D (line 101) | class Upsample2D(nn.Module): method __init__ (line 115) | def __init__(self, channels, use_conv=False, use_conv_transpose=False,... method forward (line 135) | def forward(self, hidden_states, output_size=None): class Downsample2D (line 173) | class Downsample2D(nn.Module): method __init__ (line 187) | def __init__(self, channels, use_conv=False, out_channels=None, paddin... method forward (line 211) | def forward(self, hidden_states): class FirUpsample2D (line 223) | class FirUpsample2D(nn.Module): method __init__ (line 237) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _upsample_2d (line 246) | def _upsample_2d(self, hidden_states, weight=None, kernel=None, factor... method forward (line 326) | def forward(self, hidden_states): class FirDownsample2D (line 336) | class FirDownsample2D(nn.Module): method __init__ (line 350) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _downsample_2d (line 359) | def _downsample_2d(self, hidden_states, weight=None, kernel=None, fact... method forward (line 413) | def forward(self, hidden_states): class KDownsample2D (line 424) | class KDownsample2D(nn.Module): method __init__ (line 425) | def __init__(self, pad_mode="reflect"): method forward (line 432) | def forward(self, x): class KUpsample2D (line 440) | class KUpsample2D(nn.Module): method __init__ (line 441) | def __init__(self, pad_mode="reflect"): method forward (line 448) | def forward(self, x): class ResnetBlock2D (line 456) | class ResnetBlock2D(nn.Module): method __init__ (line 487) | def __init__( method forward (line 589) | def forward(self, input_tensor, temb): class Mish (line 642) | class Mish(torch.nn.Module): method forward (line 643) | def forward(self, hidden_states): function rearrange_dims (line 648) | def rearrange_dims(tensor): class Conv1dBlock (line 659) | class Conv1dBlock(nn.Module): method __init__ (line 664) | def __init__(self, inp_channels, out_channels, kernel_size, n_groups=8): method forward (line 671) | def forward(self, x): class ResidualTemporalBlock1D (line 681) | class ResidualTemporalBlock1D(nn.Module): method __init__ (line 682) | def __init__(self, inp_channels, out_channels, embed_dim, kernel_size=5): method forward (line 694) | def forward(self, x, t): function upsample_2d (line 710) | def upsample_2d(hidden_states, kernel=None, factor=2, gain=1): function downsample_2d (line 747) | def downsample_2d(hidden_states, kernel=None, factor=2, gain=1): function upfirdn2d_native (line 782) | def upfirdn2d_native(tensor, kernel, up=1, down=1, pad=(0, 0)): class TemporalConvLayer (line 826) | class TemporalConvLayer(nn.Module): method __init__ (line 832) | def __init__(self, in_dim, out_dim=None, dropout=0.0): method forward (line 865) | def forward(self, hidden_states, num_frames=1): FILE: diffusers/models/resnet_flax.py class FlaxUpsample2D (line 19) | class FlaxUpsample2D(nn.Module): method setup (line 23) | def setup(self): method __call__ (line 32) | def __call__(self, hidden_states): class FlaxDownsample2D (line 43) | class FlaxDownsample2D(nn.Module): method setup (line 47) | def setup(self): method __call__ (line 56) | def __call__(self, hidden_states): class FlaxResnetBlock2D (line 63) | class FlaxResnetBlock2D(nn.Module): method setup (line 70) | def setup(self): method __call__ (line 106) | def __call__(self, hidden_states, temb, deterministic=True): FILE: diffusers/models/t5_film_transformer.py class T5FilmDecoder (line 25) | class T5FilmDecoder(ModelMixin, ConfigMixin): method __init__ (line 27) | def __init__( method encoder_decoder_mask (line 66) | def encoder_decoder_mask(self, query_input, key_input): method forward (line 70) | def forward(self, encodings_and_masks, decoder_input_tokens, decoder_n... class DecoderLayer (line 127) | class DecoderLayer(nn.Module): method __init__ (line 128) | def __init__(self, d_model, d_kv, num_heads, d_ff, dropout_rate, layer... method forward (line 153) | def forward( class T5LayerSelfAttentionCond (line 185) | class T5LayerSelfAttentionCond(nn.Module): method __init__ (line 186) | def __init__(self, d_model, d_kv, num_heads, dropout_rate): method forward (line 193) | def forward( class T5LayerCrossAttention (line 213) | class T5LayerCrossAttention(nn.Module): method __init__ (line 214) | def __init__(self, d_model, d_kv, num_heads, dropout_rate, layer_norm_... method forward (line 220) | def forward( class T5LayerFFCond (line 236) | class T5LayerFFCond(nn.Module): method __init__ (line 237) | def __init__(self, d_model, d_ff, dropout_rate, layer_norm_epsilon): method forward (line 244) | def forward(self, hidden_states, conditioning_emb=None): class T5DenseGatedActDense (line 254) | class T5DenseGatedActDense(nn.Module): method __init__ (line 255) | def __init__(self, d_model, d_ff, dropout_rate): method forward (line 263) | def forward(self, hidden_states): class T5LayerNorm (line 273) | class T5LayerNorm(nn.Module): method __init__ (line 274) | def __init__(self, hidden_size, eps=1e-6): method forward (line 282) | def forward(self, hidden_states): class NewGELUActivation (line 298) | class NewGELUActivation(nn.Module): method forward (line 304) | def forward(self, input: torch.Tensor) -> torch.Tensor: class T5FiLMLayer (line 308) | class T5FiLMLayer(nn.Module): method __init__ (line 313) | def __init__(self, in_features, out_features): method forward (line 317) | def forward(self, x, conditioning_emb): FILE: diffusers/models/transformer_2d.py class Transformer2DModelOutput (line 30) | class Transformer2DModelOutput(BaseOutput): class Transformer2DModel (line 41) | class Transformer2DModel(ModelMixin, ConfigMixin): method __init__ (line 80) | def __init__( method forward (line 214) | def forward( FILE: diffusers/models/transformer_temporal.py class TransformerTemporalModelOutput (line 27) | class TransformerTemporalModelOutput(BaseOutput): class TransformerTemporalModel (line 37) | class TransformerTemporalModel(ModelMixin, ConfigMixin): method __init__ (line 60) | def __init__( method forward (line 106) | def forward( FILE: diffusers/models/unet_1d.py class UNet1DOutput (line 29) | class UNet1DOutput(BaseOutput): class UNet1DModel (line 39) | class UNet1DModel(ModelMixin, ConfigMixin): method __init__ (line 73) | def __init__( method forward (line 193) | def forward( FILE: diffusers/models/unet_1d_blocks.py class DownResnetBlock1D (line 23) | class DownResnetBlock1D(nn.Module): method __init__ (line 24) | def __init__( method forward (line 71) | def forward(self, hidden_states, temb=None): class UpResnetBlock1D (line 89) | class UpResnetBlock1D(nn.Module): method __init__ (line 90) | def __init__( method forward (line 135) | def forward(self, hidden_states, res_hidden_states_tuple=None, temb=No... class ValueFunctionMidBlock1D (line 153) | class ValueFunctionMidBlock1D(nn.Module): method __init__ (line 154) | def __init__(self, in_channels, out_channels, embed_dim): method forward (line 165) | def forward(self, x, temb=None): class MidResTemporalBlock1D (line 173) | class MidResTemporalBlock1D(nn.Module): method __init__ (line 174) | def __init__( method forward (line 217) | def forward(self, hidden_states, temb): class OutConv1DBlock (line 230) | class OutConv1DBlock(nn.Module): method __init__ (line 231) | def __init__(self, num_groups_out, out_channels, embed_dim, act_fn): method forward (line 241) | def forward(self, hidden_states, temb=None): class OutValueFunctionBlock (line 251) | class OutValueFunctionBlock(nn.Module): method __init__ (line 252) | def __init__(self, fc_dim, embed_dim): method forward (line 262) | def forward(self, hidden_states, temb): class Downsample1d (line 291) | class Downsample1d(nn.Module): method __init__ (line 292) | def __init__(self, kernel="linear", pad_mode="reflect"): method forward (line 299) | def forward(self, hidden_states): class Upsample1d (line 307) | class Upsample1d(nn.Module): method __init__ (line 308) | def __init__(self, kernel="linear", pad_mode="reflect"): method forward (line 315) | def forward(self, hidden_states, temb=None): class SelfAttention1d (line 323) | class SelfAttention1d(nn.Module): method __init__ (line 324) | def __init__(self, in_channels, n_head=1, dropout_rate=0.0): method transpose_for_scores (line 338) | def transpose_for_scores(self, projection: torch.Tensor) -> torch.Tensor: method forward (line 344) | def forward(self, hidden_states): class ResConvBlock (line 381) | class ResConvBlock(nn.Module): method __init__ (line 382) | def __init__(self, in_channels, mid_channels, out_channels, is_last=Fa... method forward (line 399) | def forward(self, hidden_states): class UNetMidBlock1D (line 415) | class UNetMidBlock1D(nn.Module): method __init__ (line 416) | def __init__(self, mid_channels, in_channels, out_channels=None): method forward (line 444) | def forward(self, hidden_states, temb=None): class AttnDownBlock1D (line 455) | class AttnDownBlock1D(nn.Module): method __init__ (line 456) | def __init__(self, out_channels, in_channels, mid_channels=None): method forward (line 475) | def forward(self, hidden_states, temb=None): class DownBlock1D (line 485) | class DownBlock1D(nn.Module): method __init__ (line 486) | def __init__(self, out_channels, in_channels, mid_channels=None): method forward (line 499) | def forward(self, hidden_states, temb=None): class DownBlock1DNoSkip (line 508) | class DownBlock1DNoSkip(nn.Module): method __init__ (line 509) | def __init__(self, out_channels, in_channels, mid_channels=None): method forward (line 521) | def forward(self, hidden_states, temb=None): class AttnUpBlock1D (line 529) | class AttnUpBlock1D(nn.Module): method __init__ (line 530) | def __init__(self, in_channels, out_channels, mid_channels=None): method forward (line 549) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class UpBlock1D (line 562) | class UpBlock1D(nn.Module): method __init__ (line 563) | def __init__(self, in_channels, out_channels, mid_channels=None): method forward (line 576) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class UpBlock1DNoSkip (line 588) | class UpBlock1DNoSkip(nn.Module): method __init__ (line 589) | def __init__(self, in_channels, out_channels, mid_channels=None): method forward (line 601) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): function get_down_block (line 611) | def get_down_block(down_block_type, num_layers, in_channels, out_channel... function get_up_block (line 629) | def get_up_block(up_block_type, num_layers, in_channels, out_channels, t... function get_mid_block (line 647) | def get_mid_block(mid_block_type, num_layers, in_channels, mid_channels,... function get_out_block (line 663) | def get_out_block(*, out_block_type, num_groups_out, embed_dim, out_chan... FILE: diffusers/models/unet_2d.py class UNet2DOutput (line 28) | class UNet2DOutput(BaseOutput): class UNet2DModel (line 38) | class UNet2DModel(ModelMixin, ConfigMixin): method __init__ (line 83) | def __init__( method forward (line 219) | def forward( FILE: diffusers/models/unet_2d_blocks.py function get_down_block (line 29) | def get_down_block( function get_up_block (line 210) | def get_up_block( class UNetMidBlock2D (line 391) | class UNetMidBlock2D(nn.Module): method __init__ (line 392) | def __init__( method forward (line 465) | def forward(self, hidden_states, temb=None): class UNetMidBlock2DCrossAttn (line 475) | class UNetMidBlock2DCrossAttn(nn.Module): method __init__ (line 476) | def __init__( method forward (line 560) | def forward( class UNetMidBlock2DSimpleCrossAttn (line 576) | class UNetMidBlock2DSimpleCrossAttn(nn.Module): method __init__ (line 577) | def __init__( method forward (line 661) | def forward( class AttnDownBlock2D (line 681) | class AttnDownBlock2D(nn.Module): method __init__ (line 682) | def __init__( method forward (line 748) | def forward(self, hidden_states, temb=None, upsample_size=None): class CrossAttnDownBlock2D (line 765) | class CrossAttnDownBlock2D(nn.Module): method __init__ (line 766) | def __init__( method forward (line 852) | def forward( class DownBlock2D (line 911) | class DownBlock2D(nn.Module): method __init__ (line 912) | def __init__( method forward (line 963) | def forward(self, hidden_states, temb=None): class DownEncoderBlock2D (line 997) | class DownEncoderBlock2D(nn.Module): method __init__ (line 998) | def __init__( method forward (line 1046) | def forward(self, hidden_states): class AttnDownEncoderBlock2D (line 1057) | class AttnDownEncoderBlock2D(nn.Module): method __init__ (line 1058) | def __init__( method forward (line 1123) | def forward(self, hidden_states): class AttnSkipDownBlock2D (line 1135) | class AttnSkipDownBlock2D(nn.Module): method __init__ (line 1136) | def __init__( method forward (line 1211) | def forward(self, hidden_states, temb=None, skip_sample=None): class SkipDownBlock2D (line 1231) | class SkipDownBlock2D(nn.Module): method __init__ (line 1232) | def __init__( method forward (line 1291) | def forward(self, hidden_states, temb=None, skip_sample=None): class ResnetDownsampleBlock2D (line 1310) | class ResnetDownsampleBlock2D(nn.Module): method __init__ (line 1311) | def __init__( method forward (line 1374) | def forward(self, hidden_states, temb=None): class SimpleCrossAttnDownBlock2D (line 1408) | class SimpleCrossAttnDownBlock2D(nn.Module): method __init__ (line 1409) | def __init__( method forward (line 1503) | def forward( class KDownBlock2D (line 1549) | class KDownBlock2D(nn.Module): method __init__ (line 1550) | def __init__( method forward (line 1595) | def forward(self, hidden_states, temb=None): class KCrossAttnDownBlock2D (line 1627) | class KCrossAttnDownBlock2D(nn.Module): method __init__ (line 1628) | def __init__( method forward (line 1692) | def forward( class AttnUpBlock2D (line 1754) | class AttnUpBlock2D(nn.Module): method __init__ (line 1755) | def __init__( method forward (line 1817) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, u... class CrossAttnUpBlock2D (line 1834) | class CrossAttnUpBlock2D(nn.Module): method __init__ (line 1835) | def __init__( method forward (line 1917) | def forward( class UpBlock2D (line 1982) | class UpBlock2D(nn.Module): method __init__ (line 1983) | def __init__( method forward (line 2030) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, u... class UpDecoderBlock2D (line 2063) | class UpDecoderBlock2D(nn.Module): method __init__ (line 2064) | def __init__( method forward (line 2106) | def forward(self, hidden_states): class AttnUpDecoderBlock2D (line 2117) | class AttnUpDecoderBlock2D(nn.Module): method __init__ (line 2118) | def __init__( method forward (line 2177) | def forward(self, hidden_states): class AttnSkipUpBlock2D (line 2189) | class AttnSkipUpBlock2D(nn.Module): method __init__ (line 2190) | def __init__( method forward (line 2275) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... class SkipUpBlock2D (line 2303) | class SkipUpBlock2D(nn.Module): method __init__ (line 2304) | def __init__( method forward (line 2372) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... class ResnetUpsampleBlock2D (line 2398) | class ResnetUpsampleBlock2D(nn.Module): method __init__ (line 2399) | def __init__( method forward (line 2465) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, u... class SimpleCrossAttnUpBlock2D (line 2498) | class SimpleCrossAttnUpBlock2D(nn.Module): method __init__ (line 2499) | def __init__( method forward (line 2595) | def forward( class KUpBlock2D (line 2648) | class KUpBlock2D(nn.Module): method __init__ (line 2649) | def __init__( method forward (line 2696) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, u... class KCrossAttnUpBlock2D (line 2728) | class KCrossAttnUpBlock2D(nn.Module): method __init__ (line 2729) | def __init__( method forward (line 2812) | def forward( class KAttentionBlock (line 2879) | class KAttentionBlock(nn.Module): method __init__ (line 2896) | def __init__( method _to_3d (line 2939) | def _to_3d(self, hidden_states, height, weight): method _to_4d (line 2942) | def _to_4d(self, hidden_states, height, weight): method forward (line 2945) | def forward( FILE: diffusers/models/unet_2d_blocks_flax.py class FlaxCrossAttnDownBlock2D (line 22) | class FlaxCrossAttnDownBlock2D(nn.Module): method setup (line 56) | def setup(self): method __call__ (line 89) | def __call__(self, hidden_states, temb, encoder_hidden_states, determi... class FlaxDownBlock2D (line 104) | class FlaxDownBlock2D(nn.Module): method setup (line 129) | def setup(self): method __call__ (line 147) | def __call__(self, hidden_states, temb, deterministic=True): class FlaxCrossAttnUpBlock2D (line 161) | class FlaxCrossAttnUpBlock2D(nn.Module): method setup (line 196) | def setup(self): method __call__ (line 230) | def __call__(self, hidden_states, res_hidden_states_tuple, temb, encod... class FlaxUpBlock2D (line 246) | class FlaxUpBlock2D(nn.Module): method setup (line 274) | def setup(self): method __call__ (line 294) | def __call__(self, hidden_states, res_hidden_states_tuple, temb, deter... class FlaxUNetMidBlock2DCrossAttn (line 309) | class FlaxUNetMidBlock2DCrossAttn(nn.Module): method setup (line 335) | def setup(self): method __call__ (line 371) | def __call__(self, hidden_states, temb, encoder_hidden_states, determi... FILE: diffusers/models/unet_2d_condition.py class UNet2DConditionOutput (line 44) | class UNet2DConditionOutput(BaseOutput): class UNet2DConditionModel (line 54) | class UNet2DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoade... method __init__ (line 133) | def __init__( method attn_processors (line 482) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 505) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 535) | def set_default_attn_processor(self): method set_attention_slice (line 541) | def set_attention_slice(self, slice_size): method _set_gradient_checkpointing (line 606) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 610) | def forward( FILE: diffusers/models/unet_2d_condition_flax.py class FlaxUNet2DConditionOutput (line 36) | class FlaxUNet2DConditionOutput(BaseOutput): class FlaxUNet2DConditionModel (line 47) | class FlaxUNet2DConditionModel(nn.Module, FlaxModelMixin, ConfigMixin): method init_weights (line 118) | def init_weights(self, rng: jax.random.KeyArray) -> FrozenDict: method setup (line 130) | def setup(self): method __call__ (line 253) | def __call__( FILE: diffusers/models/unet_3d_blocks.py function get_down_block (line 23) | def get_down_block( function get_up_block (line 79) | def get_up_block( class UNetMidBlock3DCrossAttn (line 135) | class UNetMidBlock3DCrossAttn(nn.Module): method __init__ (line 136) | def __init__( method forward (line 235) | def forward( class CrossAttnDownBlock3D (line 263) | class CrossAttnDownBlock3D(nn.Module): method __init__ (line 264) | def __init__( method forward (line 359) | def forward( class DownBlock3D (line 396) | class DownBlock3D(nn.Module): method __init__ (line 397) | def __init__( method forward (line 457) | def forward(self, hidden_states, temb=None, num_frames=1): class CrossAttnUpBlock3D (line 475) | class CrossAttnUpBlock3D(nn.Module): method __init__ (line 476) | def __init__( method forward (line 567) | def forward( class UpBlock3D (line 605) | class UpBlock3D(nn.Module): method __init__ (line 606) | def __init__( method forward (line 662) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, u... FILE: diffusers/models/unet_3d_condition.py class UNet3DConditionOutput (line 44) | class UNet3DConditionOutput(BaseOutput): class UNet3DConditionModel (line 54) | class UNet3DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoade... method __init__ (line 87) | def __init__( method attn_processors (line 256) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attention_slice (line 280) | def set_attention_slice(self, slice_size): method set_attn_processor (line 346) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 377) | def set_default_attn_processor(self): method _set_gradient_checkpointing (line 383) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 387) | def forward( FILE: diffusers/models/vae.py class DecoderOutput (line 26) | class DecoderOutput(BaseOutput): class Encoder (line 38) | class Encoder(nn.Module): method __init__ (line 39) | def __init__( method forward (line 107) | def forward(self, x): class Decoder (line 151) | class Decoder(nn.Module): method __init__ (line 152) | def __init__( method forward (line 220) | def forward(self, z): class VectorQuantizer (line 270) | class VectorQuantizer(nn.Module): method __init__ (line 279) | def __init__( method remap_to_used (line 308) | def remap_to_used(self, inds): method unmap_to_all (line 322) | def unmap_to_all(self, inds): method forward (line 332) | def forward(self, z): method get_codebook_entry (line 366) | def get_codebook_entry(self, indices, shape): class DiagonalGaussianDistribution (line 384) | class DiagonalGaussianDistribution(object): method __init__ (line 385) | def __init__(self, parameters, deterministic=False): method sample (line 397) | def sample(self, generator: Optional[torch.Generator] = None) -> torch... method kl (line 405) | def kl(self, other=None): method nll (line 421) | def nll(self, sample, dims=[1, 2, 3]): method mode (line 427) | def mode(self): FILE: diffusers/models/vae_flax.py class FlaxDecoderOutput (line 33) | class FlaxDecoderOutput(BaseOutput): class FlaxAutoencoderKLOutput (line 48) | class FlaxAutoencoderKLOutput(BaseOutput): class FlaxUpsample2D (line 61) | class FlaxUpsample2D(nn.Module): method setup (line 75) | def setup(self): method __call__ (line 84) | def __call__(self, hidden_states): class FlaxDownsample2D (line 95) | class FlaxDownsample2D(nn.Module): method setup (line 109) | def setup(self): method __call__ (line 118) | def __call__(self, hidden_states): class FlaxResnetBlock2D (line 125) | class FlaxResnetBlock2D(nn.Module): method setup (line 151) | def setup(self): method __call__ (line 185) | def __call__(self, hidden_states, deterministic=True): class FlaxAttentionBlock (line 202) | class FlaxAttentionBlock(nn.Module): method setup (line 222) | def setup(self): method transpose_for_scores (line 231) | def transpose_for_scores(self, projection): method __call__ (line 239) | def __call__(self, hidden_states): class FlaxDownEncoderBlock2D (line 274) | class FlaxDownEncoderBlock2D(nn.Module): method setup (line 302) | def setup(self): method __call__ (line 320) | def __call__(self, hidden_states, deterministic=True): class FlaxUpDecoderBlock2D (line 330) | class FlaxUpDecoderBlock2D(nn.Module): method setup (line 358) | def setup(self): method __call__ (line 376) | def __call__(self, hidden_states, deterministic=True): class FlaxUNetMidBlock2D (line 386) | class FlaxUNetMidBlock2D(nn.Module): method setup (line 411) | def setup(self): method __call__ (line 448) | def __call__(self, hidden_states, deterministic=True): class FlaxEncoder (line 457) | class FlaxEncoder(nn.Module): method setup (line 501) | def setup(self): method __call__ (line 550) | def __call__(self, sample, deterministic: bool = True): class FlaxDecoder (line 569) | class FlaxDecoder(nn.Module): method setup (line 612) | def setup(self): method __call__ (line 665) | def __call__(self, sample, deterministic: bool = True): class FlaxDiagonalGaussianDistribution (line 683) | class FlaxDiagonalGaussianDistribution(object): method __init__ (line 684) | def __init__(self, parameters, deterministic=False): method sample (line 694) | def sample(self, key): method kl (line 697) | def kl(self, other=None): method nll (line 709) | def nll(self, sample, axis=[1, 2, 3]): method mode (line 716) | def mode(self): class FlaxAutoencoderKL (line 721) | class FlaxAutoencoderKL(nn.Module, FlaxModelMixin, ConfigMixin): method setup (line 780) | def setup(self): method init_weights (line 817) | def init_weights(self, rng: jax.random.KeyArray) -> FrozenDict: method encode (line 827) | def encode(self, sample, deterministic: bool = True, return_dict: bool... method decode (line 839) | def decode(self, latents, deterministic: bool = True, return_dict: boo... method __call__ (line 853) | def __call__(self, sample, sample_posterior=False, deterministic: bool... FILE: diffusers/models/vq_model.py class VQEncoderOutput (line 27) | class VQEncoderOutput(BaseOutput): class VQModel (line 39) | class VQModel(ModelMixin, ConfigMixin): method __init__ (line 70) | def __init__( method encode (line 117) | def encode(self, x: torch.FloatTensor, return_dict: bool = True) -> VQ... method decode (line 126) | def decode( method forward (line 142) | def forward(self, sample: torch.FloatTensor, return_dict: bool = True)... FILE: diffusers/optimization.py class SchedulerType (line 30) | class SchedulerType(Enum): function get_constant_schedule (line 40) | def get_constant_schedule(optimizer: Optimizer, last_epoch: int = -1): function get_constant_schedule_with_warmup (line 56) | def get_constant_schedule_with_warmup(optimizer: Optimizer, num_warmup_s... function get_piecewise_constant_schedule (line 81) | def get_piecewise_constant_schedule(optimizer: Optimizer, step_rules: st... function get_linear_schedule_with_warmup (line 123) | def get_linear_schedule_with_warmup(optimizer, num_warmup_steps, num_tra... function get_cosine_schedule_with_warmup (line 152) | def get_cosine_schedule_with_warmup( function get_cosine_with_hard_restarts_schedule_with_warmup (line 186) | def get_cosine_with_hard_restarts_schedule_with_warmup( function get_polynomial_decay_schedule_with_warmup (line 221) | def get_polynomial_decay_schedule_with_warmup( function get_scheduler (line 282) | def get_scheduler( FILE: diffusers/pipelines/alt_diffusion/__init__.py class AltDiffusionPipelineOutput (line 13) | class AltDiffusionPipelineOutput(BaseOutput): FILE: diffusers/pipelines/alt_diffusion/modeling_roberta_series.py class TransformationModelOutput (line 11) | class TransformationModelOutput(ModelOutput): class RobertaSeriesConfig (line 39) | class RobertaSeriesConfig(XLMRobertaConfig): method __init__ (line 40) | def __init__( class RobertaSeriesModelWithTransformation (line 58) | class RobertaSeriesModelWithTransformation(RobertaPreTrainedModel): method __init__ (line 64) | def __init__(self, config): method forward (line 74) | def forward( FILE: diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py class AltDiffusionPipeline (line 55) | class AltDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMixin): method __init__ (line 92) | def __init__( method enable_vae_slicing (line 182) | def enable_vae_slicing(self): method disable_vae_slicing (line 191) | def disable_vae_slicing(self): method enable_vae_tiling (line 198) | def enable_vae_tiling(self): method disable_vae_tiling (line 207) | def disable_vae_tiling(self): method enable_sequential_cpu_offload (line 214) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 239) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 268) | def _execution_device(self): method _encode_prompt (line 285) | def _encode_prompt( method run_safety_checker (line 431) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 445) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 460) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 477) | def check_inputs( method prepare_latents (line 524) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 543) | def __call__( FILE: diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py function preprocess (line 71) | def preprocess(image): class AltDiffusionImg2ImgPipeline (line 93) | class AltDiffusionImg2ImgPipeline(DiffusionPipeline, TextualInversionLoa... method __init__ (line 130) | def __init__( method enable_sequential_cpu_offload (line 220) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 245) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 274) | def _execution_device(self): method _encode_prompt (line 291) | def _encode_prompt( method run_safety_checker (line 437) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 451) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 466) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 483) | def check_inputs( method get_timesteps (line 523) | def get_timesteps(self, num_inference_steps, strength, device): method prepare_latents (line 532) | def prepare_latents(self, image, timestep, batch_size, num_images_per_... method __call__ (line 586) | def __call__( FILE: diffusers/pipelines/audio_diffusion/mel.py class Mel (line 37) | class Mel(ConfigMixin, SchedulerMixin): method __init__ (line 52) | def __init__( method set_resolution (line 73) | def set_resolution(self, x_res: int, y_res: int): method load_audio (line 85) | def load_audio(self, audio_file: str = None, raw_audio: np.ndarray = N... method get_number_of_slices (line 101) | def get_number_of_slices(self) -> int: method get_audio_slice (line 109) | def get_audio_slice(self, slice: int = 0) -> np.ndarray: method get_sample_rate (line 120) | def get_sample_rate(self) -> int: method audio_slice_to_image (line 128) | def audio_slice_to_image(self, slice: int) -> Image.Image: method image_to_audio (line 145) | def image_to_audio(self, image: Image.Image) -> np.ndarray: FILE: diffusers/pipelines/audio_diffusion/pipeline_audio_diffusion.py class AudioDiffusionPipeline (line 30) | class AudioDiffusionPipeline(DiffusionPipeline): method __init__ (line 44) | def __init__( method get_default_steps (line 54) | def get_default_steps(self) -> int: method __call__ (line 63) | def __call__( method encode (line 199) | def encode(self, images: List[Image.Image], steps: int = 50) -> np.nda... method slerp (line 236) | def slerp(x0: torch.Tensor, x1: torch.Tensor, alpha: float) -> torch.T... FILE: diffusers/pipelines/audioldm/pipeline_audioldm.py class AudioLDMPipeline (line 46) | class AudioLDMPipeline(DiffusionPipeline): method __init__ (line 72) | def __init__( method enable_vae_slicing (line 94) | def enable_vae_slicing(self): method disable_vae_slicing (line 104) | def disable_vae_slicing(self): method enable_sequential_cpu_offload (line 111) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 129) | def _execution_device(self): method _encode_prompt (line 146) | def _encode_prompt( method decode_latents (line 285) | def decode_latents(self, latents): method mel_spectrogram_to_waveform (line 290) | def mel_spectrogram_to_waveform(self, mel_spectrogram): method prepare_extra_step_kwargs (line 300) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 317) | def check_inputs( method prepare_latents (line 376) | def prepare_latents(self, batch_size, num_channels_latents, height, dt... method __call__ (line 400) | def __call__( FILE: diffusers/pipelines/controlnet/multicontrolnet.py class MultiControlNetModel (line 10) | class MultiControlNetModel(ModelMixin): method __init__ (line 23) | def __init__(self, controlnets: Union[List[ControlNetModel], Tuple[Con... method forward (line 27) | def forward( FILE: diffusers/pipelines/controlnet/pipeline_controlnet.py class StableDiffusionControlNetPipeline (line 95) | class StableDiffusionControlNetPipeline(DiffusionPipeline, TextualInvers... method __init__ (line 131) | def __init__( method enable_vae_slicing (line 179) | def enable_vae_slicing(self): method disable_vae_slicing (line 189) | def disable_vae_slicing(self): method enable_vae_tiling (line 197) | def enable_vae_tiling(self): method disable_vae_tiling (line 207) | def disable_vae_tiling(self): method enable_sequential_cpu_offload (line 214) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 235) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 265) | def _execution_device(self): method _encode_prompt (line 283) | def _encode_prompt( method run_safety_checker (line 430) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 445) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 459) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 476) | def check_inputs( method check_image (line 592) | def check_image(self, image, prompt, prompt_embeds): method prepare_image (line 624) | def prepare_image( method prepare_latents (line 677) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _default_height_width (line 694) | def _default_height_width(self, height, width, image): method save_pretrained (line 720) | def save_pretrained( method __call__ (line 733) | def __call__( FILE: diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py function prepare_image (line 97) | def prepare_image(image): class StableDiffusionControlNetImg2ImgPipeline (line 121) | class StableDiffusionControlNetImg2ImgPipeline(DiffusionPipeline, Textua... method __init__ (line 157) | def __init__( method enable_vae_slicing (line 205) | def enable_vae_slicing(self): method disable_vae_slicing (line 215) | def disable_vae_slicing(self): method enable_vae_tiling (line 223) | def enable_vae_tiling(self): method disable_vae_tiling (line 233) | def disable_vae_tiling(self): method enable_sequential_cpu_offload (line 240) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 261) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 291) | def _execution_device(self): method _encode_prompt (line 309) | def _encode_prompt( method run_safety_checker (line 456) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 471) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 485) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 502) | def check_inputs( method check_image (line 618) | def check_image(self, image, prompt, prompt_embeds): method prepare_control_image (line 651) | def prepare_control_image( method get_timesteps (line 704) | def get_timesteps(self, num_inference_steps, strength, device): method prepare_latents (line 714) | def prepare_latents(self, image, timestep, batch_size, num_images_per_... method _default_height_width (line 766) | def _default_height_width(self, height, width, image): method save_pretrained (line 792) | def save_pretrained( method __call__ (line 805) | def __call__( FILE: diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py function prepare_mask_and_masked_image (line 102) | def prepare_mask_and_masked_image(image, mask, height, width, return_ima... class StableDiffusionControlNetInpaintPipeline (line 219) | class StableDiffusionControlNetInpaintPipeline(DiffusionPipeline, Textua... method __init__ (line 255) | def __init__( method enable_vae_slicing (line 303) | def enable_vae_slicing(self): method disable_vae_slicing (line 313) | def disable_vae_slicing(self): method enable_vae_tiling (line 321) | def enable_vae_tiling(self): method disable_vae_tiling (line 331) | def disable_vae_tiling(self): method enable_sequential_cpu_offload (line 338) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 359) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 389) | def _execution_device(self): method _encode_prompt (line 407) | def _encode_prompt( method run_safety_checker (line 554) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 569) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 583) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 600) | def check_inputs( method check_image (line 716) | def check_image(self, image, prompt, prompt_embeds): method prepare_control_image (line 749) | def prepare_control_image( method prepare_latents (line 802) | def prepare_latents( method _default_height_width (line 856) | def _default_height_width(self, height, width, image): method prepare_mask_latents (line 882) | def prepare_mask_latents( method save_pretrained (line 934) | def save_pretrained( method __call__ (line 947) | def __call__( FILE: diffusers/pipelines/controlnet/pipeline_flax_controlnet.py class FlaxStableDiffusionControlNetPipeline (line 119) | class FlaxStableDiffusionControlNetPipeline(FlaxDiffusionPipeline): method __init__ (line 150) | def __init__( method prepare_text_inputs (line 189) | def prepare_text_inputs(self, prompt: Union[str, List[str]]): method prepare_image_inputs (line 203) | def prepare_image_inputs(self, image: Union[Image.Image, List[Image.Im... method _get_has_nsfw_concepts (line 214) | def _get_has_nsfw_concepts(self, features, params): method _run_safety_checker (line 218) | def _run_safety_checker(self, images, safety_model_params, jit=False): method _generate (line 248) | def _generate( method __call__ (line 358) | def __call__( function _p_generate (line 493) | def _p_generate( function _p_get_has_nsfw_concepts (line 519) | def _p_get_has_nsfw_concepts(pipe, features, params): function unshard (line 523) | def unshard(x: jnp.ndarray): function preprocess (line 530) | def preprocess(image, dtype): FILE: diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py class DanceDiffusionPipeline (line 27) | class DanceDiffusionPipeline(DiffusionPipeline): method __init__ (line 39) | def __init__(self, unet, scheduler): method __call__ (line 44) | def __call__( FILE: diffusers/pipelines/ddim/pipeline_ddim.py class DDIMPipeline (line 24) | class DDIMPipeline(DiffusionPipeline): method __init__ (line 36) | def __init__(self, unet, scheduler): method __call__ (line 45) | def __call__( FILE: diffusers/pipelines/ddpm/pipeline_ddpm.py class DDPMPipeline (line 24) | class DDPMPipeline(DiffusionPipeline): method __init__ (line 36) | def __init__(self, unet, scheduler): method __call__ (line 41) | def __call__( FILE: diffusers/pipelines/deepfloyd_if/__init__.py class IFPipelineOutput (line 21) | class IFPipelineOutput(BaseOutput): FILE: diffusers/pipelines/deepfloyd_if/pipeline_if.py class IFPipeline (line 89) | class IFPipeline(DiffusionPipeline, LoraLoaderMixin): method __init__ (line 107) | def __init__( method enable_sequential_cpu_offload (line 147) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 171) | def enable_model_cpu_offload(self, gpu_id=0): method remove_all_hooks (line 212) | def remove_all_hooks(self): method _execution_device (line 228) | def _execution_device(self): method encode_prompt (line 246) | def encode_prompt( method run_safety_checker (line 397) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 414) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 431) | def check_inputs( method prepare_intermediate_images (line 473) | def prepare_intermediate_images(self, batch_size, num_channels, height... method _text_preprocessing (line 487) | def _text_preprocessing(self, text, clean_caption=False): method _clean_caption (line 511) | def _clean_caption(self, caption): method __call__ (line 627) | def __call__( FILE: diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py function resize (line 41) | def resize(images: PIL.Image.Image, img_size: int) -> PIL.Image.Image: class IFImg2ImgPipeline (line 113) | class IFImg2ImgPipeline(DiffusionPipeline, LoraLoaderMixin): method __init__ (line 131) | def __init__( method enable_sequential_cpu_offload (line 172) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 197) | def enable_model_cpu_offload(self, gpu_id=0): method remove_all_hooks (line 239) | def remove_all_hooks(self): method _execution_device (line 255) | def _execution_device(self): method encode_prompt (line 274) | def encode_prompt( method run_safety_checker (line 426) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 443) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 460) | def check_inputs( method _text_preprocessing (line 534) | def _text_preprocessing(self, text, clean_caption=False): method _clean_caption (line 559) | def _clean_caption(self, caption): method preprocess_image (line 673) | def preprocess_image(self, image: PIL.Image.Image) -> torch.Tensor: method get_timesteps (line 709) | def get_timesteps(self, num_inference_steps, strength): method prepare_intermediate_images (line 718) | def prepare_intermediate_images( method __call__ (line 742) | def __call__( FILE: diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py function resize (line 43) | def resize(images: PIL.Image.Image, img_size: int) -> PIL.Image.Image: class IFImg2ImgSuperResolutionPipeline (line 115) | class IFImg2ImgSuperResolutionPipeline(DiffusionPipeline): method __init__ (line 134) | def __init__( method enable_sequential_cpu_offload (line 182) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 207) | def enable_model_cpu_offload(self, gpu_id=0): method remove_all_hooks (line 249) | def remove_all_hooks(self): method _text_preprocessing (line 264) | def _text_preprocessing(self, text, clean_caption=False): method _clean_caption (line 289) | def _clean_caption(self, caption): method _execution_device (line 405) | def _execution_device(self): method encode_prompt (line 424) | def encode_prompt( method run_safety_checker (line 576) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 593) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 610) | def check_inputs( method preprocess_original_image (line 720) | def preprocess_original_image(self, image: PIL.Image.Image) -> torch.T... method preprocess_image (line 757) | def preprocess_image(self, image: PIL.Image.Image, num_images_per_prom... method get_timesteps (line 789) | def get_timesteps(self, num_inference_steps, strength): method prepare_intermediate_images (line 799) | def prepare_intermediate_images( method __call__ (line 823) | def __call__( FILE: diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py function resize (line 42) | def resize(images: PIL.Image.Image, img_size: int) -> PIL.Image.Image: class IFInpaintingPipeline (line 116) | class IFInpaintingPipeline(DiffusionPipeline, LoraLoaderMixin): method __init__ (line 134) | def __init__( method enable_sequential_cpu_offload (line 175) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 200) | def enable_model_cpu_offload(self, gpu_id=0): method remove_all_hooks (line 242) | def remove_all_hooks(self): method _execution_device (line 258) | def _execution_device(self): method encode_prompt (line 277) | def encode_prompt( method run_safety_checker (line 429) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 446) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 463) | def check_inputs( method _text_preprocessing (line 573) | def _text_preprocessing(self, text, clean_caption=False): method _clean_caption (line 598) | def _clean_caption(self, caption): method preprocess_image (line 713) | def preprocess_image(self, image: PIL.Image.Image) -> torch.Tensor: method preprocess_mask_image (line 749) | def preprocess_mask_image(self, mask_image) -> torch.Tensor: method get_timesteps (line 799) | def get_timesteps(self, num_inference_steps, strength): method prepare_intermediate_images (line 808) | def prepare_intermediate_images( method __call__ (line 834) | def __call__( FILE: diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py function resize (line 43) | def resize(images: PIL.Image.Image, img_size: int) -> PIL.Image.Image: class IFInpaintingSuperResolutionPipeline (line 117) | class IFInpaintingSuperResolutionPipeline(DiffusionPipeline): method __init__ (line 136) | def __init__( method enable_sequential_cpu_offload (line 184) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 209) | def enable_model_cpu_offload(self, gpu_id=0): method remove_all_hooks (line 251) | def remove_all_hooks(self): method _text_preprocessing (line 266) | def _text_preprocessing(self, text, clean_caption=False): method _clean_caption (line 291) | def _clean_caption(self, caption): method _execution_device (line 407) | def _execution_device(self): method encode_prompt (line 426) | def encode_prompt( method run_safety_checker (line 578) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 595) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 612) | def check_inputs( method preprocess_original_image (line 756) | def preprocess_original_image(self, image: PIL.Image.Image) -> torch.T... method preprocess_image (line 793) | def preprocess_image(self, image: PIL.Image.Image, num_images_per_prom... method preprocess_mask_image (line 825) | def preprocess_mask_image(self, mask_image) -> torch.Tensor: method get_timesteps (line 875) | def get_timesteps(self, num_inference_steps, strength): method prepare_intermediate_images (line 885) | def prepare_intermediate_images( method __call__ (line 911) | def __call__( FILE: diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py class IFSuperResolutionPipeline (line 73) | class IFSuperResolutionPipeline(DiffusionPipeline): method __init__ (line 92) | def __init__( method enable_sequential_cpu_offload (line 140) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 165) | def enable_model_cpu_offload(self, gpu_id=0): method remove_all_hooks (line 207) | def remove_all_hooks(self): method _text_preprocessing (line 222) | def _text_preprocessing(self, text, clean_caption=False): method _clean_caption (line 247) | def _clean_caption(self, caption): method _execution_device (line 363) | def _execution_device(self): method encode_prompt (line 382) | def encode_prompt( method run_safety_checker (line 534) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 551) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 568) | def check_inputs( method prepare_intermediate_images (line 648) | def prepare_intermediate_images(self, batch_size, num_channels, height... method preprocess_image (line 662) | def preprocess_image(self, image, num_images_per_prompt, device): method __call__ (line 695) | def __call__( FILE: diffusers/pipelines/deepfloyd_if/safety_checker.py class IFSafetyChecker (line 12) | class IFSafetyChecker(PreTrainedModel): method __init__ (line 17) | def __init__(self, config: CLIPConfig): method forward (line 26) | def forward(self, clip_input, images, p_threshold=0.5, w_threshold=0.5): FILE: diffusers/pipelines/deepfloyd_if/watermark.py class IFWatermarker (line 12) | class IFWatermarker(ModelMixin, ConfigMixin): method __init__ (line 13) | def __init__(self): method apply_watermark (line 19) | def apply_watermark(self, images: List[PIL.Image.Image], sample_size=N... FILE: diffusers/pipelines/dit/pipeline_dit.py class DiTPipeline (line 31) | class DiTPipeline(DiffusionPipeline): method __init__ (line 45) | def __init__( method get_label_ids (line 63) | def get_label_ids(self, label: Union[str, List[str]]) -> List[int]: method __call__ (line 87) | def __call__( FILE: diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py class LDMTextToImagePipeline (line 32) | class LDMTextToImagePipeline(DiffusionPipeline): method __init__ (line 51) | def __init__( method __call__ (line 64) | def __call__( class LDMBertConfig (line 220) | class LDMBertConfig(PretrainedConfig): method __init__ (line 225) | def __init__( function _expand_mask (line 267) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class LDMBertAttention (line 282) | class LDMBertAttention(nn.Module): method __init__ (line 285) | def __init__( method _shape (line 309) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 312) | def forward( class LDMBertEncoderLayer (line 426) | class LDMBertEncoderLayer(nn.Module): method __init__ (line 427) | def __init__(self, config: LDMBertConfig): method forward (line 444) | def forward( class LDMBertPreTrainedModel (line 496) | class LDMBertPreTrainedModel(PreTrainedModel): method _init_weights (line 502) | def _init_weights(self, module): method _set_gradient_checkpointing (line 513) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 518) | def dummy_inputs(self): class LDMBertEncoder (line 528) | class LDMBertEncoder(LDMBertPreTrainedModel): method __init__ (line 538) | def __init__(self, config: LDMBertConfig): method get_input_embeddings (line 556) | def get_input_embeddings(self): method set_input_embeddings (line 559) | def set_input_embeddings(self, value): method forward (line 562) | def forward( class LDMBertModel (line 695) | class LDMBertModel(LDMBertPreTrainedModel): method __init__ (line 698) | def __init__(self, config: LDMBertConfig): method forward (line 703) | def forward( FILE: diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py function preprocess (line 22) | def preprocess(image): class LDMSuperResolutionPipeline (line 32) | class LDMSuperResolutionPipeline(DiffusionPipeline): method __init__ (line 49) | def __init__( method __call__ (line 66) | def __call__( FILE: diffusers/pipelines/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py class LDMPipeline (line 26) | class LDMPipeline(DiffusionPipeline): method __init__ (line 39) | def __init__(self, vqvae: VQModel, unet: UNet2DModel, scheduler: DDIMS... method __call__ (line 44) | def __call__( FILE: diffusers/pipelines/onnx_utils.py class OnnxRuntimeModel (line 51) | class OnnxRuntimeModel: method __init__ (line 52) | def __init__(self, model=None, **kwargs): method __call__ (line 58) | def __call__(self, **kwargs): method load_model (line 63) | def load_model(path: Union[str, Path], provider=None, sess_options=None): method _save_pretrained (line 79) | def _save_pretrained(self, save_directory: Union[str, Path], file_name... method save_pretrained (line 110) | def save_pretrained( method _from_pretrained (line 133) | def _from_pretrained( method from_pretrained (line 193) | def from_pretrained( FILE: diffusers/pipelines/paint_by_example/image_encoder.py class PaintByExampleImageEncoder (line 25) | class PaintByExampleImageEncoder(CLIPPreTrainedModel): method __init__ (line 26) | def __init__(self, config, proj_size=768): method forward (line 38) | def forward(self, pixel_values, return_uncond_vector=False): class PaintByExampleMapper (line 50) | class PaintByExampleMapper(nn.Module): method __init__ (line 51) | def __init__(self, config): method forward (line 63) | def forward(self, hidden_states): FILE: diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py function prepare_mask_and_masked_image (line 39) | def prepare_mask_and_masked_image(image, mask): class PaintByExamplePipeline (line 139) | class PaintByExamplePipeline(DiffusionPipeline): method __init__ (line 168) | def __init__( method enable_sequential_cpu_offload (line 192) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 213) | def _execution_device(self): method run_safety_checker (line 231) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 246) | def prepare_extra_step_kwargs(self, generator, eta): method decode_latents (line 264) | def decode_latents(self, latents): method check_inputs (line 278) | def check_inputs(self, image, height, width, callback_steps): method prepare_latents (line 301) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method prepare_mask_latents (line 319) | def prepare_mask_latents( method _encode_image (line 370) | def _encode_image(self, image, device, num_images_per_prompt, do_class... method __call__ (line 396) | def __call__( FILE: diffusers/pipelines/pipeline_flax_utils.py function import_flax_or_no_model (line 66) | def import_flax_or_no_model(module, class_name): class FlaxImagePipelineOutput (line 80) | class FlaxImagePipelineOutput(BaseOutput): class FlaxDiffusionPipeline (line 93) | class FlaxDiffusionPipeline(ConfigMixin): method register_modules (line 110) | def register_modules(self, **kwargs): method save_pretrained (line 143) | def save_pretrained(self, save_directory: Union[str, os.PathLike], par... method from_pretrained (line 194) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method _get_signature_keys (line 496) | def _get_signature_keys(obj): method components (line 504) | def components(self) -> Dict[str, Any]: method numpy_to_pil (line 541) | def numpy_to_pil(images): method progress_bar (line 557) | def progress_bar(self, iterable): method set_progress_bar_config (line 567) | def set_progress_bar_config(self, **kwargs): FILE: diffusers/pipelines/pipeline_utils.py class ImagePipelineOutput (line 111) | class ImagePipelineOutput(BaseOutput): class AudioPipelineOutput (line 125) | class AudioPipelineOutput(BaseOutput): function is_safetensors_compatible (line 138) | def is_safetensors_compatible(filenames, variant=None, passed_components... function variant_compatible_siblings (line 187) | def variant_compatible_siblings(filenames, variant=None) -> Union[List[o... function warn_deprecated_model_variant (line 254) | def warn_deprecated_model_variant(pretrained_model_name_or_path, use_aut... function maybe_raise_or_warn (line 276) | def maybe_raise_or_warn( function get_class_obj_and_candidates (line 308) | def get_class_obj_and_candidates(library_name, class_name, importable_cl... function _get_pipeline_class (line 325) | def _get_pipeline_class(class_obj, config, custom_pipeline=None, cache_d... function load_sub_model (line 346) | def load_sub_model( class DiffusionPipeline (line 452) | class DiffusionPipeline(ConfigMixin): method register_modules (line 472) | def register_modules(self, **kwargs): method __setattr__ (line 509) | def __setattr__(self, name: str, value: Any): method save_pretrained (line 524) | def save_pretrained( method to (line 611) | def to( method device (line 687) | def device(self) -> torch.device: method from_pretrained (line 702) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method download (line 1084) | def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.Pa... method _get_signature_keys (line 1348) | def _get_signature_keys(obj): method components (line 1356) | def components(self) -> Dict[str, Any]: method numpy_to_pil (line 1393) | def numpy_to_pil(images): method progress_bar (line 1399) | def progress_bar(self, iterable=None, total=None): method set_progress_bar_config (line 1414) | def set_progress_bar_config(self, **kwargs): method enable_xformers_memory_efficient_attention (line 1417) | def enable_xformers_memory_efficient_attention(self, attention_op: Opt... method disable_xformers_memory_efficient_attention (line 1449) | def disable_xformers_memory_efficient_attention(self): method set_use_memory_efficient_attention_xformers (line 1455) | def set_use_memory_efficient_attention_xformers( method enable_attention_slicing (line 1475) | def enable_attention_slicing(self, slice_size: Optional[Union[str, int... method disable_attention_slicing (line 1491) | def disable_attention_slicing(self): method set_attention_slice (line 1499) | def set_attention_slice(self, slice_size: Optional[int]): FILE: diffusers/pipelines/pndm/pipeline_pndm.py class PNDMPipeline (line 26) | class PNDMPipeline(DiffusionPipeline): method __init__ (line 40) | def __init__(self, unet: UNet2DModel, scheduler: PNDMScheduler): method __call__ (line 48) | def __call__( FILE: diffusers/pipelines/repaint/pipeline_repaint.py function _preprocess_image (line 32) | def _preprocess_image(image: Union[List, PIL.Image.Image, torch.Tensor]): function _preprocess_mask (line 53) | def _preprocess_mask(mask: Union[List, PIL.Image.Image, torch.Tensor]): class RePaintPipeline (line 73) | class RePaintPipeline(DiffusionPipeline): method __init__ (line 77) | def __init__(self, unet, scheduler): method __call__ (line 82) | def __call__( FILE: diffusers/pipelines/score_sde_ve/pipeline_score_sde_ve.py class ScoreSdeVePipeline (line 25) | class ScoreSdeVePipeline(DiffusionPipeline): method __init__ (line 36) | def __init__(self, unet: UNet2DModel, scheduler: ScoreSdeVeScheduler): method __call__ (line 41) | def __call__( FILE: diffusers/pipelines/semantic_stable_diffusion/__init__.py class SemanticStableDiffusionPipelineOutput (line 13) | class SemanticStableDiffusionPipelineOutput(BaseOutput): FILE: diffusers/pipelines/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py class SemanticStableDiffusionPipeline (line 63) | class SemanticStableDiffusionPipeline(DiffusionPipeline): method __init__ (line 95) | def __init__( method run_safety_checker (line 138) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 153) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 167) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 185) | def check_inputs( method prepare_latents (line 233) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 251) | def __call__( FILE: diffusers/pipelines/spectrogram_diffusion/continous_encoder.py class SpectrogramContEncoder (line 29) | class SpectrogramContEncoder(ModelMixin, ConfigMixin, ModuleUtilsMixin): method __init__ (line 31) | def __init__( method forward (line 71) | def forward(self, encoder_inputs, encoder_inputs_mask): FILE: diffusers/pipelines/spectrogram_diffusion/midi_utils.py class NoteRepresentationConfig (line 84) | class NoteRepresentationConfig: class NoteEventData (line 92) | class NoteEventData: class NoteEncodingState (line 101) | class NoteEncodingState: class EventRange (line 109) | class EventRange: class Event (line 116) | class Event: class Tokenizer (line 121) | class Tokenizer: method __init__ (line 122) | def __init__(self, regular_ids: int): method encode (line 127) | def encode(self, token_ids): class Codec (line 145) | class Codec: method __init__ (line 156) | def __init__(self, max_shift_steps: int, steps_per_second: float, even... method num_classes (line 172) | def num_classes(self) -> int: method is_shift_event_index (line 178) | def is_shift_event_index(self, index: int) -> bool: method max_shift_steps (line 182) | def max_shift_steps(self) -> int: method encode_event (line 185) | def encode_event(self, event: Event) -> int: method event_type_range (line 200) | def event_type_range(self, event_type: str) -> Tuple[int, int]: method decode_event_index (line 210) | def decode_event_index(self, index: int) -> Event: class ProgramGranularity (line 222) | class ProgramGranularity: function drop_programs (line 228) | def drop_programs(tokens, codec: Codec): function programs_to_midi_classes (line 234) | def programs_to_midi_classes(tokens, codec): function frame (line 254) | def frame(signal, frame_length, frame_step, pad_end=False, pad_value=0, ... function program_to_slakh_program (line 272) | def program_to_slakh_program(program): function audio_to_frames (line 279) | def audio_to_frames( function note_sequence_to_onsets_and_offsets_and_programs (line 302) | def note_sequence_to_onsets_and_offsets_and_programs( function num_velocity_bins_from_codec (line 332) | def num_velocity_bins_from_codec(codec: Codec): function segment (line 339) | def segment(a, n): function velocity_to_bin (line 343) | def velocity_to_bin(velocity, num_velocity_bins): function note_event_data_to_events (line 350) | def note_event_data_to_events( function note_encoding_state_to_events (line 382) | def note_encoding_state_to_events(state: NoteEncodingState) -> Sequence[... function encode_and_index_events (line 392) | def encode_and_index_events( function extract_sequence_with_indices (line 498) | def extract_sequence_with_indices(features, state_events_end_token=None,... function map_midi_programs (line 524) | def map_midi_programs( function run_length_encode_shifts_fn (line 534) | def run_length_encode_shifts_fn( function note_representation_processor_chain (line 604) | def note_representation_processor_chain(features, codec: Codec, note_rep... class MidiProcessor (line 619) | class MidiProcessor: method __init__ (line 620) | def __init__(self): method __call__ (line 635) | def __call__(self, midi: Union[bytes, os.PathLike, str]): FILE: diffusers/pipelines/spectrogram_diffusion/notes_encoder.py class SpectrogramNotesEncoder (line 25) | class SpectrogramNotesEncoder(ModelMixin, ConfigMixin, ModuleUtilsMixin): method __init__ (line 27) | def __init__( method forward (line 69) | def forward(self, encoder_input_tokens, encoder_inputs_mask): FILE: diffusers/pipelines/spectrogram_diffusion/pipeline_spectrogram_diffusion.py class SpectrogramDiffusionPipeline (line 40) | class SpectrogramDiffusionPipeline(DiffusionPipeline): method __init__ (line 43) | def __init__( method scale_features (line 66) | def scale_features(self, features, output_range=(-1.0, 1.0), clip=False): method scale_to_features (line 76) | def scale_to_features(self, outputs, input_range=(-1.0, 1.0), clip=Fal... method encode (line 85) | def encode(self, input_tokens, continuous_inputs, continuous_mask): method decode (line 97) | def decode(self, encodings_and_masks, input_tokens, noise_time): method __call__ (line 113) | def __call__( FILE: diffusers/pipelines/stable_diffusion/__init__.py class StableDiffusionPipelineOutput (line 22) | class StableDiffusionPipelineOutput(BaseOutput): class FlaxStableDiffusionPipelineOutput (line 115) | class FlaxStableDiffusionPipelineOutput(BaseOutput): FILE: diffusers/pipelines/stable_diffusion/convert_from_ckpt.py function shave_segments (line 63) | def shave_segments(path, n_shave_prefix_segments=1): function renew_resnet_paths (line 73) | def renew_resnet_paths(old_list, n_shave_prefix_segments=0): function renew_vae_resnet_paths (line 95) | def renew_vae_resnet_paths(old_list, n_shave_prefix_segments=0): function renew_attention_paths (line 111) | def renew_attention_paths(old_list, n_shave_prefix_segments=0): function renew_vae_attention_paths (line 132) | def renew_vae_attention_paths(old_list, n_shave_prefix_segments=0): function assign_to_checkpoint (line 162) | def assign_to_checkpoint( function conv_attn_to_linear (line 217) | def conv_attn_to_linear(checkpoint): function create_unet_diffusers_config (line 229) | def create_unet_diffusers_config(original_config, image_size: int, contr... function create_vae_diffusers_config (line 298) | def create_vae_diffusers_config(original_config, image_size: int): function create_diffusers_schedular (line 322) | def create_diffusers_schedular(original_config): function create_ldm_bert_config (line 332) | def create_ldm_bert_config(original_config): function convert_ldm_unet_checkpoint (line 342) | def convert_ldm_unet_checkpoint(checkpoint, config, path=None, extract_e... function convert_ldm_vae_checkpoint (line 573) | def convert_ldm_vae_checkpoint(checkpoint, config): function convert_ldm_bert_checkpoint (line 680) | def convert_ldm_bert_checkpoint(checkpoint, config): function convert_ldm_clip_checkpoint (line 730) | def convert_ldm_clip_checkpoint(checkpoint): function convert_paint_by_example_checkpoint (line 770) | def convert_paint_by_example_checkpoint(checkpoint): function convert_open_clip_checkpoint (line 837) | def convert_open_clip_checkpoint(checkpoint): function stable_unclip_image_encoder (line 880) | def stable_unclip_image_encoder(original_config): function stable_unclip_image_noising_components (line 913) | def stable_unclip_image_noising_components( function convert_controlnet_checkpoint (line 958) | def convert_controlnet_checkpoint( function download_from_original_stable_diffusion_ckpt (line 977) | def download_from_original_stable_diffusion_ckpt( function download_controlnet_from_original_ckpt (line 1335) | def download_controlnet_from_original_ckpt( FILE: diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py function preprocess (line 42) | def preprocess(image): function posterior_sample (line 63) | def posterior_sample(scheduler, latents, timestep, clean_latents, genera... function compute_noise (line 90) | def compute_noise(scheduler, prev_latents, latents, timestep, noise_pred... class CycleDiffusionPipeline (line 124) | class CycleDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMi... method __init__ (line 153) | def __init__( method enable_sequential_cpu_offload (line 230) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 256) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 286) | def _execution_device(self): method _encode_prompt (line 304) | def _encode_prompt( method check_inputs (line 451) | def check_inputs( method prepare_extra_step_kwargs (line 492) | def prepare_extra_step_kwargs(self, generator, eta): method run_safety_checker (line 510) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 525) | def decode_latents(self, latents): method get_timesteps (line 539) | def get_timesteps(self, num_inference_steps, strength, device): method prepare_latents (line 548) | def prepare_latents(self, image, timestep, batch_size, num_images_per_... method __call__ (line 598) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py class FlaxStableDiffusionPipeline (line 81) | class FlaxStableDiffusionPipeline(FlaxDiffusionPipeline): method __init__ (line 110) | def __init__( method prepare_inputs (line 168) | def prepare_inputs(self, prompt: Union[str, List[str]]): method _get_has_nsfw_concepts (line 181) | def _get_has_nsfw_concepts(self, features, params): method _run_safety_checker (line 185) | def _run_safety_checker(self, images, safety_model_params, jit=False): method _generate (line 215) | def _generate( method __call__ (line 312) | def __call__( function _p_generate (line 436) | def _p_generate( function _p_get_has_nsfw_concepts (line 462) | def _p_get_has_nsfw_concepts(pipe, features, params): function unshard (line 466) | def unshard(x: jnp.ndarray): FILE: diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_img2img.py class FlaxStableDiffusionImg2ImgPipeline (line 105) | class FlaxStableDiffusionImg2ImgPipeline(FlaxDiffusionPipeline): method __init__ (line 134) | def __init__( method prepare_inputs (line 171) | def prepare_inputs(self, prompt: Union[str, List[str]], image: Union[I... method _get_has_nsfw_concepts (line 192) | def _get_has_nsfw_concepts(self, features, params): method _run_safety_checker (line 196) | def _run_safety_checker(self, images, safety_model_params, jit=False): method get_timestep_start (line 226) | def get_timestep_start(self, num_inference_steps, strength): method _generate (line 234) | def _generate( method __call__ (line 339) | def __call__( function _p_generate (line 480) | def _p_generate( function _p_get_has_nsfw_concepts (line 510) | def _p_get_has_nsfw_concepts(pipe, features, params): function unshard (line 514) | def unshard(x: jnp.ndarray): function preprocess (line 521) | def preprocess(image, dtype): FILE: diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py class FlaxStableDiffusionInpaintPipeline (line 102) | class FlaxStableDiffusionInpaintPipeline(FlaxDiffusionPipeline): method __init__ (line 131) | def __init__( method prepare_inputs (line 189) | def prepare_inputs( method _get_has_nsfw_concepts (line 228) | def _get_has_nsfw_concepts(self, features, params): method _run_safety_checker (line 232) | def _run_safety_checker(self, images, safety_model_params, jit=False): method _generate (line 262) | def _generate( method __call__ (line 390) | def __call__( function _p_generate (line 523) | def _p_generate( function _p_get_has_nsfw_concepts (line 553) | def _p_get_has_nsfw_concepts(pipe, features, params): function unshard (line 557) | def unshard(x: jnp.ndarray): function preprocess_image (line 564) | def preprocess_image(image, dtype): function preprocess_mask (line 573) | def preprocess_mask(mask, dtype): FILE: diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py class OnnxStableDiffusionPipeline (line 33) | class OnnxStableDiffusionPipeline(DiffusionPipeline): method __init__ (line 45) | def __init__( method _encode_prompt (line 114) | def _encode_prompt( method check_inputs (line 217) | def check_inputs( method __call__ (line 264) | def __call__( class StableDiffusionOnnxPipeline (line 462) | class StableDiffusionOnnxPipeline(OnnxStableDiffusionPipeline): method __init__ (line 463) | def __init__( FILE: diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py function preprocess (line 35) | def preprocess(image): class OnnxStableDiffusionImg2ImgPipeline (line 56) | class OnnxStableDiffusionImg2ImgPipeline(DiffusionPipeline): method __init__ (line 94) | def __init__( method _encode_prompt (line 164) | def _encode_prompt( method check_inputs (line 267) | def check_inputs( method __call__ (line 309) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py function prepare_mask_and_masked_image (line 38) | def prepare_mask_and_masked_image(image, mask, latents_shape): class OnnxStableDiffusionInpaintPipeline (line 56) | class OnnxStableDiffusionInpaintPipeline(DiffusionPipeline): method __init__ (line 94) | def __init__( method _encode_prompt (line 165) | def _encode_prompt( method check_inputs (line 269) | def check_inputs( method __call__ (line 317) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint_legacy.py function preprocess (line 20) | def preprocess(image): function preprocess_mask (line 29) | def preprocess_mask(mask, scale_factor=8): class OnnxStableDiffusionInpaintPipelineLegacy (line 41) | class OnnxStableDiffusionInpaintPipelineLegacy(DiffusionPipeline): method __init__ (line 80) | def __init__( method _encode_prompt (line 150) | def _encode_prompt( method check_inputs (line 253) | def check_inputs( method __call__ (line 295) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py function preprocess (line 26) | def preprocess(image): class OnnxStableDiffusionUpscalePipeline (line 48) | class OnnxStableDiffusionUpscalePipeline(StableDiffusionUpscalePipeline): method __init__ (line 49) | def __init__( method __call__ (line 72) | def __call__( method decode_latents (line 281) | def decode_latents(self, latents): method _encode_prompt (line 288) | def _encode_prompt( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py class StableDiffusionPipeline (line 58) | class StableDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderM... method __init__ (line 95) | def __init__( method enable_vae_slicing (line 185) | def enable_vae_slicing(self): method disable_vae_slicing (line 194) | def disable_vae_slicing(self): method enable_vae_tiling (line 201) | def enable_vae_tiling(self): method disable_vae_tiling (line 210) | def disable_vae_tiling(self): method enable_sequential_cpu_offload (line 217) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 242) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 271) | def _execution_device(self): method _encode_prompt (line 288) | def _encode_prompt( method run_safety_checker (line 434) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 448) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 461) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 478) | def check_inputs( method prepare_latents (line 525) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 544) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py class AttentionStore (line 74) | class AttentionStore: method get_empty_store (line 76) | def get_empty_store(): method __call__ (line 79) | def __call__(self, attn, is_cross: bool, place_in_unet: str): method between_steps (line 89) | def between_steps(self): method get_average_attention (line 93) | def get_average_attention(self): method aggregate_attention (line 97) | def aggregate_attention(self, from_where: List[str]) -> torch.Tensor: method reset (line 109) | def reset(self): method __init__ (line 114) | def __init__(self, attn_res): class AttendExciteAttnProcessor (line 127) | class AttendExciteAttnProcessor: method __init__ (line 128) | def __init__(self, attnstore, place_in_unet): method __call__ (line 133) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class StableDiffusionAttendAndExcitePipeline (line 165) | class StableDiffusionAttendAndExcitePipeline(DiffusionPipeline, TextualI... method __init__ (line 194) | def __init__( method enable_vae_slicing (line 237) | def enable_vae_slicing(self): method disable_vae_slicing (line 247) | def disable_vae_slicing(self): method enable_sequential_cpu_offload (line 255) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 282) | def _execution_device(self): method _encode_prompt (line 300) | def _encode_prompt( method run_safety_checker (line 447) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 462) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 476) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 493) | def check_inputs( method prepare_latents (line 567) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _compute_max_attention_per_index (line 585) | def _compute_max_attention_per_index( method _aggregate_and_get_max_attention_per_token (line 607) | def _aggregate_and_get_max_attention_per_token( method _compute_loss (line 622) | def _compute_loss(max_attention_per_index: List[torch.Tensor]) -> torc... method _update_latent (line 629) | def _update_latent(latents: torch.Tensor, loss: torch.Tensor, step_siz... method _perform_iterative_refinement_step (line 635) | def _perform_iterative_refinement_step( method register_attention_control (line 689) | def register_attention_control(self): method get_indices (line 708) | def get_indices(self, prompt: str) -> Dict[str, int]: method __call__ (line 716) | def __call__( class GaussianSmoothing (line 1007) | class GaussianSmoothing(torch.nn.Module): method __init__ (line 1020) | def __init__( method forward (line 1061) | def forward(self, input): FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py function preprocess (line 39) | def preprocess(image): class StableDiffusionDepth2ImgPipeline (line 60) | class StableDiffusionDepth2ImgPipeline(DiffusionPipeline, TextualInversi... method __init__ (line 90) | def __init__( method enable_sequential_cpu_offload (line 135) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 154) | def _execution_device(self): method _encode_prompt (line 172) | def _encode_prompt( method run_safety_checker (line 319) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 334) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 348) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 366) | def check_inputs( method get_timesteps (line 407) | def get_timesteps(self, num_inference_steps, strength, device): method prepare_latents (line 417) | def prepare_latents(self, image, timestep, batch_size, num_images_per_... method prepare_depth_map (line 469) | def prepare_depth_map(self, image, depth_map, batch_size, do_classifie... method __call__ (line 512) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_diffedit.py class DiffEditInversionPipelineOutput (line 50) | class DiffEditInversionPipelineOutput(BaseOutput): function auto_corr_loss (line 140) | def auto_corr_loss(hidden_states, generator=None): function kl_divergence (line 156) | def kl_divergence(hidden_states): function preprocess (line 161) | def preprocess(image): function preprocess_mask (line 182) | def preprocess_mask(mask, batch_size: int = 1): class StableDiffusionDiffEditPipeline (line 235) | class StableDiffusionDiffEditPipeline(DiffusionPipeline, TextualInversio... method __init__ (line 272) | def __init__( method enable_vae_slicing (line 366) | def enable_vae_slicing(self): method disable_vae_slicing (line 376) | def disable_vae_slicing(self): method enable_vae_tiling (line 384) | def enable_vae_tiling(self): method disable_vae_tiling (line 394) | def disable_vae_tiling(self): method enable_sequential_cpu_offload (line 402) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 428) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 458) | def _execution_device(self): method _encode_prompt (line 476) | def _encode_prompt( method run_safety_checker (line 623) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 638) | def prepare_extra_step_kwargs(self, generator, eta): method decode_latents (line 656) | def decode_latents(self, latents): method check_inputs (line 669) | def check_inputs( method check_source_inputs (line 717) | def check_source_inputs( method get_timesteps (line 753) | def get_timesteps(self, num_inference_steps, strength, device): method get_inverse_timesteps (line 762) | def get_inverse_timesteps(self, num_inference_steps, strength, device): method prepare_latents (line 776) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method prepare_image_latents (line 794) | def prepare_image_latents(self, image, batch_size, dtype, device, gene... method get_epsilon (line 837) | def get_epsilon(self, model_output: torch.Tensor, sample: torch.Tensor... method generate_mask (line 855) | def generate_mask( method invert (line 1077) | def invert( method __call__ (line 1315) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py class StableDiffusionImageVariationPipeline (line 37) | class StableDiffusionImageVariationPipeline(DiffusionPipeline): method __init__ (line 65) | def __init__( method enable_sequential_cpu_offload (line 126) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 145) | def _execution_device(self): method _encode_image (line 162) | def _encode_image(self, image, device, num_images_per_prompt, do_class... method run_safety_checker (line 188) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 203) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 217) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 234) | def check_inputs(self, image, height, width, callback_steps): method prepare_latents (line 257) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 275) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py function preprocess (line 75) | def preprocess(image): class StableDiffusionImg2ImgPipeline (line 96) | class StableDiffusionImg2ImgPipeline(DiffusionPipeline, TextualInversion... method __init__ (line 133) | def __init__( method enable_sequential_cpu_offload (line 224) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 250) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 280) | def _execution_device(self): method _encode_prompt (line 298) | def _encode_prompt( method run_safety_checker (line 444) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 458) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 472) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 489) | def check_inputs( method get_timesteps (line 529) | def get_timesteps(self, num_inference_steps, strength, device): method prepare_latents (line 538) | def prepare_latents(self, image, timestep, batch_size, num_images_per_... method __call__ (line 592) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py function prepare_mask_and_masked_image (line 39) | def prepare_mask_and_masked_image(image, mask, height, width, return_ima... class StableDiffusionInpaintPipeline (line 156) | class StableDiffusionInpaintPipeline(DiffusionPipeline, TextualInversion... method __init__ (line 192) | def __init__( method enable_sequential_cpu_offload (line 292) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 318) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 348) | def _execution_device(self): method _encode_prompt (line 366) | def _encode_prompt( method run_safety_checker (line 513) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 528) | def prepare_extra_step_kwargs(self, generator, eta): method decode_latents (line 546) | def decode_latents(self, latents): method check_inputs (line 559) | def check_inputs( method prepare_latents (line 610) | def prepare_latents( method prepare_mask_latents (line 664) | def prepare_mask_latents( method get_timesteps (line 716) | def get_timesteps(self, num_inference_steps, strength, device): method __call__ (line 726) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint_legacy.py function preprocess_image (line 46) | def preprocess_image(image, batch_size): function preprocess_mask (line 56) | def preprocess_mask(mask, batch_size, scale_factor=8): class StableDiffusionInpaintPipelineLegacy (line 87) | class StableDiffusionInpaintPipelineLegacy( method __init__ (line 127) | def __init__( method enable_sequential_cpu_offload (line 218) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 244) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 274) | def _execution_device(self): method _encode_prompt (line 292) | def _encode_prompt( method run_safety_checker (line 439) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 454) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 468) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 486) | def check_inputs( method get_timesteps (line 527) | def get_timesteps(self, num_inference_steps, strength, device): method prepare_latents (line 536) | def prepare_latents(self, image, timestep, num_images_per_prompt, dtyp... method __call__ (line 553) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py function preprocess (line 45) | def preprocess(image): class StableDiffusionInstructPix2PixPipeline (line 66) | class StableDiffusionInstructPix2PixPipeline(DiffusionPipeline, TextualI... method __init__ (line 102) | def __init__( method __call__ (line 145) | def __call__( method enable_sequential_cpu_offload (line 416) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 442) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 472) | def _execution_device(self): method _encode_prompt (line 489) | def _encode_prompt( method run_safety_checker (line 637) | def run_safety_checker(self, image, device, dtype): method prepare_extra_step_kwargs (line 652) | def prepare_extra_step_kwargs(self, generator, eta): method decode_latents (line 670) | def decode_latents(self, latents): method check_inputs (line 683) | def check_inputs( method prepare_latents (line 721) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method prepare_image_latents (line 738) | def prepare_image_latents( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py class ModelWrapper (line 34) | class ModelWrapper: method __init__ (line 35) | def __init__(self, model, alphas_cumprod): method apply_model (line 39) | def apply_model(self, *args, **kwargs): class StableDiffusionKDiffusionPipeline (line 48) | class StableDiffusionKDiffusionPipeline(DiffusionPipeline, TextualInvers... method __init__ (line 83) | def __init__( method set_scheduler (line 124) | def set_scheduler(self, scheduler_type: str): method enable_sequential_cpu_offload (line 130) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 156) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 186) | def _execution_device(self): method _encode_prompt (line 204) | def _encode_prompt( method run_safety_checker (line 351) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 366) | def decode_latents(self, latents): method check_inputs (line 380) | def check_inputs( method prepare_latents (line 427) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 440) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py function preprocess (line 35) | def preprocess(image): class StableDiffusionLatentUpscalePipeline (line 56) | class StableDiffusionLatentUpscalePipeline(DiffusionPipeline): method __init__ (line 79) | def __init__( method enable_sequential_cpu_offload (line 99) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 118) | def _execution_device(self): method _encode_prompt (line 135) | def _encode_prompt(self, prompt, device, do_classifier_free_guidance, ... method decode_latents (line 226) | def decode_latents(self, latents): method check_inputs (line 239) | def check_inputs(self, prompt, image, callback_steps): method prepare_latents (line 277) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 291) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_model_editing.py class StableDiffusionModelEditingPipeline (line 58) | class StableDiffusionModelEditingPipeline(DiffusionPipeline, TextualInve... method __init__ (line 90) | def __init__( method enable_vae_slicing (line 168) | def enable_vae_slicing(self): method disable_vae_slicing (line 178) | def disable_vae_slicing(self): method enable_sequential_cpu_offload (line 186) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 213) | def _execution_device(self): method _encode_prompt (line 231) | def _encode_prompt( method run_safety_checker (line 378) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 393) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 407) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 425) | def check_inputs( method prepare_latents (line 473) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method edit_model (line 491) | def edit_model( method __call__ (line 609) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_panorama.py class StableDiffusionPanoramaPipeline (line 53) | class StableDiffusionPanoramaPipeline(DiffusionPipeline, TextualInversio... method __init__ (line 86) | def __init__( method enable_vae_slicing (line 132) | def enable_vae_slicing(self): method disable_vae_slicing (line 142) | def disable_vae_slicing(self): method enable_sequential_cpu_offload (line 150) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 177) | def _execution_device(self): method _encode_prompt (line 195) | def _encode_prompt( method run_safety_checker (line 342) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 357) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 371) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 389) | def check_inputs( method prepare_latents (line 437) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method get_views (line 454) | def get_views(self, panorama_height, panorama_width, window_size=64, s... method __call__ (line 472) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_pix2pix_zero.py class Pix2PixInversionPipelineOutput (line 57) | class Pix2PixInversionPipelineOutput(BaseOutput, TextualInversionLoaderM... function preprocess (line 179) | def preprocess(image): function prepare_unet (line 200) | def prepare_unet(unet: UNet2DConditionModel): class Pix2PixZeroL2Loss (line 217) | class Pix2PixZeroL2Loss: method __init__ (line 218) | def __init__(self): method compute_loss (line 221) | def compute_loss(self, predictions, targets): class Pix2PixZeroAttnProcessor (line 225) | class Pix2PixZeroAttnProcessor: method __init__ (line 229) | def __init__(self, is_pix2pix_zero=False): method __call__ (line 234) | def __call__( class StableDiffusionPix2PixZeroPipeline (line 280) | class StableDiffusionPix2PixZeroPipeline(DiffusionPipeline): method __init__ (line 318) | def __init__( method enable_sequential_cpu_offload (line 367) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 392) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 418) | def _execution_device(self): method _encode_prompt (line 436) | def _encode_prompt( method run_safety_checker (line 583) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 598) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 612) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 629) | def check_inputs( method prepare_latents (line 661) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method generate_caption (line 679) | def generate_caption(self, images): method construct_direction (line 698) | def construct_direction(self, embs_source: torch.Tensor, embs_target: ... method get_embeds (line 703) | def get_embeds(self, prompt: List[str], batch_size: int = 16) -> torch... method prepare_image_latents (line 722) | def prepare_image_latents(self, image, batch_size, dtype, device, gene... method get_epsilon (line 765) | def get_epsilon(self, model_output: torch.Tensor, sample: torch.Tensor... method auto_corr_loss (line 782) | def auto_corr_loss(self, hidden_states, generator=None): method kl_divergence (line 797) | def kl_divergence(self, hidden_states): method __call__ (line 804) | def __call__( method invert (line 1085) | def invert( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_sag.py class CrossAttnStoreProcessor (line 53) | class CrossAttnStoreProcessor: method __init__ (line 54) | def __init__(self): method __call__ (line 57) | def __call__( class StableDiffusionSAGPipeline (line 93) | class StableDiffusionSAGPipeline(DiffusionPipeline, TextualInversionLoad... method __init__ (line 122) | def __init__( method enable_vae_slicing (line 149) | def enable_vae_slicing(self): method disable_vae_slicing (line 159) | def disable_vae_slicing(self): method enable_sequential_cpu_offload (line 167) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 194) | def _execution_device(self): method _encode_prompt (line 212) | def _encode_prompt( method run_safety_checker (line 359) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 374) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 388) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 406) | def check_inputs( method prepare_latents (line 454) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 473) | def __call__( method sag_masking (line 716) | def sag_masking(self, original_latents, attn_map, map_size, t, eps): method pred_x0 (line 746) | def pred_x0(self, sample, model_output, timestep): method pred_epsilon (line 766) | def pred_epsilon(self, sample, model_output, timestep): function gaussian_blur_2d (line 786) | def gaussian_blur_2d(img, kernel_size, sigma): FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py function preprocess (line 36) | def preprocess(image): class StableDiffusionUpscalePipeline (line 57) | class StableDiffusionUpscalePipeline(DiffusionPipeline, TextualInversion... method __init__ (line 84) | def __init__( method enable_sequential_cpu_offload (line 130) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 147) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 175) | def _execution_device(self): method run_safety_checker (line 193) | def run_safety_checker(self, image, device, dtype): method _encode_prompt (line 210) | def _encode_prompt( method prepare_extra_step_kwargs (line 357) | def prepare_extra_step_kwargs(self, generator, eta): method decode_latents (line 375) | def decode_latents(self, latents): method check_inputs (line 388) | def check_inputs( method prepare_latents (line 469) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 483) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py class StableUnCLIPPipeline (line 53) | class StableUnCLIPPipeline(DiffusionPipeline, TextualInversionLoaderMixin): method __init__ (line 106) | def __init__( method enable_vae_slicing (line 144) | def enable_vae_slicing(self): method disable_vae_slicing (line 154) | def disable_vae_slicing(self): method enable_sequential_cpu_offload (line 161) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 185) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 212) | def _execution_device(self): method _encode_prior_prompt (line 230) | def _encode_prior_prompt( method _encode_prompt (line 332) | def _encode_prompt( method decode_latents (line 479) | def decode_latents(self, latents): method prepare_prior_extra_step_kwargs (line 493) | def prepare_prior_extra_step_kwargs(self, generator, eta): method prepare_extra_step_kwargs (line 511) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 528) | def check_inputs( method prepare_latents (line 589) | def prepare_latents(self, shape, dtype, device, generator, latents, sc... method noise_image_embeddings (line 600) | def noise_image_embeddings( method __call__ (line 648) | def __call__( FILE: diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py class StableUnCLIPImg2ImgPipeline (line 66) | class StableUnCLIPImg2ImgPipeline(DiffusionPipeline, TextualInversionLoa... method __init__ (line 112) | def __init__( method enable_vae_slicing (line 146) | def enable_vae_slicing(self): method disable_vae_slicing (line 156) | def disable_vae_slicing(self): method enable_sequential_cpu_offload (line 163) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 187) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 214) | def _execution_device(self): method _encode_prompt (line 232) | def _encode_prompt( method _encode_image (line 378) | def _encode_image( method decode_latents (line 434) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 448) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 465) | def check_inputs( method prepare_latents (line 549) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method noise_image_embeddings (line 567) | def noise_image_embeddings( method __call__ (line 615) | def __call__( FILE: diffusers/pipelines/stable_diffusion/safety_checker.py function cosine_distance (line 26) | def cosine_distance(image_embeds, text_embeds): class StableDiffusionSafetyChecker (line 32) | class StableDiffusionSafetyChecker(PreTrainedModel): method __init__ (line 37) | def __init__(self, config: CLIPConfig): method forward (line 50) | def forward(self, clip_input, images): method forward_onnx (line 102) | def forward_onnx(self, clip_input: torch.FloatTensor, images: torch.Fl... FILE: diffusers/pipelines/stable_diffusion/safety_checker_flax.py function jax_cosine_distance (line 25) | def jax_cosine_distance(emb_1, emb_2, eps=1e-12): class FlaxStableDiffusionSafetyCheckerModule (line 31) | class FlaxStableDiffusionSafetyCheckerModule(nn.Module): method setup (line 35) | def setup(self): method __call__ (line 47) | def __call__(self, clip_input): class FlaxStableDiffusionSafetyChecker (line 71) | class FlaxStableDiffusionSafetyChecker(FlaxPreTrainedModel): method __init__ (line 76) | def __init__( method init_weights (line 90) | def init_weights(self, rng: jax.random.KeyArray, input_shape: Tuple, p... method __call__ (line 101) | def __call__( FILE: diffusers/pipelines/stable_diffusion/stable_unclip_image_normalizer.py class StableUnCLIPImageNormalizer (line 24) | class StableUnCLIPImageNormalizer(ModelMixin, ConfigMixin): method __init__ (line 33) | def __init__( method to (line 42) | def to( method scale (line 51) | def scale(self, embeds): method unscale (line 55) | def unscale(self, embeds): FILE: diffusers/pipelines/stable_diffusion_safe/__init__.py class SafetyConfig (line 13) | class SafetyConfig(object): class StableDiffusionSafePipelineOutput (line 45) | class StableDiffusionSafePipelineOutput(BaseOutput): FILE: diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py class StableDiffusionPipelineSafe (line 22) | class StableDiffusionPipelineSafe(DiffusionPipeline): method __init__ (line 54) | def __init__( method safety_concept (line 150) | def safety_concept(self): method safety_concept (line 160) | def safety_concept(self, concept): method enable_sequential_cpu_offload (line 170) | def enable_sequential_cpu_offload(self): method _execution_device (line 189) | def _execution_device(self): method _encode_prompt (line 206) | def _encode_prompt( method run_safety_checker (line 341) | def run_safety_checker(self, image, device, dtype, enable_safety_guida... method decode_latents (line 365) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 379) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 397) | def check_inputs( method prepare_latents (line 445) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method perform_safety_guidance (line 462) | def perform_safety_guidance( method __call__ (line 505) | def __call__( FILE: diffusers/pipelines/stable_diffusion_safe/safety_checker.py function cosine_distance (line 25) | def cosine_distance(image_embeds, text_embeds): class SafeStableDiffusionSafetyChecker (line 31) | class SafeStableDiffusionSafetyChecker(PreTrainedModel): method __init__ (line 36) | def __init__(self, config: CLIPConfig): method forward (line 49) | def forward(self, clip_input, images): method forward_onnx (line 88) | def forward_onnx(self, clip_input: torch.FloatTensor, images: torch.Fl... FILE: diffusers/pipelines/stochastic_karras_ve/pipeline_stochastic_karras_ve.py class KarrasVePipeline (line 25) | class KarrasVePipeline(DiffusionPipeline): method __init__ (line 44) | def __init__(self, unet: UNet2DModel, scheduler: KarrasVeScheduler): method __call__ (line 49) | def __call__( FILE: diffusers/pipelines/text_to_video_synthesis/__init__.py class TextToVideoSDPipelineOutput (line 11) | class TextToVideoSDPipelineOutput(BaseOutput): FILE: diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py function tensor2vid (line 58) | def tensor2vid(video: torch.Tensor, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5,... class TextToVideoSDPipeline (line 76) | class TextToVideoSDPipeline(DiffusionPipeline, TextualInversionLoaderMix... method __init__ (line 97) | def __init__( method enable_vae_slicing (line 117) | def enable_vae_slicing(self): method disable_vae_slicing (line 127) | def disable_vae_slicing(self): method enable_vae_tiling (line 135) | def enable_vae_tiling(self): method disable_vae_tiling (line 145) | def disable_vae_tiling(self): method enable_sequential_cpu_offload (line 152) | def enable_sequential_cpu_offload(self, gpu_id=0): method enable_model_cpu_offload (line 173) | def enable_model_cpu_offload(self, gpu_id=0): method _execution_device (line 200) | def _execution_device(self): method _encode_prompt (line 218) | def _encode_prompt( method decode_latents (line 364) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 388) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 406) | def check_inputs( method prepare_latents (line 453) | def prepare_latents( method __call__ (line 480) | def __call__( FILE: diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py function rearrange_0 (line 18) | def rearrange_0(tensor, f): function rearrange_1 (line 24) | def rearrange_1(tensor): function rearrange_3 (line 29) | def rearrange_3(tensor, f): function rearrange_4 (line 34) | def rearrange_4(tensor): class CrossFrameAttnProcessor (line 39) | class CrossFrameAttnProcessor: method __init__ (line 49) | def __init__(self, batch_size=2): method __call__ (line 52) | def __call__(self, attn, hidden_states, encoder_hidden_states=None, at... class TextToVideoPipelineOutput (line 99) | class TextToVideoPipelineOutput(BaseOutput): function coords_grid (line 104) | def coords_grid(batch, ht, wd, device): function warp_single_latent (line 111) | def warp_single_latent(latent, reference_flow): function create_motion_field (line 138) | def create_motion_field(motion_field_strength_x, motion_field_strength_y... function create_motion_field_and_warp_latents (line 161) | def create_motion_field_and_warp_latents(motion_field_strength_x, motion... class TextToVideoZeroPipeline (line 188) | class TextToVideoZeroPipeline(StableDiffusionPipeline): method __init__ (line 216) | def __init__( method forward_loop (line 232) | def forward_loop(self, x_t0, t0, t1, generator): method backward_loop (line 250) | def backward_loop( method __call__ (line 320) | def __call__( FILE: diffusers/pipelines/unclip/pipeline_unclip.py class UnCLIPPipeline (line 34) | class UnCLIPPipeline(DiffusionPipeline): method __init__ (line 78) | def __init__( method prepare_latents (line 106) | def prepare_latents(self, shape, dtype, device, generator, latents, sc... method _encode_prompt (line 117) | def _encode_prompt( method enable_sequential_cpu_offload (line 208) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 234) | def _execution_device(self): method __call__ (line 252) | def __call__( FILE: diffusers/pipelines/unclip/pipeline_unclip_image_variation.py class UnCLIPImageVariationPipeline (line 38) | class UnCLIPImageVariationPipeline(DiffusionPipeline): method __init__ (line 84) | def __init__( method prepare_latents (line 113) | def prepare_latents(self, shape, dtype, device, generator, latents, sc... method _encode_prompt (line 124) | def _encode_prompt(self, prompt, device, num_images_per_prompt, do_cla... method _encode_image (line 187) | def _encode_image(self, image, device, num_images_per_prompt, image_em... method enable_sequential_cpu_offload (line 201) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 227) | def _execution_device(self): method __call__ (line 245) | def __call__( FILE: diffusers/pipelines/unclip/text_proj.py class UnCLIPTextProjModel (line 22) | class UnCLIPTextProjModel(ModelMixin, ConfigMixin): method __init__ (line 31) | def __init__( method forward (line 55) | def forward(self, *, image_embeddings, prompt_embeds, text_encoder_hid... FILE: diffusers/pipelines/versatile_diffusion/modeling_text_unet.py function get_down_block (line 27) | def get_down_block( function get_up_block (line 86) | def get_up_block( class UNetFlatConditionModel (line 146) | class UNetFlatConditionModel(ModelMixin, ConfigMixin): method __init__ (line 225) | def __init__( method attn_processors (line 585) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 608) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 638) | def set_default_attn_processor(self): method set_attention_slice (line 644) | def set_attention_slice(self, slice_size): method _set_gradient_checkpointing (line 709) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 713) | def forward( class LinearMultiDim (line 902) | class LinearMultiDim(nn.Linear): method __init__ (line 903) | def __init__(self, in_features, out_features=None, second_dim=4, *args... method forward (line 912) | def forward(self, input_tensor, *args, **kwargs): class ResnetBlockFlat (line 921) | class ResnetBlockFlat(nn.Module): method __init__ (line 922) | def __init__( method forward (line 982) | def forward(self, input_tensor, temb): class DownBlockFlat (line 1016) | class DownBlockFlat(nn.Module): method __init__ (line 1017) | def __init__( method forward (line 1068) | def forward(self, hidden_states, temb=None): class CrossAttnDownBlockFlat (line 1103) | class CrossAttnDownBlockFlat(nn.Module): method __init__ (line 1104) | def __init__( method forward (line 1190) | def forward( class UpBlockFlat (line 1250) | class UpBlockFlat(nn.Module): method __init__ (line 1251) | def __init__( method forward (line 1298) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, u... class CrossAttnUpBlockFlat (line 1332) | class CrossAttnUpBlockFlat(nn.Module): method __init__ (line 1333) | def __init__( method forward (line 1415) | def forward( class UNetMidBlockFlatCrossAttn (line 1481) | class UNetMidBlockFlatCrossAttn(nn.Module): method __init__ (line 1482) | def __init__( method forward (line 1566) | def forward( class UNetMidBlockFlatSimpleCrossAttn (line 1583) | class UNetMidBlockFlatSimpleCrossAttn(nn.Module): method __init__ (line 1584) | def __init__( method forward (line 1668) | def forward( FILE: diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py class VersatileDiffusionPipeline (line 20) | class VersatileDiffusionPipeline(DiffusionPipeline): method __init__ (line 57) | def __init__( method image_variation (line 83) | def image_variation( method text_to_image (line 199) | def text_to_image( method dual_guided (line 311) | def dual_guided( FILE: diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py class VersatileDiffusionDualGuidedPipeline (line 41) | class VersatileDiffusionDualGuidedPipeline(DiffusionPipeline): method __init__ (line 70) | def __init__( method remove_unused_weights (line 101) | def remove_unused_weights(self): method _convert_to_dual_attention (line 104) | def _convert_to_dual_attention(self): method _revert_dual_attention (line 138) | def _revert_dual_attention(self): method enable_sequential_cpu_offload (line 151) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 170) | def _execution_device(self): method _encode_text_prompt (line 187) | def _encode_text_prompt(self, prompt, device, num_images_per_prompt, d... method _encode_image_prompt (line 278) | def _encode_image_prompt(self, prompt, device, num_images_per_prompt, ... method decode_latents (line 334) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 348) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 365) | def check_inputs(self, prompt, image, height, width, callback_steps): method prepare_latents (line 383) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method set_transformer_params (line 400) | def set_transformer_params(self, mix_ratio: float = 0.5, condition_typ... method __call__ (line 414) | def __call__( FILE: diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py class VersatileDiffusionImageVariationPipeline (line 35) | class VersatileDiffusionImageVariationPipeline(DiffusionPipeline): method __init__ (line 59) | def __init__( method enable_sequential_cpu_offload (line 78) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 97) | def _execution_device(self): method _encode_prompt (line 114) | def _encode_prompt(self, prompt, device, num_images_per_prompt, do_cla... method decode_latents (line 194) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 208) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 226) | def check_inputs(self, image, height, width, callback_steps): method prepare_latents (line 249) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 267) | def __call__( FILE: diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py class VersatileDiffusionTextToImagePipeline (line 34) | class VersatileDiffusionTextToImagePipeline(DiffusionPipeline): method __init__ (line 62) | def __init__( method _swap_unet_attention_blocks (line 86) | def _swap_unet_attention_blocks(self): method remove_unused_weights (line 99) | def remove_unused_weights(self): method enable_sequential_cpu_offload (line 102) | def enable_sequential_cpu_offload(self, gpu_id=0): method _execution_device (line 121) | def _execution_device(self): method _encode_prompt (line 138) | def _encode_prompt(self, prompt, device, num_images_per_prompt, do_cla... method decode_latents (line 251) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 265) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 283) | def check_inputs( method prepare_latents (line 331) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method __call__ (line 349) | def __call__( FILE: diffusers/pipelines/vq_diffusion/pipeline_vq_diffusion.py class LearnedClassifierFreeSamplingEmbeddings (line 30) | class LearnedClassifierFreeSamplingEmbeddings(ModelMixin, ConfigMixin): method __init__ (line 36) | def __init__(self, learnable: bool, hidden_size: Optional[int] = None,... class VQDiffusionPipeline (line 52) | class VQDiffusionPipeline(DiffusionPipeline): method __init__ (line 83) | def __init__( method _encode_prompt (line 103) | def _encode_prompt(self, prompt, num_images_per_prompt, do_classifier_... method __call__ (line 167) | def __call__( method truncate (line 310) | def truncate(self, log_p_x_0: torch.FloatTensor, truncation_rate: floa... FILE: diffusers/schedulers/scheduling_ddim.py class DDIMSchedulerOutput (line 32) | class DDIMSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 50) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999) -> torc... class DDIMScheduler (line 79) | class DDIMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 131) | def __init__( method scale_model_input (line 180) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method _get_variance (line 194) | def _get_variance(self, timestep, prev_timestep): method _threshold_sample (line 205) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method set_timesteps (line 239) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step (line 270) | def step( method add_noise (line 393) | def add_noise( method get_velocity (line 417) | def get_velocity( method __len__ (line 437) | def __len__(self): FILE: diffusers/schedulers/scheduling_ddim_flax.py class DDIMSchedulerState (line 36) | class DDIMSchedulerState: method create (line 46) | def create( class FlaxDDIMSchedulerOutput (line 62) | class FlaxDDIMSchedulerOutput(FlaxSchedulerOutput): class FlaxDDIMScheduler (line 66) | class FlaxDDIMScheduler(FlaxSchedulerMixin, ConfigMixin): method has_state (line 109) | def has_state(self): method __init__ (line 113) | def __init__( method create_state (line 127) | def create_state(self, common: Optional[CommonSchedulerState] = None) ... method scale_model_input (line 151) | def scale_model_input( method set_timesteps (line 165) | def set_timesteps( method _get_variance (line 187) | def _get_variance(self, state: DDIMSchedulerState, timestep, prev_time... method step (line 199) | def step( method add_noise (line 286) | def add_noise( method get_velocity (line 295) | def get_velocity( method __len__ (line 304) | def __len__(self): FILE: diffusers/schedulers/scheduling_ddim_inverse.py class DDIMSchedulerOutput (line 31) | class DDIMSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 49) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999) -> torc... class DDIMInverseScheduler (line 78) | class DDIMInverseScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 119) | def __init__( method scale_model_input (line 172) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 186) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step (line 210) | def step( method __len__ (line 267) | def __len__(self): FILE: diffusers/schedulers/scheduling_ddpm.py class DDPMSchedulerOutput (line 30) | class DDPMSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 47) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDPMScheduler (line 76) | class DDPMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 123) | def __init__( method scale_model_input (line 171) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 185) | def set_timesteps( method _get_variance (line 238) | def _get_variance(self, t, predicted_variance=None, variance_type=None): method _threshold_sample (line 278) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method step (line 312) | def step( method add_noise (line 408) | def add_noise( method get_velocity (line 431) | def get_velocity( method __len__ (line 451) | def __len__(self): method previous_timestep (line 454) | def previous_timestep(self, timestep): FILE: diffusers/schedulers/scheduling_ddpm_flax.py class DDPMSchedulerState (line 36) | class DDPMSchedulerState: method create (line 45) | def create(cls, common: CommonSchedulerState, init_noise_sigma: jnp.nd... class FlaxDDPMSchedulerOutput (line 50) | class FlaxDDPMSchedulerOutput(FlaxSchedulerOutput): class FlaxDDPMScheduler (line 54) | class FlaxDDPMScheduler(FlaxSchedulerMixin, ConfigMixin): method has_state (line 92) | def has_state(self): method __init__ (line 96) | def __init__( method create_state (line 110) | def create_state(self, common: Optional[CommonSchedulerState] = None) ... method scale_model_input (line 125) | def scale_model_input( method set_timesteps (line 139) | def set_timesteps( method _get_variance (line 162) | def _get_variance(self, state: DDPMSchedulerState, t, predicted_varian... method step (line 195) | def step( method add_noise (line 280) | def add_noise( method get_velocity (line 289) | def get_velocity( method __len__ (line 298) | def __len__(self): FILE: diffusers/schedulers/scheduling_deis_multistep.py function betas_for_alpha_bar (line 29) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DEISMultistepScheduler (line 58) | class DEISMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 113) | def __init__( method set_timesteps (line 174) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method _threshold_sample (line 206) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method convert_model_output (line 240) | def convert_model_output( method deis_first_order_update (line 278) | def deis_first_order_update( method multistep_deis_second_order_update (line 308) | def multistep_deis_second_order_update( method multistep_deis_third_order_update (line 350) | def multistep_deis_third_order_update( method step (line 407) | def step( method scale_model_input (line 475) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method add_noise (line 489) | def add_noise( method __len__ (line 512) | def __len__(self): FILE: diffusers/schedulers/scheduling_dpmsolver_multistep.py function betas_for_alpha_bar (line 29) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DPMSolverMultistepScheduler (line 58) | class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 143) | def __init__( method set_timesteps (line 208) | def set_timesteps(self, num_inference_steps: int = None, device: Union... method _threshold_sample (line 250) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method _sigma_to_t (line 285) | def _sigma_to_t(self, sigma, log_sigmas): method _convert_to_karras (line 309) | def _convert_to_karras(self, in_sigmas: torch.FloatTensor, num_inferen... method convert_model_output (line 322) | def convert_model_output( method dpm_solver_first_order_update (line 397) | def dpm_solver_first_order_update( method multistep_dpm_solver_second_order_update (line 444) | def multistep_dpm_solver_second_order_update( method multistep_dpm_solver_third_order_update (line 536) | def multistep_dpm_solver_third_order_update( method step (line 591) | def step( method scale_model_input (line 669) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method add_noise (line 683) | def add_noise( method __len__ (line 706) | def __len__(self): FILE: diffusers/schedulers/scheduling_dpmsolver_multistep_flax.py class DPMSolverMultistepSchedulerState (line 35) | class DPMSolverMultistepSchedulerState: method create (line 53) | def create( class FlaxDPMSolverMultistepSchedulerOutput (line 73) | class FlaxDPMSolverMultistepSchedulerOutput(FlaxSchedulerOutput): class FlaxDPMSolverMultistepScheduler (line 77) | class FlaxDPMSolverMultistepScheduler(FlaxSchedulerMixin, ConfigMixin): method has_state (line 147) | def has_state(self): method __init__ (line 151) | def __init__( method create_state (line 170) | def create_state(self, common: Optional[CommonSchedulerState] = None) ... method set_timesteps (line 199) | def set_timesteps( method convert_model_output (line 236) | def convert_model_output( method dpm_solver_first_order_update (line 306) | def dpm_solver_first_order_update( method multistep_dpm_solver_second_order_update (line 341) | def multistep_dpm_solver_second_order_update( method multistep_dpm_solver_third_order_update (line 401) | def multistep_dpm_solver_third_order_update( method step (line 457) | def step( method scale_model_input (line 594) | def scale_model_input( method add_noise (line 612) | def add_noise( method __len__ (line 621) | def __len__(self): FILE: diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py function betas_for_alpha_bar (line 29) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DPMSolverMultistepInverseScheduler (line 58) | class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 132) | def __init__( method set_timesteps (line 197) | def set_timesteps(self, num_inference_steps: int = None, device: Union... method _threshold_sample (line 237) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method _sigma_to_t (line 272) | def _sigma_to_t(self, sigma, log_sigmas): method _convert_to_karras (line 296) | def _convert_to_karras(self, in_sigmas: torch.FloatTensor, num_inferen... method convert_model_output (line 310) | def convert_model_output( method dpm_solver_first_order_update (line 386) | def dpm_solver_first_order_update( method multistep_dpm_solver_second_order_update (line 434) | def multistep_dpm_solver_second_order_update( method multistep_dpm_solver_third_order_update (line 527) | def multistep_dpm_solver_third_order_update( method step (line 582) | def step( method scale_model_input (line 663) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method add_noise (line 677) | def add_noise( method __len__ (line 700) | def __len__(self): FILE: diffusers/schedulers/scheduling_dpmsolver_sde.py class BatchedBrownianTree (line 26) | class BatchedBrownianTree: method __init__ (line 29) | def __init__(self, x, t0, t1, seed=None, **kwargs): method sort (line 44) | def sort(a, b): method __call__ (line 47) | def __call__(self, t0, t1): class BrownianTreeNoiseSampler (line 53) | class BrownianTreeNoiseSampler: method __init__ (line 68) | def __init__(self, x, sigma_min, sigma_max, seed=None, transform=lambd... method __call__ (line 73) | def __call__(self, sigma, sigma_next): function betas_for_alpha_bar (line 79) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999) -> torc... class DPMSolverSDEScheduler (line 108) | class DPMSolverSDEScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 142) | def __init__( method index_for_timestep (line 178) | def index_for_timestep(self, timestep, schedule_timesteps=None): method scale_model_input (line 190) | def scale_model_input( method set_timesteps (line 210) | def set_timesteps( method _second_order_timesteps (line 263) | def _second_order_timesteps(self, sigmas, log_sigmas): method _sigma_to_t (line 279) | def _sigma_to_t(self, sigma, log_sigmas): method _convert_to_karras (line 303) | def _convert_to_karras(self, in_sigmas: torch.FloatTensor) -> torch.Fl... method state_in_first_order (line 317) | def state_in_first_order(self): method step (line 320) | def step( method add_noise (line 421) | def add_noise( method __len__ (line 446) | def __len__(self): FILE: diffusers/schedulers/scheduling_dpmsolver_singlestep.py function betas_for_alpha_bar (line 28) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DPMSolverSinglestepScheduler (line 57) | class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 134) | def __init__( method get_order_list (line 197) | def get_order_list(self, num_inference_steps: int) -> List[int]: method set_timesteps (line 231) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method _threshold_sample (line 257) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method convert_model_output (line 291) | def convert_model_output( method dpm_solver_first_order_update (line 357) | def dpm_solver_first_order_update( method singlestep_dpm_solver_second_order_update (line 389) | def singlestep_dpm_solver_second_order_update( method singlestep_dpm_solver_third_order_update (line 450) | def singlestep_dpm_solver_third_order_update( method singlestep_dpm_solver_update (line 521) | def singlestep_dpm_solver_update( method step (line 558) | def step( method scale_model_input (line 614) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method add_noise (line 628) | def add_noise( method __len__ (line 651) | def __len__(self): FILE: diffusers/schedulers/scheduling_euler_ancestral_discrete.py class EulerAncestralDiscreteSchedulerOutput (line 32) | class EulerAncestralDiscreteSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 50) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999) -> torc... class EulerAncestralDiscreteScheduler (line 79) | class EulerAncestralDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 109) | def __init__( method scale_model_input (line 149) | def scale_model_input( method set_timesteps (line 170) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step (line 193) | def step( method add_noise (line 283) | def add_noise( method __len__ (line 308) | def __len__(self): FILE: diffusers/schedulers/scheduling_euler_discrete.py class EulerDiscreteSchedulerOutput (line 32) | class EulerDiscreteSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 50) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class EulerDiscreteScheduler (line 79) | class EulerDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 116) | def __init__( method scale_model_input (line 159) | def scale_model_input( method set_timesteps (line 182) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method _sigma_to_t (line 220) | def _sigma_to_t(self, sigma, log_sigmas): method _convert_to_karras (line 244) | def _convert_to_karras(self, in_sigmas: torch.FloatTensor, num_inferen... method step (line 257) | def step( method add_noise (line 356) | def add_noise( method __len__ (line 381) | def __len__(self): FILE: diffusers/schedulers/scheduling_heun_discrete.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999) -> torc... class HeunDiscreteScheduler (line 55) | class HeunDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 87) | def __init__( method index_for_timestep (line 119) | def index_for_timestep(self, timestep, schedule_timesteps=None): method scale_model_input (line 131) | def scale_model_input( method set_timesteps (line 150) | def set_timesteps( method _sigma_to_t (line 200) | def _sigma_to_t(self, sigma, log_sigmas): method _convert_to_karras (line 224) | def _convert_to_karras(self, in_sigmas: torch.FloatTensor, num_inferen... method state_in_first_order (line 238) | def state_in_first_order(self): method step (line 241) | def step( method add_noise (line 325) | def add_noise( method __len__ (line 350) | def __len__(self): FILE: diffusers/schedulers/scheduling_ipndm.py class IPNDMScheduler (line 25) | class IPNDMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 44) | def __init__( method set_timesteps (line 61) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step (line 85) | def step( method scale_model_input (line 135) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method _get_prev_sample (line 148) | def _get_prev_sample(self, sample, timestep_index, prev_timestep_index... method __len__ (line 160) | def __len__(self): FILE: diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py function betas_for_alpha_bar (line 27) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999) -> torc... class KDPM2AncestralDiscreteScheduler (line 56) | class KDPM2AncestralDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 87) | def __init__( method index_for_timestep (line 118) | def index_for_timestep(self, timestep, schedule_timesteps=None): method scale_model_input (line 130) | def scale_model_input( method set_timesteps (line 153) | def set_timesteps( method sigma_to_t (line 216) | def sigma_to_t(self, sigma): method state_in_first_order (line 240) | def state_in_first_order(self): method step (line 243) | def step( method add_noise (line 332) | def add_noise( method __len__ (line 357) | def __len__(self): FILE: diffusers/schedulers/scheduling_k_dpm_2_discrete.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999) -> torc... class KDPM2DiscreteScheduler (line 55) | class KDPM2DiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 86) | def __init__( method index_for_timestep (line 117) | def index_for_timestep(self, timestep, schedule_timesteps=None): method scale_model_input (line 129) | def scale_model_input( method set_timesteps (line 152) | def set_timesteps( method sigma_to_t (line 205) | def sigma_to_t(self, sigma): method state_in_first_order (line 229) | def state_in_first_order(self): method step (line 232) | def step( method add_noise (line 313) | def add_noise( method __len__ (line 338) | def __len__(self): FILE: diffusers/schedulers/scheduling_karras_ve.py class KarrasVeOutput (line 28) | class KarrasVeOutput(BaseOutput): class KarrasVeScheduler (line 48) | class KarrasVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 83) | def __init__( method scale_model_input (line 100) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 114) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method add_noise_to_input (line 135) | def add_noise_to_input( method step (line 156) | def step( method step_correct (line 194) | def step_correct( method add_noise (line 231) | def add_noise(self, original_samples, noise, timesteps): FILE: diffusers/schedulers/scheduling_karras_ve_flax.py class KarrasVeSchedulerState (line 29) | class KarrasVeSchedulerState: method create (line 36) | def create(cls): class FlaxKarrasVeOutput (line 41) | class FlaxKarrasVeOutput(BaseOutput): class FlaxKarrasVeScheduler (line 59) | class FlaxKarrasVeScheduler(FlaxSchedulerMixin, ConfigMixin): method has_state (line 91) | def has_state(self): method __init__ (line 95) | def __init__( method create_state (line 106) | def create_state(self): method set_timesteps (line 109) | def set_timesteps( method add_noise_to_input (line 137) | def add_noise_to_input( method step (line 163) | def step( method step_correct (line 199) | def step_correct( method add_noise (line 236) | def add_noise(self, state: KarrasVeSchedulerState, original_samples, n... FILE: diffusers/schedulers/scheduling_lms_discrete.py class LMSDiscreteSchedulerOutput (line 30) | class LMSDiscreteSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 48) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class LMSDiscreteScheduler (line 77) | class LMSDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 111) | def __init__( method scale_model_input (line 153) | def scale_model_input( method get_lms_coefficient (line 174) | def get_lms_coefficient(self, order, t, current_order): method set_timesteps (line 196) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method _sigma_to_t (line 230) | def _sigma_to_t(self, sigma, log_sigmas): method _convert_to_karras (line 254) | def _convert_to_karras(self, in_sigmas: torch.FloatTensor) -> torch.Fl... method step (line 267) | def step( method add_noise (line 338) | def add_noise( method __len__ (line 363) | def __len__(self): FILE: diffusers/schedulers/scheduling_lms_discrete_flax.py class LMSDiscreteSchedulerState (line 33) | class LMSDiscreteSchedulerState: method create (line 46) | def create( class FlaxLMSSchedulerOutput (line 53) | class FlaxLMSSchedulerOutput(FlaxSchedulerOutput): class FlaxLMSDiscreteScheduler (line 57) | class FlaxLMSDiscreteScheduler(FlaxSchedulerMixin, ConfigMixin): method has_state (line 90) | def has_state(self): method __init__ (line 94) | def __init__( method create_state (line 106) | def create_state(self, common: Optional[CommonSchedulerState] = None) ... method scale_model_input (line 123) | def scale_model_input(self, state: LMSDiscreteSchedulerState, sample: ... method get_lms_coefficient (line 145) | def get_lms_coefficient(self, state: LMSDiscreteSchedulerState, order,... method set_timesteps (line 167) | def set_timesteps( method step (line 203) | def step( method add_noise (line 268) | def add_noise( method __len__ (line 282) | def __len__(self): FILE: diffusers/schedulers/scheduling_pndm.py function betas_for_alpha_bar (line 28) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class PNDMScheduler (line 57) | class PNDMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 99) | def __init__( method set_timesteps (line 152) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step (line 192) | def step( method step_prk (line 223) | def step_prk( method step_plms (line 278) | def step_plms( method scale_model_input (line 345) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method _get_prev_sample (line 358) | def _get_prev_sample(self, sample, timestep, prev_timestep, model_outp... method add_noise (line 402) | def add_noise( method __len__ (line 425) | def __len__(self): FILE: diffusers/schedulers/scheduling_pndm_flax.py class PNDMSchedulerState (line 35) | class PNDMSchedulerState: method create (line 53) | def create( class FlaxPNDMSchedulerOutput (line 69) | class FlaxPNDMSchedulerOutput(FlaxSchedulerOutput): class FlaxPNDMScheduler (line 73) | class FlaxPNDMScheduler(FlaxSchedulerMixin, ConfigMixin): method has_state (line 119) | def has_state(self): method __init__ (line 123) | def __init__( method create_state (line 143) | def create_state(self, common: Optional[CommonSchedulerState] = None) ... method set_timesteps (line 167) | def set_timesteps(self, state: PNDMSchedulerState, num_inference_steps... method scale_model_input (line 222) | def scale_model_input( method step (line 239) | def step( method step_prk (line 294) | def step_prk( method step_plms (line 362) | def step_plms( method _get_prev_sample (line 456) | def _get_prev_sample(self, state: PNDMSchedulerState, sample, timestep... method add_noise (line 501) | def add_noise( method __len__ (line 510) | def __len__(self): FILE: diffusers/schedulers/scheduling_repaint.py class RePaintSchedulerOutput (line 28) | class RePaintSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 46) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class RePaintScheduler (line 75) | class RePaintScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 109) | def __init__( method scale_model_input (line 153) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 167) | def set_timesteps( method _get_variance (line 197) | def _get_variance(self, t): method step (line 216) | def step( method undo_step (line 303) | def undo_step(self, sample, timestep, generator=None): method add_noise (line 320) | def add_noise( method __len__ (line 328) | def __len__(self): FILE: diffusers/schedulers/scheduling_sde_ve.py class SdeVeOutput (line 29) | class SdeVeOutput(BaseOutput): class ScoreSdeVeScheduler (line 45) | class ScoreSdeVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 72) | def __init__( method scale_model_input (line 89) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 103) | def set_timesteps( method set_sigmas (line 120) | def set_sigmas( method get_adjacent_sigma (line 149) | def get_adjacent_sigma(self, timesteps, t): method step_pred (line 156) | def step_pred( method step_correct (line 219) | def step_correct( method add_noise (line 270) | def add_noise( method __len__ (line 283) | def __len__(self): FILE: diffusers/schedulers/scheduling_sde_ve_flax.py class ScoreSdeVeSchedulerState (line 29) | class ScoreSdeVeSchedulerState: method create (line 36) | def create(cls): class FlaxSdeVeOutput (line 41) | class FlaxSdeVeOutput(FlaxSchedulerOutput): class FlaxScoreSdeVeScheduler (line 59) | class FlaxScoreSdeVeScheduler(FlaxSchedulerMixin, ConfigMixin): method has_state (line 84) | def has_state(self): method __init__ (line 88) | def __init__( method create_state (line 99) | def create_state(self): method set_timesteps (line 109) | def set_timesteps( method set_sigmas (line 128) | def set_sigmas( method get_adjacent_sigma (line 163) | def get_adjacent_sigma(self, state, timesteps, t): method step_pred (line 166) | def step_pred( method step_correct (line 226) | def step_correct( method __len__ (line 278) | def __len__(self): FILE: diffusers/schedulers/scheduling_sde_vp.py class ScoreSdeVpScheduler (line 27) | class ScoreSdeVpScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 45) | def __init__(self, num_train_timesteps=2000, beta_min=0.1, beta_max=20... method set_timesteps (line 50) | def set_timesteps(self, num_inference_steps, device: Union[str, torch.... method step_pred (line 53) | def step_pred(self, score, x, t, generator=None): method __len__ (line 89) | def __len__(self): FILE: diffusers/schedulers/scheduling_unclip.py class UnCLIPSchedulerOutput (line 29) | class UnCLIPSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 47) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class UnCLIPScheduler (line 76) | class UnCLIPScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 106) | def __init__( method scale_model_input (line 133) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 147) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method _get_variance (line 164) | def _get_variance(self, t, prev_timestep=None, predicted_variance=None... method step (line 200) | def step( FILE: diffusers/schedulers/scheduling_unipc_multistep.py function betas_for_alpha_bar (line 28) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class UniPCMultistepScheduler (line 57) | class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 126) | def __init__( method set_timesteps (line 187) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method _threshold_sample (line 222) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method convert_model_output (line 256) | def convert_model_output( method multistep_uni_p_bh_update (line 307) | def multistep_uni_p_bh_update( method multistep_uni_c_bh_update (line 412) | def multistep_uni_c_bh_update( method step (line 518) | def step( method scale_model_input (line 602) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method add_noise (line 616) | def add_noise( method __len__ (line 639) | def __len__(self): FILE: diffusers/schedulers/scheduling_utils.py class KarrasDiffusionSchedulers (line 32) | class KarrasDiffusionSchedulers(Enum): class SchedulerOutput (line 50) | class SchedulerOutput(BaseOutput): class SchedulerMixin (line 63) | class SchedulerMixin: method from_pretrained (line 78) | def from_pretrained( method save_pretrained (line 149) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method compatibles (line 161) | def compatibles(self): method _get_compatibles (line 171) | def _get_compatibles(cls): FILE: diffusers/schedulers/scheduling_utils_flax.py class FlaxKarrasDiffusionSchedulers (line 34) | class FlaxKarrasDiffusionSchedulers(Enum): class FlaxSchedulerOutput (line 43) | class FlaxSchedulerOutput(BaseOutput): class FlaxSchedulerMixin (line 56) | class FlaxSchedulerMixin: method from_pretrained (line 72) | def from_pretrained( method save_pretrained (line 151) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method compatibles (line 163) | def compatibles(self): method _get_compatibles (line 173) | def _get_compatibles(cls): function broadcast_to_shape_from_left (line 182) | def broadcast_to_shape_from_left(x: jnp.ndarray, shape: Tuple[int]) -> j... function betas_for_alpha_bar (line 187) | def betas_for_alpha_bar(num_diffusion_timesteps: int, max_beta=0.999, dt... class CommonSchedulerState (line 217) | class CommonSchedulerState: method create (line 223) | def create(cls, scheduler): function get_sqrt_alpha_prod (line 257) | def get_sqrt_alpha_prod( function add_noise_common (line 273) | def add_noise_common( function get_velocity_common (line 281) | def get_velocity_common(state: CommonSchedulerState, sample: jnp.ndarray... FILE: diffusers/schedulers/scheduling_vq_diffusion.py class VQDiffusionSchedulerOutput (line 28) | class VQDiffusionSchedulerOutput(BaseOutput): function index_to_log_onehot (line 41) | def index_to_log_onehot(x: torch.LongTensor, num_classes: int) -> torch.... function gumbel_noised (line 62) | def gumbel_noised(logits: torch.FloatTensor, generator: Optional[torch.G... function alpha_schedules (line 72) | def alpha_schedules(num_diffusion_timesteps: int, alpha_cum_start=0.9999... function gamma_schedules (line 88) | def gamma_schedules(num_diffusion_timesteps: int, gamma_cum_start=0.0000... class VQDiffusionScheduler (line 106) | class VQDiffusionScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 144) | def __init__( method set_timesteps (line 190) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step (line 212) | def step( method q_posterior (line 260) | def q_posterior(self, log_p_x_0, x_t, t): method log_Q_t_transitioning_to_known_class (line 379) | def log_Q_t_transitioning_to_known_class( method apply_cumulative_transitions (line 484) | def apply_cumulative_transitions(self, q, t): FILE: diffusers/training_utils.py function enable_full_determinism (line 17) | def enable_full_determinism(seed: int): function set_seed (line 37) | def set_seed(seed: int): class EMAModel (line 51) | class EMAModel: method __init__ (line 56) | def __init__( method from_pretrained (line 138) | def from_pretrained(cls, path, model_cls) -> "EMAModel": method save_pretrained (line 147) | def save_pretrained(self, path): method get_decay (line 162) | def get_decay(self, optimization_step: int) -> float: method step (line 182) | def step(self, parameters: Iterable[torch.nn.Parameter]): method copy_to (line 220) | def copy_to(self, parameters: Iterable[torch.nn.Parameter]) -> None: method to (line 233) | def to(self, device=None, dtype=None) -> None: method state_dict (line 245) | def state_dict(self) -> dict: method store (line 264) | def store(self, parameters: Iterable[torch.nn.Parameter]) -> None: method restore (line 273) | def restore(self, parameters: Iterable[torch.nn.Parameter]) -> None: method load_state_dict (line 291) | def load_state_dict(self, state_dict: dict) -> None: FILE: diffusers/utils/__init__.py function check_min_version (line 112) | def check_min_version(min_version): FILE: diffusers/utils/accelerate_utils.py function apply_forward_hook (line 27) | def apply_forward_hook(method): FILE: diffusers/utils/deprecation_utils.py function deprecate (line 8) | def deprecate(*args, take_from: Optional[Union[Dict, Any]] = None, stand... FILE: diffusers/utils/doc_utils.py function replace_example_docstring (line 20) | def replace_example_docstring(example_docstring): FILE: diffusers/utils/dummy_flax_and_transformers_objects.py class FlaxStableDiffusionControlNetPipeline (line 5) | class FlaxStableDiffusionControlNetPipeline(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): class FlaxStableDiffusionImg2ImgPipeline (line 20) | class FlaxStableDiffusionImg2ImgPipeline(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): method from_config (line 27) | def from_config(cls, *args, **kwargs): method from_pretrained (line 31) | def from_pretrained(cls, *args, **kwargs): class FlaxStableDiffusionInpaintPipeline (line 35) | class FlaxStableDiffusionInpaintPipeline(metaclass=DummyObject): method __init__ (line 38) | def __init__(self, *args, **kwargs): method from_config (line 42) | def from_config(cls, *args, **kwargs): method from_pretrained (line 46) | def from_pretrained(cls, *args, **kwargs): class FlaxStableDiffusionPipeline (line 50) | class FlaxStableDiffusionPipeline(metaclass=DummyObject): method __init__ (line 53) | def __init__(self, *args, **kwargs): method from_config (line 57) | def from_config(cls, *args, **kwargs): method from_pretrained (line 61) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_flax_objects.py class FlaxControlNetModel (line 5) | class FlaxControlNetModel(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): class FlaxModelMixin (line 20) | class FlaxModelMixin(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): method from_config (line 27) | def from_config(cls, *args, **kwargs): method from_pretrained (line 31) | def from_pretrained(cls, *args, **kwargs): class FlaxUNet2DConditionModel (line 35) | class FlaxUNet2DConditionModel(metaclass=DummyObject): method __init__ (line 38) | def __init__(self, *args, **kwargs): method from_config (line 42) | def from_config(cls, *args, **kwargs): method from_pretrained (line 46) | def from_pretrained(cls, *args, **kwargs): class FlaxAutoencoderKL (line 50) | class FlaxAutoencoderKL(metaclass=DummyObject): method __init__ (line 53) | def __init__(self, *args, **kwargs): method from_config (line 57) | def from_config(cls, *args, **kwargs): method from_pretrained (line 61) | def from_pretrained(cls, *args, **kwargs): class FlaxDiffusionPipeline (line 65) | class FlaxDiffusionPipeline(metaclass=DummyObject): method __init__ (line 68) | def __init__(self, *args, **kwargs): method from_config (line 72) | def from_config(cls, *args, **kwargs): method from_pretrained (line 76) | def from_pretrained(cls, *args, **kwargs): class FlaxDDIMScheduler (line 80) | class FlaxDDIMScheduler(metaclass=DummyObject): method __init__ (line 83) | def __init__(self, *args, **kwargs): method from_config (line 87) | def from_config(cls, *args, **kwargs): method from_pretrained (line 91) | def from_pretrained(cls, *args, **kwargs): class FlaxDDPMScheduler (line 95) | class FlaxDDPMScheduler(metaclass=DummyObject): method __init__ (line 98) | def __init__(self, *args, **kwargs): method from_config (line 102) | def from_config(cls, *args, **kwargs): method from_pretrained (line 106) | def from_pretrained(cls, *args, **kwargs): class FlaxDPMSolverMultistepScheduler (line 110) | class FlaxDPMSolverMultistepScheduler(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): method from_config (line 117) | def from_config(cls, *args, **kwargs): method from_pretrained (line 121) | def from_pretrained(cls, *args, **kwargs): class FlaxKarrasVeScheduler (line 125) | class FlaxKarrasVeScheduler(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): method from_config (line 132) | def from_config(cls, *args, **kwargs): method from_pretrained (line 136) | def from_pretrained(cls, *args, **kwargs): class FlaxLMSDiscreteScheduler (line 140) | class FlaxLMSDiscreteScheduler(metaclass=DummyObject): method __init__ (line 143) | def __init__(self, *args, **kwargs): method from_config (line 147) | def from_config(cls, *args, **kwargs): method from_pretrained (line 151) | def from_pretrained(cls, *args, **kwargs): class FlaxPNDMScheduler (line 155) | class FlaxPNDMScheduler(metaclass=DummyObject): method __init__ (line 158) | def __init__(self, *args, **kwargs): method from_config (line 162) | def from_config(cls, *args, **kwargs): method from_pretrained (line 166) | def from_pretrained(cls, *args, **kwargs): class FlaxSchedulerMixin (line 170) | class FlaxSchedulerMixin(metaclass=DummyObject): method __init__ (line 173) | def __init__(self, *args, **kwargs): method from_config (line 177) | def from_config(cls, *args, **kwargs): method from_pretrained (line 181) | def from_pretrained(cls, *args, **kwargs): class FlaxScoreSdeVeScheduler (line 185) | class FlaxScoreSdeVeScheduler(metaclass=DummyObject): method __init__ (line 188) | def __init__(self, *args, **kwargs): method from_config (line 192) | def from_config(cls, *args, **kwargs): method from_pretrained (line 196) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_note_seq_objects.py class MidiProcessor (line 5) | class MidiProcessor(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_onnx_objects.py class OnnxRuntimeModel (line 5) | class OnnxRuntimeModel(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_pt_objects.py class AutoencoderKL (line 5) | class AutoencoderKL(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): class ControlNetModel (line 20) | class ControlNetModel(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): method from_config (line 27) | def from_config(cls, *args, **kwargs): method from_pretrained (line 31) | def from_pretrained(cls, *args, **kwargs): class ModelMixin (line 35) | class ModelMixin(metaclass=DummyObject): method __init__ (line 38) | def __init__(self, *args, **kwargs): method from_config (line 42) | def from_config(cls, *args, **kwargs): method from_pretrained (line 46) | def from_pretrained(cls, *args, **kwargs): class PriorTransformer (line 50) | class PriorTransformer(metaclass=DummyObject): method __init__ (line 53) | def __init__(self, *args, **kwargs): method from_config (line 57) | def from_config(cls, *args, **kwargs): method from_pretrained (line 61) | def from_pretrained(cls, *args, **kwargs): class T5FilmDecoder (line 65) | class T5FilmDecoder(metaclass=DummyObject): method __init__ (line 68) | def __init__(self, *args, **kwargs): method from_config (line 72) | def from_config(cls, *args, **kwargs): method from_pretrained (line 76) | def from_pretrained(cls, *args, **kwargs): class Transformer2DModel (line 80) | class Transformer2DModel(metaclass=DummyObject): method __init__ (line 83) | def __init__(self, *args, **kwargs): method from_config (line 87) | def from_config(cls, *args, **kwargs): method from_pretrained (line 91) | def from_pretrained(cls, *args, **kwargs): class UNet1DModel (line 95) | class UNet1DModel(metaclass=DummyObject): method __init__ (line 98) | def __init__(self, *args, **kwargs): method from_config (line 102) | def from_config(cls, *args, **kwargs): method from_pretrained (line 106) | def from_pretrained(cls, *args, **kwargs): class UNet2DConditionModel (line 110) | class UNet2DConditionModel(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): method from_config (line 117) | def from_config(cls, *args, **kwargs): method from_pretrained (line 121) | def from_pretrained(cls, *args, **kwargs): class UNet2DModel (line 125) | class UNet2DModel(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): method from_config (line 132) | def from_config(cls, *args, **kwargs): method from_pretrained (line 136) | def from_pretrained(cls, *args, **kwargs): class UNet3DConditionModel (line 140) | class UNet3DConditionModel(metaclass=DummyObject): method __init__ (line 143) | def __init__(self, *args, **kwargs): method from_config (line 147) | def from_config(cls, *args, **kwargs): method from_pretrained (line 151) | def from_pretrained(cls, *args, **kwargs): class VQModel (line 155) | class VQModel(metaclass=DummyObject): method __init__ (line 158) | def __init__(self, *args, **kwargs): method from_config (line 162) | def from_config(cls, *args, **kwargs): method from_pretrained (line 166) | def from_pretrained(cls, *args, **kwargs): function get_constant_schedule (line 170) | def get_constant_schedule(*args, **kwargs): function get_constant_schedule_with_warmup (line 174) | def get_constant_schedule_with_warmup(*args, **kwargs): function get_cosine_schedule_with_warmup (line 178) | def get_cosine_schedule_with_warmup(*args, **kwargs): function get_cosine_with_hard_restarts_schedule_with_warmup (line 182) | def get_cosine_with_hard_restarts_schedule_with_warmup(*args, **kwargs): function get_linear_schedule_with_warmup (line 186) | def get_linear_schedule_with_warmup(*args, **kwargs): function get_polynomial_decay_schedule_with_warmup (line 190) | def get_polynomial_decay_schedule_with_warmup(*args, **kwargs): function get_scheduler (line 194) | def get_scheduler(*args, **kwargs): class AudioPipelineOutput (line 198) | class AudioPipelineOutput(metaclass=DummyObject): method __init__ (line 201) | def __init__(self, *args, **kwargs): method from_config (line 205) | def from_config(cls, *args, **kwargs): method from_pretrained (line 209) | def from_pretrained(cls, *args, **kwargs): class DanceDiffusionPipeline (line 213) | class DanceDiffusionPipeline(metaclass=DummyObject): method __init__ (line 216) | def __init__(self, *args, **kwargs): method from_config (line 220) | def from_config(cls, *args, **kwargs): method from_pretrained (line 224) | def from_pretrained(cls, *args, **kwargs): class DDIMPipeline (line 228) | class DDIMPipeline(metaclass=DummyObject): method __init__ (line 231) | def __init__(self, *args, **kwargs): method from_config (line 235) | def from_config(cls, *args, **kwargs): method from_pretrained (line 239) | def from_pretrained(cls, *args, **kwargs): class DDPMPipeline (line 243) | class DDPMPipeline(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): method from_config (line 250) | def from_config(cls, *args, **kwargs): method from_pretrained (line 254) | def from_pretrained(cls, *args, **kwargs): class DiffusionPipeline (line 258) | class DiffusionPipeline(metaclass=DummyObject): method __init__ (line 261) | def __init__(self, *args, **kwargs): method from_config (line 265) | def from_config(cls, *args, **kwargs): method from_pretrained (line 269) | def from_pretrained(cls, *args, **kwargs): class DiTPipeline (line 273) | class DiTPipeline(metaclass=DummyObject): method __init__ (line 276) | def __init__(self, *args, **kwargs): method from_config (line 280) | def from_config(cls, *args, **kwargs): method from_pretrained (line 284) | def from_pretrained(cls, *args, **kwargs): class ImagePipelineOutput (line 288) | class ImagePipelineOutput(metaclass=DummyObject): method __init__ (line 291) | def __init__(self, *args, **kwargs): method from_config (line 295) | def from_config(cls, *args, **kwargs): method from_pretrained (line 299) | def from_pretrained(cls, *args, **kwargs): class KarrasVePipeline (line 303) | class KarrasVePipeline(metaclass=DummyObject): method __init__ (line 306) | def __init__(self, *args, **kwargs): method from_config (line 310) | def from_config(cls, *args, **kwargs): method from_pretrained (line 314) | def from_pretrained(cls, *args, **kwargs): class LDMPipeline (line 318) | class LDMPipeline(metaclass=DummyObject): method __init__ (line 321) | def __init__(self, *args, **kwargs): method from_config (line 325) | def from_config(cls, *args, **kwargs): method from_pretrained (line 329) | def from_pretrained(cls, *args, **kwargs): class LDMSuperResolutionPipeline (line 333) | class LDMSuperResolutionPipeline(metaclass=DummyObject): method __init__ (line 336) | def __init__(self, *args, **kwargs): method from_config (line 340) | def from_config(cls, *args, **kwargs): method from_pretrained (line 344) | def from_pretrained(cls, *args, **kwargs): class PNDMPipeline (line 348) | class PNDMPipeline(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): method from_config (line 355) | def from_config(cls, *args, **kwargs): method from_pretrained (line 359) | def from_pretrained(cls, *args, **kwargs): class RePaintPipeline (line 363) | class RePaintPipeline(metaclass=DummyObject): method __init__ (line 366) | def __init__(self, *args, **kwargs): method from_config (line 370) | def from_config(cls, *args, **kwargs): method from_pretrained (line 374) | def from_pretrained(cls, *args, **kwargs): class ScoreSdeVePipeline (line 378) | class ScoreSdeVePipeline(metaclass=DummyObject): method __init__ (line 381) | def __init__(self, *args, **kwargs): method from_config (line 385) | def from_config(cls, *args, **kwargs): method from_pretrained (line 389) | def from_pretrained(cls, *args, **kwargs): class DDIMInverseScheduler (line 393) | class DDIMInverseScheduler(metaclass=DummyObject): method __init__ (line 396) | def __init__(self, *args, **kwargs): method from_config (line 400) | def from_config(cls, *args, **kwargs): method from_pretrained (line 404) | def from_pretrained(cls, *args, **kwargs): class DDIMScheduler (line 408) | class DDIMScheduler(metaclass=DummyObject): method __init__ (line 411) | def __init__(self, *args, **kwargs): method from_config (line 415) | def from_config(cls, *args, **kwargs): method from_pretrained (line 419) | def from_pretrained(cls, *args, **kwargs): class DDPMScheduler (line 423) | class DDPMScheduler(metaclass=DummyObject): method __init__ (line 426) | def __init__(self, *args, **kwargs): method from_config (line 430) | def from_config(cls, *args, **kwargs): method from_pretrained (line 434) | def from_pretrained(cls, *args, **kwargs): class DEISMultistepScheduler (line 438) | class DEISMultistepScheduler(metaclass=DummyObject): method __init__ (line 441) | def __init__(self, *args, **kwargs): method from_config (line 445) | def from_config(cls, *args, **kwargs): method from_pretrained (line 449) | def from_pretrained(cls, *args, **kwargs): class DPMSolverMultistepInverseScheduler (line 453) | class DPMSolverMultistepInverseScheduler(metaclass=DummyObject): method __init__ (line 456) | def __init__(self, *args, **kwargs): method from_config (line 460) | def from_config(cls, *args, **kwargs): method from_pretrained (line 464) | def from_pretrained(cls, *args, **kwargs): class DPMSolverMultistepScheduler (line 468) | class DPMSolverMultistepScheduler(metaclass=DummyObject): method __init__ (line 471) | def __init__(self, *args, **kwargs): method from_config (line 475) | def from_config(cls, *args, **kwargs): method from_pretrained (line 479) | def from_pretrained(cls, *args, **kwargs): class DPMSolverSinglestepScheduler (line 483) | class DPMSolverSinglestepScheduler(metaclass=DummyObject): method __init__ (line 486) | def __init__(self, *args, **kwargs): method from_config (line 490) | def from_config(cls, *args, **kwargs): method from_pretrained (line 494) | def from_pretrained(cls, *args, **kwargs): class EulerAncestralDiscreteScheduler (line 498) | class EulerAncestralDiscreteScheduler(metaclass=DummyObject): method __init__ (line 501) | def __init__(self, *args, **kwargs): method from_config (line 505) | def from_config(cls, *args, **kwargs): method from_pretrained (line 509) | def from_pretrained(cls, *args, **kwargs): class EulerDiscreteScheduler (line 513) | class EulerDiscreteScheduler(metaclass=DummyObject): method __init__ (line 516) | def __init__(self, *args, **kwargs): method from_config (line 520) | def from_config(cls, *args, **kwargs): method from_pretrained (line 524) | def from_pretrained(cls, *args, **kwargs): class HeunDiscreteScheduler (line 528) | class HeunDiscreteScheduler(metaclass=DummyObject): method __init__ (line 531) | def __init__(self, *args, **kwargs): method from_config (line 535) | def from_config(cls, *args, **kwargs): method from_pretrained (line 539) | def from_pretrained(cls, *args, **kwargs): class IPNDMScheduler (line 543) | class IPNDMScheduler(metaclass=DummyObject): method __init__ (line 546) | def __init__(self, *args, **kwargs): method from_config (line 550) | def from_config(cls, *args, **kwargs): method from_pretrained (line 554) | def from_pretrained(cls, *args, **kwargs): class KarrasVeScheduler (line 558) | class KarrasVeScheduler(metaclass=DummyObject): method __init__ (line 561) | def __init__(self, *args, **kwargs): method from_config (line 565) | def from_config(cls, *args, **kwargs): method from_pretrained (line 569) | def from_pretrained(cls, *args, **kwargs): class KDPM2AncestralDiscreteScheduler (line 573) | class KDPM2AncestralDiscreteScheduler(metaclass=DummyObject): method __init__ (line 576) | def __init__(self, *args, **kwargs): method from_config (line 580) | def from_config(cls, *args, **kwargs): method from_pretrained (line 584) | def from_pretrained(cls, *args, **kwargs): class KDPM2DiscreteScheduler (line 588) | class KDPM2DiscreteScheduler(metaclass=DummyObject): method __init__ (line 591) | def __init__(self, *args, **kwargs): method from_config (line 595) | def from_config(cls, *args, **kwargs): method from_pretrained (line 599) | def from_pretrained(cls, *args, **kwargs): class PNDMScheduler (line 603) | class PNDMScheduler(metaclass=DummyObject): method __init__ (line 606) | def __init__(self, *args, **kwargs): method from_config (line 610) | def from_config(cls, *args, **kwargs): method from_pretrained (line 614) | def from_pretrained(cls, *args, **kwargs): class RePaintScheduler (line 618) | class RePaintScheduler(metaclass=DummyObject): method __init__ (line 621) | def __init__(self, *args, **kwargs): method from_config (line 625) | def from_config(cls, *args, **kwargs): method from_pretrained (line 629) | def from_pretrained(cls, *args, **kwargs): class SchedulerMixin (line 633) | class SchedulerMixin(metaclass=DummyObject): method __init__ (line 636) | def __init__(self, *args, **kwargs): method from_config (line 640) | def from_config(cls, *args, **kwargs): method from_pretrained (line 644) | def from_pretrained(cls, *args, **kwargs): class ScoreSdeVeScheduler (line 648) | class ScoreSdeVeScheduler(metaclass=DummyObject): method __init__ (line 651) | def __init__(self, *args, **kwargs): method from_config (line 655) | def from_config(cls, *args, **kwargs): method from_pretrained (line 659) | def from_pretrained(cls, *args, **kwargs): class UnCLIPScheduler (line 663) | class UnCLIPScheduler(metaclass=DummyObject): method __init__ (line 666) | def __init__(self, *args, **kwargs): method from_config (line 670) | def from_config(cls, *args, **kwargs): method from_pretrained (line 674) | def from_pretrained(cls, *args, **kwargs): class UniPCMultistepScheduler (line 678) | class UniPCMultistepScheduler(metaclass=DummyObject): method __init__ (line 681) | def __init__(self, *args, **kwargs): method from_config (line 685) | def from_config(cls, *args, **kwargs): method from_pretrained (line 689) | def from_pretrained(cls, *args, **kwargs): class VQDiffusionScheduler (line 693) | class VQDiffusionScheduler(metaclass=DummyObject): method __init__ (line 696) | def __init__(self, *args, **kwargs): method from_config (line 700) | def from_config(cls, *args, **kwargs): method from_pretrained (line 704) | def from_pretrained(cls, *args, **kwargs): class EMAModel (line 708) | class EMAModel(metaclass=DummyObject): method __init__ (line 711) | def __init__(self, *args, **kwargs): method from_config (line 715) | def from_config(cls, *args, **kwargs): method from_pretrained (line 719) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_torch_and_librosa_objects.py class AudioDiffusionPipeline (line 5) | class AudioDiffusionPipeline(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): class Mel (line 20) | class Mel(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): method from_config (line 27) | def from_config(cls, *args, **kwargs): method from_pretrained (line 31) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_torch_and_scipy_objects.py class LMSDiscreteScheduler (line 5) | class LMSDiscreteScheduler(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_torch_and_torchsde_objects.py class DPMSolverSDEScheduler (line 5) | class DPMSolverSDEScheduler(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_torch_and_transformers_and_k_diffusion_objects.py class StableDiffusionKDiffusionPipeline (line 5) | class StableDiffusionKDiffusionPipeline(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_torch_and_transformers_and_onnx_objects.py class OnnxStableDiffusionImg2ImgPipeline (line 5) | class OnnxStableDiffusionImg2ImgPipeline(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): class OnnxStableDiffusionInpaintPipeline (line 20) | class OnnxStableDiffusionInpaintPipeline(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): method from_config (line 27) | def from_config(cls, *args, **kwargs): method from_pretrained (line 31) | def from_pretrained(cls, *args, **kwargs): class OnnxStableDiffusionInpaintPipelineLegacy (line 35) | class OnnxStableDiffusionInpaintPipelineLegacy(metaclass=DummyObject): method __init__ (line 38) | def __init__(self, *args, **kwargs): method from_config (line 42) | def from_config(cls, *args, **kwargs): method from_pretrained (line 46) | def from_pretrained(cls, *args, **kwargs): class OnnxStableDiffusionPipeline (line 50) | class OnnxStableDiffusionPipeline(metaclass=DummyObject): method __init__ (line 53) | def __init__(self, *args, **kwargs): method from_config (line 57) | def from_config(cls, *args, **kwargs): method from_pretrained (line 61) | def from_pretrained(cls, *args, **kwargs): class OnnxStableDiffusionUpscalePipeline (line 65) | class OnnxStableDiffusionUpscalePipeline(metaclass=DummyObject): method __init__ (line 68) | def __init__(self, *args, **kwargs): method from_config (line 72) | def from_config(cls, *args, **kwargs): method from_pretrained (line 76) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionOnnxPipeline (line 80) | class StableDiffusionOnnxPipeline(metaclass=DummyObject): method __init__ (line 83) | def __init__(self, *args, **kwargs): method from_config (line 87) | def from_config(cls, *args, **kwargs): method from_pretrained (line 91) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_torch_and_transformers_objects.py class AltDiffusionImg2ImgPipeline (line 5) | class AltDiffusionImg2ImgPipeline(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): class AltDiffusionPipeline (line 20) | class AltDiffusionPipeline(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): method from_config (line 27) | def from_config(cls, *args, **kwargs): method from_pretrained (line 31) | def from_pretrained(cls, *args, **kwargs): class AudioLDMPipeline (line 35) | class AudioLDMPipeline(metaclass=DummyObject): method __init__ (line 38) | def __init__(self, *args, **kwargs): method from_config (line 42) | def from_config(cls, *args, **kwargs): method from_pretrained (line 46) | def from_pretrained(cls, *args, **kwargs): class CycleDiffusionPipeline (line 50) | class CycleDiffusionPipeline(metaclass=DummyObject): method __init__ (line 53) | def __init__(self, *args, **kwargs): method from_config (line 57) | def from_config(cls, *args, **kwargs): method from_pretrained (line 61) | def from_pretrained(cls, *args, **kwargs): class IFImg2ImgPipeline (line 65) | class IFImg2ImgPipeline(metaclass=DummyObject): method __init__ (line 68) | def __init__(self, *args, **kwargs): method from_config (line 72) | def from_config(cls, *args, **kwargs): method from_pretrained (line 76) | def from_pretrained(cls, *args, **kwargs): class IFImg2ImgSuperResolutionPipeline (line 80) | class IFImg2ImgSuperResolutionPipeline(metaclass=DummyObject): method __init__ (line 83) | def __init__(self, *args, **kwargs): method from_config (line 87) | def from_config(cls, *args, **kwargs): method from_pretrained (line 91) | def from_pretrained(cls, *args, **kwargs): class IFInpaintingPipeline (line 95) | class IFInpaintingPipeline(metaclass=DummyObject): method __init__ (line 98) | def __init__(self, *args, **kwargs): method from_config (line 102) | def from_config(cls, *args, **kwargs): method from_pretrained (line 106) | def from_pretrained(cls, *args, **kwargs): class IFInpaintingSuperResolutionPipeline (line 110) | class IFInpaintingSuperResolutionPipeline(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): method from_config (line 117) | def from_config(cls, *args, **kwargs): method from_pretrained (line 121) | def from_pretrained(cls, *args, **kwargs): class IFPipeline (line 125) | class IFPipeline(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): method from_config (line 132) | def from_config(cls, *args, **kwargs): method from_pretrained (line 136) | def from_pretrained(cls, *args, **kwargs): class IFSuperResolutionPipeline (line 140) | class IFSuperResolutionPipeline(metaclass=DummyObject): method __init__ (line 143) | def __init__(self, *args, **kwargs): method from_config (line 147) | def from_config(cls, *args, **kwargs): method from_pretrained (line 151) | def from_pretrained(cls, *args, **kwargs): class LDMTextToImagePipeline (line 155) | class LDMTextToImagePipeline(metaclass=DummyObject): method __init__ (line 158) | def __init__(self, *args, **kwargs): method from_config (line 162) | def from_config(cls, *args, **kwargs): method from_pretrained (line 166) | def from_pretrained(cls, *args, **kwargs): class PaintByExamplePipeline (line 170) | class PaintByExamplePipeline(metaclass=DummyObject): method __init__ (line 173) | def __init__(self, *args, **kwargs): method from_config (line 177) | def from_config(cls, *args, **kwargs): method from_pretrained (line 181) | def from_pretrained(cls, *args, **kwargs): class SemanticStableDiffusionPipeline (line 185) | class SemanticStableDiffusionPipeline(metaclass=DummyObject): method __init__ (line 188) | def __init__(self, *args, **kwargs): method from_config (line 192) | def from_config(cls, *args, **kwargs): method from_pretrained (line 196) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionAttendAndExcitePipeline (line 200) | class StableDiffusionAttendAndExcitePipeline(metaclass=DummyObject): method __init__ (line 203) | def __init__(self, *args, **kwargs): method from_config (line 207) | def from_config(cls, *args, **kwargs): method from_pretrained (line 211) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionControlNetImg2ImgPipeline (line 215) | class StableDiffusionControlNetImg2ImgPipeline(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): method from_config (line 222) | def from_config(cls, *args, **kwargs): method from_pretrained (line 226) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionControlNetInpaintPipeline (line 230) | class StableDiffusionControlNetInpaintPipeline(metaclass=DummyObject): method __init__ (line 233) | def __init__(self, *args, **kwargs): method from_config (line 237) | def from_config(cls, *args, **kwargs): method from_pretrained (line 241) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionControlNetPipeline (line 245) | class StableDiffusionControlNetPipeline(metaclass=DummyObject): method __init__ (line 248) | def __init__(self, *args, **kwargs): method from_config (line 252) | def from_config(cls, *args, **kwargs): method from_pretrained (line 256) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionDepth2ImgPipeline (line 260) | class StableDiffusionDepth2ImgPipeline(metaclass=DummyObject): method __init__ (line 263) | def __init__(self, *args, **kwargs): method from_config (line 267) | def from_config(cls, *args, **kwargs): method from_pretrained (line 271) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionDiffEditPipeline (line 275) | class StableDiffusionDiffEditPipeline(metaclass=DummyObject): method __init__ (line 278) | def __init__(self, *args, **kwargs): method from_config (line 282) | def from_config(cls, *args, **kwargs): method from_pretrained (line 286) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionImageVariationPipeline (line 290) | class StableDiffusionImageVariationPipeline(metaclass=DummyObject): method __init__ (line 293) | def __init__(self, *args, **kwargs): method from_config (line 297) | def from_config(cls, *args, **kwargs): method from_pretrained (line 301) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionImg2ImgPipeline (line 305) | class StableDiffusionImg2ImgPipeline(metaclass=DummyObject): method __init__ (line 308) | def __init__(self, *args, **kwargs): method from_config (line 312) | def from_config(cls, *args, **kwargs): method from_pretrained (line 316) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionInpaintPipeline (line 320) | class StableDiffusionInpaintPipeline(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): method from_config (line 327) | def from_config(cls, *args, **kwargs): method from_pretrained (line 331) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionInpaintPipelineLegacy (line 335) | class StableDiffusionInpaintPipelineLegacy(metaclass=DummyObject): method __init__ (line 338) | def __init__(self, *args, **kwargs): method from_config (line 342) | def from_config(cls, *args, **kwargs): method from_pretrained (line 346) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionInstructPix2PixPipeline (line 350) | class StableDiffusionInstructPix2PixPipeline(metaclass=DummyObject): method __init__ (line 353) | def __init__(self, *args, **kwargs): method from_config (line 357) | def from_config(cls, *args, **kwargs): method from_pretrained (line 361) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionLatentUpscalePipeline (line 365) | class StableDiffusionLatentUpscalePipeline(metaclass=DummyObject): method __init__ (line 368) | def __init__(self, *args, **kwargs): method from_config (line 372) | def from_config(cls, *args, **kwargs): method from_pretrained (line 376) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionModelEditingPipeline (line 380) | class StableDiffusionModelEditingPipeline(metaclass=DummyObject): method __init__ (line 383) | def __init__(self, *args, **kwargs): method from_config (line 387) | def from_config(cls, *args, **kwargs): method from_pretrained (line 391) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionPanoramaPipeline (line 395) | class StableDiffusionPanoramaPipeline(metaclass=DummyObject): method __init__ (line 398) | def __init__(self, *args, **kwargs): method from_config (line 402) | def from_config(cls, *args, **kwargs): method from_pretrained (line 406) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionPipeline (line 410) | class StableDiffusionPipeline(metaclass=DummyObject): method __init__ (line 413) | def __init__(self, *args, **kwargs): method from_config (line 417) | def from_config(cls, *args, **kwargs): method from_pretrained (line 421) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionPipelineSafe (line 425) | class StableDiffusionPipelineSafe(metaclass=DummyObject): method __init__ (line 428) | def __init__(self, *args, **kwargs): method from_config (line 432) | def from_config(cls, *args, **kwargs): method from_pretrained (line 436) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionPix2PixZeroPipeline (line 440) | class StableDiffusionPix2PixZeroPipeline(metaclass=DummyObject): method __init__ (line 443) | def __init__(self, *args, **kwargs): method from_config (line 447) | def from_config(cls, *args, **kwargs): method from_pretrained (line 451) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionSAGPipeline (line 455) | class StableDiffusionSAGPipeline(metaclass=DummyObject): method __init__ (line 458) | def __init__(self, *args, **kwargs): method from_config (line 462) | def from_config(cls, *args, **kwargs): method from_pretrained (line 466) | def from_pretrained(cls, *args, **kwargs): class StableDiffusionUpscalePipeline (line 470) | class StableDiffusionUpscalePipeline(metaclass=DummyObject): method __init__ (line 473) | def __init__(self, *args, **kwargs): method from_config (line 477) | def from_config(cls, *args, **kwargs): method from_pretrained (line 481) | def from_pretrained(cls, *args, **kwargs): class StableUnCLIPImg2ImgPipeline (line 485) | class StableUnCLIPImg2ImgPipeline(metaclass=DummyObject): method __init__ (line 488) | def __init__(self, *args, **kwargs): method from_config (line 492) | def from_config(cls, *args, **kwargs): method from_pretrained (line 496) | def from_pretrained(cls, *args, **kwargs): class StableUnCLIPPipeline (line 500) | class StableUnCLIPPipeline(metaclass=DummyObject): method __init__ (line 503) | def __init__(self, *args, **kwargs): method from_config (line 507) | def from_config(cls, *args, **kwargs): method from_pretrained (line 511) | def from_pretrained(cls, *args, **kwargs): class TextToVideoSDPipeline (line 515) | class TextToVideoSDPipeline(metaclass=DummyObject): method __init__ (line 518) | def __init__(self, *args, **kwargs): method from_config (line 522) | def from_config(cls, *args, **kwargs): method from_pretrained (line 526) | def from_pretrained(cls, *args, **kwargs): class TextToVideoZeroPipeline (line 530) | class TextToVideoZeroPipeline(metaclass=DummyObject): method __init__ (line 533) | def __init__(self, *args, **kwargs): method from_config (line 537) | def from_config(cls, *args, **kwargs): method from_pretrained (line 541) | def from_pretrained(cls, *args, **kwargs): class UnCLIPImageVariationPipeline (line 545) | class UnCLIPImageVariationPipeline(metaclass=DummyObject): method __init__ (line 548) | def __init__(self, *args, **kwargs): method from_config (line 552) | def from_config(cls, *args, **kwargs): method from_pretrained (line 556) | def from_pretrained(cls, *args, **kwargs): class UnCLIPPipeline (line 560) | class UnCLIPPipeline(metaclass=DummyObject): method __init__ (line 563) | def __init__(self, *args, **kwargs): method from_config (line 567) | def from_config(cls, *args, **kwargs): method from_pretrained (line 571) | def from_pretrained(cls, *args, **kwargs): class VersatileDiffusionDualGuidedPipeline (line 575) | class VersatileDiffusionDualGuidedPipeline(metaclass=DummyObject): method __init__ (line 578) | def __init__(self, *args, **kwargs): method from_config (line 582) | def from_config(cls, *args, **kwargs): method from_pretrained (line 586) | def from_pretrained(cls, *args, **kwargs): class VersatileDiffusionImageVariationPipeline (line 590) | class VersatileDiffusionImageVariationPipeline(metaclass=DummyObject): method __init__ (line 593) | def __init__(self, *args, **kwargs): method from_config (line 597) | def from_config(cls, *args, **kwargs): method from_pretrained (line 601) | def from_pretrained(cls, *args, **kwargs): class VersatileDiffusionPipeline (line 605) | class VersatileDiffusionPipeline(metaclass=DummyObject): method __init__ (line 608) | def __init__(self, *args, **kwargs): method from_config (line 612) | def from_config(cls, *args, **kwargs): method from_pretrained (line 616) | def from_pretrained(cls, *args, **kwargs): class VersatileDiffusionTextToImagePipeline (line 620) | class VersatileDiffusionTextToImagePipeline(metaclass=DummyObject): method __init__ (line 623) | def __init__(self, *args, **kwargs): method from_config (line 627) | def from_config(cls, *args, **kwargs): method from_pretrained (line 631) | def from_pretrained(cls, *args, **kwargs): class VQDiffusionPipeline (line 635) | class VQDiffusionPipeline(metaclass=DummyObject): method __init__ (line 638) | def __init__(self, *args, **kwargs): method from_config (line 642) | def from_config(cls, *args, **kwargs): method from_pretrained (line 646) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dummy_transformers_and_torch_and_note_seq_objects.py class SpectrogramDiffusionPipeline (line 5) | class SpectrogramDiffusionPipeline(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): method from_config (line 12) | def from_config(cls, *args, **kwargs): method from_pretrained (line 16) | def from_pretrained(cls, *args, **kwargs): FILE: diffusers/utils/dynamic_modules_utils.py function get_diffusers_versions (line 43) | def get_diffusers_versions(): function init_hf_modules (line 49) | def init_hf_modules(): function create_dynamic_module (line 64) | def create_dynamic_module(name: Union[str, os.PathLike]): function get_relative_imports (line 79) | def get_relative_imports(module_file): function get_relative_import_files (line 97) | def get_relative_import_files(module_file): function check_imports (line 126) | def check_imports(filename): function get_class_in_module (line 158) | def get_class_in_module(class_name, module_path): function find_pipeline_class (line 170) | def find_pipeline_class(loaded_module): function get_cached_module_file (line 197) | def get_cached_module_file( function get_class_from_dynamic_module (line 369) | def get_class_from_dynamic_module( FILE: diffusers/utils/hub_utils.py function http_user_agent (line 68) | def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str: function get_full_repo_name (line 92) | def get_full_repo_name(model_id: str, organization: Optional[str] = None... function create_model_card (line 102) | def create_model_card(args, model_name): function extract_commit_hash (line 151) | def extract_commit_hash(resolved_file: Optional[str], commit_hash: Optio... function move_cache (line 175) | def move_cache(old_cache_dir: Optional[str] = None, new_cache_dir: Optio... function _add_variant (line 237) | def _add_variant(weights_name: str, variant: Optional[str] = None) -> str: function _get_model_file (line 246) | def _get_model_file( FILE: diffusers/utils/import_utils.py function is_torch_available (line 298) | def is_torch_available(): function is_safetensors_available (line 302) | def is_safetensors_available(): function is_tf_available (line 306) | def is_tf_available(): function is_flax_available (line 310) | def is_flax_available(): function is_transformers_available (line 314) | def is_transformers_available(): function is_inflect_available (line 318) | def is_inflect_available(): function is_unidecode_available (line 322) | def is_unidecode_available(): function is_onnx_available (line 326) | def is_onnx_available(): function is_opencv_available (line 330) | def is_opencv_available(): function is_scipy_available (line 334) | def is_scipy_available(): function is_librosa_available (line 338) | def is_librosa_available(): function is_xformers_available (line 342) | def is_xformers_available(): function is_accelerate_available (line 346) | def is_accelerate_available(): function is_k_diffusion_available (line 350) | def is_k_diffusion_available(): function is_note_seq_available (line 354) | def is_note_seq_available(): function is_wandb_available (line 358) | def is_wandb_available(): function is_omegaconf_available (line 362) | def is_omegaconf_available(): function is_tensorboard_available (line 366) | def is_tensorboard_available(): function is_compel_available (line 370) | def is_compel_available(): function is_ftfy_available (line 374) | def is_ftfy_available(): function is_bs4_available (line 378) | def is_bs4_available(): function is_torchsde_available (line 382) | def is_torchsde_available(): function requires_backends (line 519) | def requires_backends(obj, backends): class DummyObject (line 550) | class DummyObject(type): method __getattr__ (line 556) | def __getattr__(cls, key): function compare_versions (line 563) | def compare_versions(library_or_version: Union[str, Version], operation:... function is_torch_version (line 583) | def is_torch_version(operation: str, version: str): function is_transformers_version (line 595) | def is_transformers_version(operation: str, version: str): function is_accelerate_version (line 609) | def is_accelerate_version(operation: str, version: str): function is_k_diffusion_version (line 623) | def is_k_diffusion_version(operation: str, version: str): class OptionalDependencyNotAvailable (line 637) | class OptionalDependencyNotAvailable(BaseException): FILE: diffusers/utils/logging.py function _get_default_logging_level (line 52) | def _get_default_logging_level(): function _get_library_name (line 69) | def _get_library_name() -> str: function _get_library_root_logger (line 73) | def _get_library_root_logger() -> logging.Logger: function _configure_library_root_logger (line 77) | def _configure_library_root_logger() -> None: function _reset_library_root_logger (line 94) | def _reset_library_root_logger() -> None: function get_log_levels_dict (line 107) | def get_log_levels_dict(): function get_logger (line 111) | def get_logger(name: Optional[str] = None) -> logging.Logger: function get_verbosity (line 125) | def get_verbosity() -> int: function set_verbosity (line 148) | def set_verbosity(verbosity: int) -> None: function set_verbosity_info (line 167) | def set_verbosity_info(): function set_verbosity_warning (line 172) | def set_verbosity_warning(): function set_verbosity_debug (line 177) | def set_verbosity_debug(): function set_verbosity_error (line 182) | def set_verbosity_error(): function disable_default_handler (line 187) | def disable_default_handler() -> None: function enable_default_handler (line 196) | def enable_default_handler() -> None: function add_handler (line 205) | def add_handler(handler: logging.Handler) -> None: function remove_handler (line 214) | def remove_handler(handler: logging.Handler) -> None: function disable_propagation (line 223) | def disable_propagation() -> None: function enable_propagation (line 232) | def enable_propagation() -> None: function enable_explicit_format (line 242) | def enable_explicit_format() -> None: function reset_format (line 257) | def reset_format() -> None: function warning_advice (line 269) | def warning_advice(self, *args, **kwargs): class EmptyTqdm (line 283) | class EmptyTqdm: method __init__ (line 286) | def __init__(self, *args, **kwargs): # pylint: disable=unused-argument method __iter__ (line 289) | def __iter__(self): method __getattr__ (line 292) | def __getattr__(self, _): method __enter__ (line 300) | def __enter__(self): method __exit__ (line 303) | def __exit__(self, type_, value, traceback): class _tqdm_cls (line 307) | class _tqdm_cls: method __call__ (line 308) | def __call__(self, *args, **kwargs): method set_lock (line 314) | def set_lock(self, *args, **kwargs): method get_lock (line 319) | def get_lock(self): function is_progress_bar_enabled (line 327) | def is_progress_bar_enabled() -> bool: function enable_progress_bar (line 333) | def enable_progress_bar(): function disable_progress_bar (line 339) | def disable_progress_bar(): FILE: diffusers/utils/outputs.py function is_tensor (line 27) | def is_tensor(x): class BaseOutput (line 40) | class BaseOutput(OrderedDict): method __post_init__ (line 54) | def __post_init__(self): method __delitem__ (line 73) | def __delitem__(self, *args, **kwargs): method setdefault (line 76) | def setdefault(self, *args, **kwargs): method pop (line 79) | def pop(self, *args, **kwargs): method update (line 82) | def update(self, *args, **kwargs): method __getitem__ (line 85) | def __getitem__(self, k): method __setattr__ (line 92) | def __setattr__(self, name, value): method __setitem__ (line 98) | def __setitem__(self, key, value): method to_tuple (line 104) | def to_tuple(self) -> Tuple[Any]: FILE: diffusers/utils/pil_utils.py function pt_to_pil (line 25) | def pt_to_pil(images): function numpy_to_pil (line 32) | def numpy_to_pil(images): FILE: diffusers/utils/testing_utils.py function torch_all_close (line 63) | def torch_all_close(a, b, *args, **kwargs): function print_tensor_test (line 71) | def print_tensor_test(tensor, filename="test_corrections.txt", expected_... function get_tests_dir (line 86) | def get_tests_dir(append_path=None): function parse_flag_from_env (line 107) | def parse_flag_from_env(key, default=False): function floats_tensor (line 127) | def floats_tensor(shape, scale=1.0, rng=None, name=None): function slow (line 143) | def slow(test_case): function nightly (line 153) | def nightly(test_case): function require_torch (line 163) | def require_torch(test_case): function require_torch_2 (line 170) | def require_torch_2(test_case): function require_torch_gpu (line 179) | def require_torch_gpu(test_case): function skip_mps (line 186) | def skip_mps(test_case): function require_flax (line 191) | def require_flax(test_case): function require_compel (line 198) | def require_compel(test_case): function require_onnxruntime (line 206) | def require_onnxruntime(test_case): function require_note_seq (line 213) | def require_note_seq(test_case): function require_torchsde (line 220) | def require_torchsde(test_case): function load_numpy (line 227) | def load_numpy(arry: Union[str, np.ndarray], local_path: Optional[str] =... function load_pt (line 254) | def load_pt(url: str): function load_image (line 261) | def load_image(image: Union[str, PIL.Image.Image]) -> PIL.Image.Image: function preprocess_image (line 290) | def preprocess_image(image: PIL.Image, batch_size: int): function export_to_video (line 300) | def export_to_video(video_frames: List[np.ndarray], output_video_path: s... function load_hf_numpy (line 317) | def load_hf_numpy(path) -> np.ndarray: function pytest_addoption_shared (line 332) | def pytest_addoption_shared(parser): function pytest_terminal_summary_main (line 351) | def pytest_terminal_summary_main(tr, id): class CaptureLogger (line 480) | class CaptureLogger: method __init__ (line 501) | def __init__(self, logger): method __enter__ (line 507) | def __enter__(self): method __exit__ (line 511) | def __exit__(self, *exc): method __repr__ (line 515) | def __repr__(self): FILE: diffusers/utils/torch_utils.py function maybe_allow_in_graph (line 32) | def maybe_allow_in_graph(cls): function randn_tensor (line 36) | def randn_tensor( function is_compiled_module (line 80) | def is_compiled_module(module): FILE: fid_score.py function tqdm (line 49) | def tqdm(x): class ImagePathDataset (line 84) | class ImagePathDataset(torch.utils.data.Dataset): method __init__ (line 85) | def __init__(self, files, transforms=None): method __len__ (line 89) | def __len__(self): method __getitem__ (line 92) | def __getitem__(self, i): function get_activations (line 100) | def get_activations(files, model, batch_size=50, dims=2048, device='cpu', function calculate_frechet_distance (line 182) | def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6): function calculate_activation_statistics (line 239) | def calculate_activation_statistics(files, model, batch_size=50, dims=2048, function compute_statistics_of_path (line 264) | def compute_statistics_of_path(path, model, batch_size, dims, device, function calculate_fid_given_paths (line 285) | def calculate_fid_given_paths(paths, batch_size, device, dims, num_worke... function save_fid_stats (line 304) | def save_fid_stats(paths, batch_size, device, dims, num_workers=1, num_s... function main (line 324) | def main(): FILE: inception.py class InceptionV3 (line 16) | class InceptionV3(nn.Module): method __init__ (line 31) | def __init__(self, method forward (line 129) | def forward(self, inp): function _inception_v3 (line 166) | def _inception_v3(*args, **kwargs): function fid_inception_v3 (line 197) | def fid_inception_v3(): class FIDInceptionA (line 224) | class FIDInceptionA(torchvision.models.inception.InceptionA): method __init__ (line 226) | def __init__(self, in_channels, pool_features): method forward (line 229) | def forward(self, x): class FIDInceptionC (line 249) | class FIDInceptionC(torchvision.models.inception.InceptionC): method __init__ (line 251) | def __init__(self, in_channels, channels_7x7): method forward (line 254) | def forward(self, x): class FIDInceptionE_1 (line 277) | class FIDInceptionE_1(torchvision.models.inception.InceptionE): method __init__ (line 279) | def __init__(self, in_channels): method forward (line 282) | def forward(self, x): class FIDInceptionE_2 (line 310) | class FIDInceptionE_2(torchvision.models.inception.InceptionE): method __init__ (line 312) | def __init__(self, in_channels): method forward (line 315) | def forward(self, x): FILE: ldm_exp/fid_score.py function tqdm (line 51) | def tqdm(x): class ImagePathDataset (line 86) | class ImagePathDataset(torch.utils.data.Dataset): method __init__ (line 87) | def __init__(self, files, transforms=None): method __len__ (line 91) | def __len__(self): method __getitem__ (line 94) | def __getitem__(self, i): function get_activations (line 102) | def get_activations(files, model, batch_size=50, dims=2048, device='cpu', function calculate_frechet_distance (line 184) | def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6): function calculate_activation_statistics (line 241) | def calculate_activation_statistics(files, model, batch_size=50, dims=2048, function compute_statistics_of_path (line 266) | def compute_statistics_of_path(path, model, batch_size, dims, device, function calculate_fid_given_paths (line 298) | def calculate_fid_given_paths(paths, batch_size, device, dims, num_worke... function save_fid_stats (line 317) | def save_fid_stats(paths, batch_size, device, dims, num_workers=1, num_s... function main (line 337) | def main(): FILE: ldm_exp/inception.py class InceptionV3 (line 16) | class InceptionV3(nn.Module): method __init__ (line 31) | def __init__(self, method forward (line 129) | def forward(self, inp): function _inception_v3 (line 166) | def _inception_v3(*args, **kwargs): function fid_inception_v3 (line 197) | def fid_inception_v3(): class FIDInceptionA (line 224) | class FIDInceptionA(torchvision.models.inception.InceptionA): method __init__ (line 226) | def __init__(self, in_channels, pool_features): method forward (line 229) | def forward(self, x): class FIDInceptionC (line 249) | class FIDInceptionC(torchvision.models.inception.InceptionC): method __init__ (line 251) | def __init__(self, in_channels, channels_7x7): method forward (line 254) | def forward(self, x): class FIDInceptionE_1 (line 277) | class FIDInceptionE_1(torchvision.models.inception.InceptionE): method __init__ (line 279) | def __init__(self, in_channels): method forward (line 282) | def forward(self, x): class FIDInceptionE_2 (line 310) | class FIDInceptionE_2(torchvision.models.inception.InceptionE): method __init__ (line 312) | def __init__(self, in_channels): method forward (line 315) | def forward(self, x): FILE: ldm_exp/ldm/lr_scheduler.py class LambdaWarmUpCosineScheduler (line 4) | class LambdaWarmUpCosineScheduler: method __init__ (line 8) | def __init__(self, warm_up_steps, lr_min, lr_max, lr_start, max_decay_... method schedule (line 17) | def schedule(self, n, **kwargs): method __call__ (line 32) | def __call__(self, n, **kwargs): class LambdaWarmUpCosineScheduler2 (line 36) | class LambdaWarmUpCosineScheduler2: method __init__ (line 41) | def __init__(self, warm_up_steps, f_min, f_max, f_start, cycle_lengths... method find_in_interval (line 52) | def find_in_interval(self, n): method schedule (line 59) | def schedule(self, n, **kwargs): method __call__ (line 77) | def __call__(self, n, **kwargs): class LambdaLinearScheduler (line 81) | class LambdaLinearScheduler(LambdaWarmUpCosineScheduler2): method schedule (line 83) | def schedule(self, n, **kwargs): FILE: ldm_exp/ldm/models/autoencoder.py class VQModel (line 14) | class VQModel(pl.LightningModule): method __init__ (line 15) | def __init__(self, method ema_scope (line 64) | def ema_scope(self, context=None): method init_from_ckpt (line 78) | def init_from_ckpt(self, path, ignore_keys=list()): method on_train_batch_end (line 92) | def on_train_batch_end(self, *args, **kwargs): method encode (line 96) | def encode(self, x): method encode_to_prequant (line 102) | def encode_to_prequant(self, x): method decode (line 107) | def decode(self, quant): method decode_code (line 112) | def decode_code(self, code_b): method forward (line 117) | def forward(self, input, return_pred_indices=False): method get_input (line 124) | def get_input(self, batch, k): method training_step (line 142) | def training_step(self, batch, batch_idx, optimizer_idx): method validation_step (line 164) | def validation_step(self, batch, batch_idx): method _validation_step (line 170) | def _validation_step(self, batch, batch_idx, suffix=""): method configure_optimizers (line 197) | def configure_optimizers(self): method get_last_layer (line 230) | def get_last_layer(self): method log_images (line 233) | def log_images(self, batch, only_inputs=False, plot_ema=False, **kwargs): method to_rgb (line 255) | def to_rgb(self, x): class VQModelInterface (line 264) | class VQModelInterface(VQModel): method __init__ (line 265) | def __init__(self, embed_dim, *args, **kwargs): method encode (line 269) | def encode(self, x): method decode (line 274) | def decode(self, h, force_not_quantize=False): class AutoencoderKL (line 285) | class AutoencoderKL(pl.LightningModule): method __init__ (line 286) | def __init__(self, method init_from_ckpt (line 313) | def init_from_ckpt(self, path, ignore_keys=list()): method encode (line 324) | def encode(self, x): method decode (line 330) | def decode(self, z): method forward (line 335) | def forward(self, input, sample_posterior=True): method get_input (line 344) | def get_input(self, batch, k): method training_step (line 351) | def training_step(self, batch, batch_idx, optimizer_idx): method validation_step (line 372) | def validation_step(self, batch, batch_idx): method configure_optimizers (line 386) | def configure_optimizers(self): method get_last_layer (line 397) | def get_last_layer(self): method log_images (line 401) | def log_images(self, batch, only_inputs=False, **kwargs): method to_rgb (line 417) | def to_rgb(self, x): class IdentityFirstStage (line 426) | class IdentityFirstStage(torch.nn.Module): method __init__ (line 427) | def __init__(self, *args, vq_interface=False, **kwargs): method encode (line 431) | def encode(self, x, *args, **kwargs): method decode (line 434) | def decode(self, x, *args, **kwargs): method quantize (line 437) | def quantize(self, x, *args, **kwargs): method forward (line 442) | def forward(self, x, *args, **kwargs): FILE: ldm_exp/ldm/models/diffusion/classifier.py function disabled_train (line 22) | def disabled_train(self, mode=True): class NoisyLatentImageClassifier (line 28) | class NoisyLatentImageClassifier(pl.LightningModule): method __init__ (line 30) | def __init__(self, method init_from_ckpt (line 70) | def init_from_ckpt(self, path, ignore_keys=list(), only_model=False): method load_diffusion (line 88) | def load_diffusion(self): method load_classifier (line 95) | def load_classifier(self, ckpt_path, pool): method get_x_noisy (line 110) | def get_x_noisy(self, x, t, noise=None): method forward (line 120) | def forward(self, x_noisy, t, *args, **kwargs): method get_input (line 124) | def get_input(self, batch, k): method get_conditioning (line 133) | def get_conditioning(self, batch, k=None): method compute_top_k (line 150) | def compute_top_k(self, logits, labels, k, reduction="mean"): method on_train_epoch_start (line 157) | def on_train_epoch_start(self): method write_logs (line 162) | def write_logs(self, loss, logits, targets): method shared_step (line 179) | def shared_step(self, batch, t=None): method training_step (line 198) | def training_step(self, batch, batch_idx): method reset_noise_accs (line 202) | def reset_noise_accs(self): method on_validation_start (line 206) | def on_validation_start(self): method validation_step (line 210) | def validation_step(self, batch, batch_idx): method configure_optimizers (line 220) | def configure_optimizers(self): method log_images (line 238) | def log_images(self, batch, N=8, *args, **kwargs): FILE: ldm_exp/ldm/models/diffusion/ddim.py class DDIMSampler (line 11) | class DDIMSampler(object): method __init__ (line 12) | def __init__(self, model, schedule="linear", **kwargs): method register_buffer (line 18) | def register_buffer(self, name, attr): method make_schedule (line 24) | def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddi... method sample (line 56) | def sample(self, method ddim_sampling (line 113) | def ddim_sampling(self, cond, shape, method p_sample_ddim (line 165) | def p_sample_ddim(self, x, c, t, index, repeat_noise=False, use_origin... FILE: ldm_exp/ldm/models/diffusion/ddpm.py function disabled_train (line 34) | def disabled_train(self, mode=True): function uniform_on_device (line 40) | def uniform_on_device(r1, r2, shape, device): class DDPM (line 44) | class DDPM(pl.LightningModule): method __init__ (line 46) | def __init__(self, method register_schedule (line 117) | def register_schedule(self, given_betas=None, beta_schedule="linear", ... method ema_scope (line 172) | def ema_scope(self, context=None): method init_from_ckpt (line 186) | def init_from_ckpt(self, path, ignore_keys=list(), only_model=False): method q_mean_variance (line 204) | def q_mean_variance(self, x_start, t): method predict_start_from_noise (line 216) | def predict_start_from_noise(self, x_t, t, noise): method q_posterior (line 222) | def q_posterior(self, x_start, x_t, t): method p_mean_variance (line 231) | def p_mean_variance(self, x, t, clip_denoised: bool): method p_sample (line 244) | def p_sample(self, x, t, clip_denoised=True, repeat_noise=False): method p_sample_loop (line 253) | def p_sample_loop(self, shape, return_intermediates=False): method sample (line 268) | def sample(self, batch_size=16, return_intermediates=False): method q_sample (line 274) | def q_sample(self, x_start, t, noise=None): method get_loss (line 279) | def get_loss(self, pred, target, mean=True): method p_losses (line 294) | def p_losses(self, x_start, t, noise=None): method forward (line 323) | def forward(self, x, *args, **kwargs): method get_input (line 329) | def get_input(self, batch, k): method shared_step (line 337) | def shared_step(self, batch): method training_step (line 342) | def training_step(self, batch, batch_idx): method validation_step (line 358) | def validation_step(self, batch, batch_idx): method on_train_batch_end (line 366) | def on_train_batch_end(self, *args, **kwargs): method _get_rows_from_list (line 370) | def _get_rows_from_list(self, samples): method log_images (line 378) | def log_images(self, batch, N=8, n_row=2, sample=True, return_keys=Non... method configure_optimizers (line 415) | def configure_optimizers(self): class LatentDiffusion (line 424) | class LatentDiffusion(DDPM): method __init__ (line 426) | def __init__(self, method make_cond_schedule (line 471) | def make_cond_schedule(self, ): method on_train_batch_start (line 478) | def on_train_batch_start(self, batch, batch_idx, dataloader_idx): method register_schedule (line 493) | def register_schedule(self, method instantiate_first_stage (line 502) | def instantiate_first_stage(self, config): method instantiate_cond_stage (line 509) | def instantiate_cond_stage(self, config): method _get_denoise_row_from_list (line 530) | def _get_denoise_row_from_list(self, samples, desc='', force_no_decode... method get_first_stage_encoding (line 542) | def get_first_stage_encoding(self, encoder_posterior): method get_learned_conditioning (line 551) | def get_learned_conditioning(self, c): method meshgrid (line 564) | def meshgrid(self, h, w): method delta_border (line 571) | def delta_border(self, h, w): method get_weighting (line 585) | def get_weighting(self, h, w, Ly, Lx, device): method get_fold_unfold (line 601) | def get_fold_unfold(self, x, kernel_size, stride, uf=1, df=1): # todo... method get_input (line 654) | def get_input(self, batch, k, return_first_stage_outputs=False, force_... method decode_first_stage (line 706) | def decode_first_stage(self, z, predict_cids=False, force_not_quantize... method differentiable_decode_first_stage (line 766) | def differentiable_decode_first_stage(self, z, predict_cids=False, for... method encode_first_stage (line 826) | def encode_first_stage(self, x): method shared_step (line 865) | def shared_step(self, batch, **kwargs): method forward (line 870) | def forward(self, x, c, *args, **kwargs): method get_loss_at_t (line 881) | def get_loss_at_t(self, x, c, t, *args, **kwargs): method _rescale_annotations (line 891) | def _rescale_annotations(self, bboxes, crop_coordinates): # TODO: mov... method apply_model (line 901) | def apply_model(self, x_noisy, t, cond, return_ids=False): method _predict_eps_from_xstart (line 1004) | def _predict_eps_from_xstart(self, x_t, t, pred_xstart): method _prior_bpd (line 1008) | def _prior_bpd(self, x_start): method p_losses (line 1022) | def p_losses(self, x_start, cond, t, noise=None): method p_mean_variance (line 1058) | def p_mean_variance(self, x, c, t, clip_denoised: bool, return_codeboo... method p_sample (line 1090) | def p_sample(self, x, c, t, clip_denoised=False, repeat_noise=False, method progressive_denoising (line 1121) | def progressive_denoising(self, cond, shape, verbose=True, callback=No... method p_sample_loop (line 1177) | def p_sample_loop(self, cond, shape, return_intermediates=False, method sample (line 1228) | def sample(self, cond, batch_size=16, return_intermediates=False, x_T=... method sample_log (line 1246) | def sample_log(self,cond,batch_size,ddim, ddim_steps,**kwargs): method log_images (line 1262) | def log_images(self, batch, N=8, n_row=4, sample=True, ddim_steps=200,... method configure_optimizers (line 1372) | def configure_optimizers(self): method to_rgb (line 1397) | def to_rgb(self, x): class DiffusionWrapper (line 1406) | class DiffusionWrapper(pl.LightningModule): method __init__ (line 1407) | def __init__(self, diff_model_config, conditioning_key): method forward (line 1413) | def forward(self, x, t, c_concat: list = None, c_crossattn: list = None): class Layout2ImgDiffusion (line 1435) | class Layout2ImgDiffusion(LatentDiffusion): method __init__ (line 1437) | def __init__(self, cond_stage_key, *args, **kwargs): method log_images (line 1441) | def log_images(self, batch, N=8, *args, **kwargs): FILE: ldm_exp/ldm/models/diffusion/plms.py class PLMSSampler (line 11) | class PLMSSampler(object): method __init__ (line 12) | def __init__(self, model, schedule="linear", **kwargs): method register_buffer (line 18) | def register_buffer(self, name, attr): method make_schedule (line 24) | def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddi... method sample (line 58) | def sample(self, method plms_sampling (line 115) | def plms_sampling(self, cond, shape, method p_sample_plms (line 173) | def p_sample_plms(self, x, c, t, index, repeat_noise=False, use_origin... FILE: ldm_exp/ldm/modules/attention.py function exists (line 11) | def exists(val): function uniq (line 15) | def uniq(arr): function default (line 19) | def default(val, d): function max_neg_value (line 25) | def max_neg_value(t): function init_ (line 29) | def init_(tensor): class GEGLU (line 37) | class GEGLU(nn.Module): method __init__ (line 38) | def __init__(self, dim_in, dim_out): method forward (line 42) | def forward(self, x): class FeedForward (line 47) | class FeedForward(nn.Module): method __init__ (line 48) | def __init__(self, dim, dim_out=None, mult=4, glu=False, dropout=0.): method forward (line 63) | def forward(self, x): function zero_module (line 67) | def zero_module(module): function Normalize (line 76) | def Normalize(in_channels): class LinearAttention (line 80) | class LinearAttention(nn.Module): method __init__ (line 81) | def __init__(self, dim, heads=4, dim_head=32): method forward (line 88) | def forward(self, x): class SpatialSelfAttention (line 99) | class SpatialSelfAttention(nn.Module): method __init__ (line 100) | def __init__(self, in_channels): method forward (line 126) | def forward(self, x): class CrossAttention (line 152) | class CrossAttention(nn.Module): method __init__ (line 153) | def __init__(self, query_dim, context_dim=None, heads=8, dim_head=64, ... method forward (line 170) | def forward(self, x, context=None, mask=None): class BasicTransformerBlock (line 196) | class BasicTransformerBlock(nn.Module): method __init__ (line 197) | def __init__(self, dim, n_heads, d_head, dropout=0., context_dim=None,... method forward (line 208) | def forward(self, x, context=None): class SpatialTransformer (line 215) | class SpatialTransformer(nn.Module): method __init__ (line 223) | def __init__(self, in_channels, n_heads, d_head, method forward (line 247) | def forward(self, x, context=None): FILE: ldm_exp/ldm/modules/diffusionmodules/model.py function get_timestep_embedding (line 12) | def get_timestep_embedding(timesteps, embedding_dim): function nonlinearity (line 33) | def nonlinearity(x): function Normalize (line 38) | def Normalize(in_channels, num_groups=32): class Upsample (line 42) | class Upsample(nn.Module): method __init__ (line 43) | def __init__(self, in_channels, with_conv): method forward (line 53) | def forward(self, x): class Downsample (line 60) | class Downsample(nn.Module): method __init__ (line 61) | def __init__(self, in_channels, with_conv): method forward (line 72) | def forward(self, x): class ResnetBlock (line 82) | class ResnetBlock(nn.Module): method __init__ (line 83) | def __init__(self, *, in_channels, out_channels=None, conv_shortcut=Fa... method forward (line 121) | def forward(self, x, temb): class LinAttnBlock (line 144) | class LinAttnBlock(LinearAttention): method __init__ (line 146) | def __init__(self, in_channels): class AttnBlock (line 150) | class AttnBlock(nn.Module): method __init__ (line 151) | def __init__(self, in_channels): method forward (line 178) | def forward(self, x): function make_attn (line 205) | def make_attn(in_channels, attn_type="vanilla"): class Model (line 216) | class Model(nn.Module): method __init__ (line 217) | def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, method forward (line 316) | def forward(self, x, t=None, context=None): method get_last_layer (line 364) | def get_last_layer(self): class Encoder (line 368) | class Encoder(nn.Module): method __init__ (line 369) | def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, method forward (line 434) | def forward(self, x): class Decoder (line 462) | class Decoder(nn.Module): method __init__ (line 463) | def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, method forward (line 535) | def forward(self, z): class SimpleDecoder (line 571) | class SimpleDecoder(nn.Module): method __init__ (line 572) | def __init__(self, in_channels, out_channels, *args, **kwargs): method forward (line 594) | def forward(self, x): class UpsampleDecoder (line 607) | class UpsampleDecoder(nn.Module): method __init__ (line 608) | def __init__(self, in_channels, out_channels, ch, num_res_blocks, reso... method forward (line 641) | def forward(self, x): class LatentRescaler (line 655) | class LatentRescaler(nn.Module): method __init__ (line 656) | def __init__(self, factor, in_channels, mid_channels, out_channels, de... method forward (line 680) | def forward(self, x): class MergedRescaleEncoder (line 692) | class MergedRescaleEncoder(nn.Module): method __init__ (line 693) | def __init__(self, in_channels, ch, resolution, out_ch, num_res_blocks, method forward (line 705) | def forward(self, x): class MergedRescaleDecoder (line 711) | class MergedRescaleDecoder(nn.Module): method __init__ (line 712) | def __init__(self, z_channels, out_ch, resolution, num_res_blocks, att... method forward (line 722) | def forward(self, x): class Upsampler (line 728) | class Upsampler(nn.Module): method __init__ (line 729) | def __init__(self, in_size, out_size, in_channels, out_channels, ch_mu... method forward (line 741) | def forward(self, x): class Resize (line 747) | class Resize(nn.Module): method __init__ (line 748) | def __init__(self, in_channels=None, learned=False, mode="bilinear"): method forward (line 763) | def forward(self, x, scale_factor=1.0): class FirstStagePostProcessor (line 770) | class FirstStagePostProcessor(nn.Module): method __init__ (line 772) | def __init__(self, ch_mult:list, in_channels, method instantiate_pretrained (line 807) | def instantiate_pretrained(self, config): method encode_with_pretrained (line 816) | def encode_with_pretrained(self,x): method forward (line 822) | def forward(self,x): FILE: ldm_exp/ldm/modules/diffusionmodules/openaimodel.py function convert_module_to_f16 (line 24) | def convert_module_to_f16(x): function convert_module_to_f32 (line 27) | def convert_module_to_f32(x): class AttentionPool2d (line 32) | class AttentionPool2d(nn.Module): method __init__ (line 37) | def __init__( method forward (line 51) | def forward(self, x): class TimestepBlock (line 62) | class TimestepBlock(nn.Module): method forward (line 68) | def forward(self, x, emb): class TimestepEmbedSequential (line 74) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 80) | def forward(self, x, emb, context=None): class Upsample (line 91) | class Upsample(nn.Module): method __init__ (line 100) | def __init__(self, channels, use_conv, dims=2, out_channels=None, padd... method forward (line 109) | def forward(self, x): class TransposedUpsample (line 121) | class TransposedUpsample(nn.Module): method __init__ (line 123) | def __init__(self, channels, out_channels=None, ks=5): method forward (line 130) | def forward(self,x): class Downsample (line 134) | class Downsample(nn.Module): method __init__ (line 143) | def __init__(self, channels, use_conv, dims=2, out_channels=None,paddi... method forward (line 158) | def forward(self, x): class ResBlock (line 163) | class ResBlock(TimestepBlock): method __init__ (line 179) | def __init__( method forward (line 243) | def forward(self, x, emb): method _forward (line 255) | def _forward(self, x, emb): class AttentionBlock (line 278) | class AttentionBlock(nn.Module): method __init__ (line 285) | def __init__( method forward (line 314) | def forward(self, x): method _forward (line 318) | def _forward(self, x): function count_flops_attn (line 327) | def count_flops_attn(model, _x, y): class QKVAttentionLegacy (line 347) | class QKVAttentionLegacy(nn.Module): method __init__ (line 352) | def __init__(self, n_heads): method forward (line 356) | def forward(self, qkv): method count_flops (line 375) | def count_flops(model, _x, y): class QKVAttention (line 379) | class QKVAttention(nn.Module): method __init__ (line 384) | def __init__(self, n_heads): method forward (line 388) | def forward(self, qkv): method count_flops (line 409) | def count_flops(model, _x, y): class UNetModel (line 413) | class UNetModel(nn.Module): method __init__ (line 443) | def __init__( method convert_to_fp16 (line 694) | def convert_to_fp16(self): method convert_to_fp32 (line 702) | def convert_to_fp32(self): method forward (line 710) | def forward(self, x, timesteps=None, context=None, y=None,**kwargs): class EncoderUNetModel (line 745) | class EncoderUNetModel(nn.Module): method __init__ (line 751) | def __init__( method convert_to_fp16 (line 924) | def convert_to_fp16(self): method convert_to_fp32 (line 931) | def convert_to_fp32(self): method forward (line 938) | def forward(self, x, timesteps): FILE: ldm_exp/ldm/modules/diffusionmodules/util.py function make_beta_schedule (line 21) | def make_beta_schedule(schedule, n_timestep, linear_start=1e-4, linear_e... function make_ddim_timesteps (line 46) | def make_ddim_timesteps(ddim_discr_method, num_ddim_timesteps, num_ddpm_... function make_ddim_sampling_parameters (line 63) | def make_ddim_sampling_parameters(alphacums, ddim_timesteps, eta, verbos... function betas_for_alpha_bar (line 77) | def betas_for_alpha_bar(num_diffusion_timesteps, alpha_bar, max_beta=0.9... function extract_into_tensor (line 96) | def extract_into_tensor(a, t, x_shape): function checkpoint (line 102) | def checkpoint(func, inputs, params, flag): class CheckpointFunction (line 119) | class CheckpointFunction(torch.autograd.Function): method forward (line 121) | def forward(ctx, run_function, length, *args): method backward (line 131) | def backward(ctx, *output_grads): function timestep_embedding (line 151) | def timestep_embedding(timesteps, dim, max_period=10000, repeat_only=Fal... function zero_module (line 174) | def zero_module(module): function scale_module (line 183) | def scale_module(module, scale): function mean_flat (line 192) | def mean_flat(tensor): function normalization (line 199) | def normalization(channels): class SiLU (line 209) | class SiLU(nn.Module): method forward (line 210) | def forward(self, x): class GroupNorm32 (line 214) | class GroupNorm32(nn.GroupNorm): method forward (line 215) | def forward(self, x): function conv_nd (line 218) | def conv_nd(dims, *args, **kwargs): function linear (line 231) | def linear(*args, **kwargs): function avg_pool_nd (line 238) | def avg_pool_nd(dims, *args, **kwargs): class HybridConditioner (line 251) | class HybridConditioner(nn.Module): method __init__ (line 253) | def __init__(self, c_concat_config, c_crossattn_config): method forward (line 258) | def forward(self, c_concat, c_crossattn): function noise_like (line 264) | def noise_like(shape, device, repeat=False): FILE: ldm_exp/ldm/modules/distributions/distributions.py class AbstractDistribution (line 5) | class AbstractDistribution: method sample (line 6) | def sample(self): method mode (line 9) | def mode(self): class DiracDistribution (line 13) | class DiracDistribution(AbstractDistribution): method __init__ (line 14) | def __init__(self, value): method sample (line 17) | def sample(self): method mode (line 20) | def mode(self): class DiagonalGaussianDistribution (line 24) | class DiagonalGaussianDistribution(object): method __init__ (line 25) | def __init__(self, parameters, deterministic=False): method sample (line 35) | def sample(self): method kl (line 39) | def kl(self, other=None): method nll (line 53) | def nll(self, sample, dims=[1,2,3]): method mode (line 61) | def mode(self): function normal_kl (line 65) | def normal_kl(mean1, logvar1, mean2, logvar2): FILE: ldm_exp/ldm/modules/ema.py class LitEma (line 5) | class LitEma(nn.Module): method __init__ (line 6) | def __init__(self, model, decay=0.9999, use_num_upates=True): method forward (line 25) | def forward(self,model): method copy_to (line 46) | def copy_to(self, model): method store (line 55) | def store(self, parameters): method restore (line 64) | def restore(self, parameters): FILE: ldm_exp/ldm/modules/encoders/modules.py class AbstractEncoder (line 12) | class AbstractEncoder(nn.Module): method __init__ (line 13) | def __init__(self): method encode (line 16) | def encode(self, *args, **kwargs): class ClassEmbedder (line 21) | class ClassEmbedder(nn.Module): method __init__ (line 22) | def __init__(self, embed_dim, n_classes=1000, key='class'): method forward (line 27) | def forward(self, batch, key=None): class TransformerEmbedder (line 36) | class TransformerEmbedder(AbstractEncoder): method __init__ (line 38) | def __init__(self, n_embed, n_layer, vocab_size, max_seq_len=77, devic... method forward (line 44) | def forward(self, tokens): method encode (line 49) | def encode(self, x): class BERTTokenizer (line 53) | class BERTTokenizer(AbstractEncoder): method __init__ (line 55) | def __init__(self, device="cuda", vq_interface=True, max_length=77): method forward (line 63) | def forward(self, text): method encode (line 70) | def encode(self, text): method decode (line 76) | def decode(self, text): class BERTEmbedder (line 80) | class BERTEmbedder(AbstractEncoder): method __init__ (line 82) | def __init__(self, n_embed, n_layer, vocab_size=30522, max_seq_len=77, method forward (line 93) | def forward(self, text): method encode (line 101) | def encode(self, text): class SpatialRescaler (line 106) | class SpatialRescaler(nn.Module): method __init__ (line 107) | def __init__(self, method forward (line 125) | def forward(self,x): method encode (line 134) | def encode(self, x): class FrozenCLIPTextEmbedder (line 138) | class FrozenCLIPTextEmbedder(nn.Module): method __init__ (line 142) | def __init__(self, version='ViT-L/14', device="cuda", max_length=77, n... method freeze (line 150) | def freeze(self): method forward (line 155) | def forward(self, text): method encode (line 162) | def encode(self, text): class FrozenClipImageEmbedder (line 170) | class FrozenClipImageEmbedder(nn.Module): method __init__ (line 174) | def __init__( method preprocess (line 189) | def preprocess(self, x): method forward (line 199) | def forward(self, x): FILE: ldm_exp/ldm/modules/image_degradation/bsrgan.py function modcrop_np (line 29) | def modcrop_np(img, sf): function analytic_kernel (line 49) | def analytic_kernel(k): function anisotropic_Gaussian (line 65) | def anisotropic_Gaussian(ksize=15, theta=np.pi, l1=6, l2=6): function gm_blur_kernel (line 86) | def gm_blur_kernel(mean, cov, size=15): function shift_pixel (line 99) | def shift_pixel(x, sf, upper_left=True): function blur (line 128) | def blur(x, k): function gen_kernel (line 145) | def gen_kernel(k_size=np.array([15, 15]), scale_factor=np.array([4, 4]),... function fspecial_gaussian (line 187) | def fspecial_gaussian(hsize, sigma): function fspecial_laplacian (line 201) | def fspecial_laplacian(alpha): function fspecial (line 210) | def fspecial(filter_type, *args, **kwargs): function bicubic_degradation (line 228) | def bicubic_degradation(x, sf=3): function srmd_degradation (line 240) | def srmd_degradation(x, k, sf=3): function dpsr_degradation (line 262) | def dpsr_degradation(x, k, sf=3): function classical_degradation (line 284) | def classical_degradation(x, k, sf=3): function add_sharpening (line 299) | def add_sharpening(img, weight=0.5, radius=50, threshold=10): function add_blur (line 325) | def add_blur(img, sf=4): function add_resize (line 339) | def add_resize(img, sf=4): function add_Gaussian_noise (line 369) | def add_Gaussian_noise(img, noise_level1=2, noise_level2=25): function add_speckle_noise (line 386) | def add_speckle_noise(img, noise_level1=2, noise_level2=25): function add_Poisson_noise (line 404) | def add_Poisson_noise(img): function add_JPEG_noise (line 418) | def add_JPEG_noise(img): function random_crop (line 427) | def random_crop(lq, hq, sf=4, lq_patchsize=64): function degradation_bsrgan (line 438) | def degradation_bsrgan(img, sf=4, lq_patchsize=72, isp_model=None): function degradation_bsrgan_variant (line 530) | def degradation_bsrgan_variant(image, sf=4, isp_model=None): function degradation_bsrgan_plus (line 617) | def degradation_bsrgan_plus(img, sf=4, shuffle_prob=0.5, use_sharp=True,... FILE: ldm_exp/ldm/modules/image_degradation/bsrgan_light.py function modcrop_np (line 29) | def modcrop_np(img, sf): function analytic_kernel (line 49) | def analytic_kernel(k): function anisotropic_Gaussian (line 65) | def anisotropic_Gaussian(ksize=15, theta=np.pi, l1=6, l2=6): function gm_blur_kernel (line 86) | def gm_blur_kernel(mean, cov, size=15): function shift_pixel (line 99) | def shift_pixel(x, sf, upper_left=True): function blur (line 128) | def blur(x, k): function gen_kernel (line 145) | def gen_kernel(k_size=np.array([15, 15]), scale_factor=np.array([4, 4]),... function fspecial_gaussian (line 187) | def fspecial_gaussian(hsize, sigma): function fspecial_laplacian (line 201) | def fspecial_laplacian(alpha): function fspecial (line 210) | def fspecial(filter_type, *args, **kwargs): function bicubic_degradation (line 228) | def bicubic_degradation(x, sf=3): function srmd_degradation (line 240) | def srmd_degradation(x, k, sf=3): function dpsr_degradation (line 262) | def dpsr_degradation(x, k, sf=3): function classical_degradation (line 284) | def classical_degradation(x, k, sf=3): function add_sharpening (line 299) | def add_sharpening(img, weight=0.5, radius=50, threshold=10): function add_blur (line 325) | def add_blur(img, sf=4): function add_resize (line 343) | def add_resize(img, sf=4): function add_Gaussian_noise (line 373) | def add_Gaussian_noise(img, noise_level1=2, noise_level2=25): function add_speckle_noise (line 390) | def add_speckle_noise(img, noise_level1=2, noise_level2=25): function add_Poisson_noise (line 408) | def add_Poisson_noise(img): function add_JPEG_noise (line 422) | def add_JPEG_noise(img): function random_crop (line 431) | def random_crop(lq, hq, sf=4, lq_patchsize=64): function degradation_bsrgan (line 442) | def degradation_bsrgan(img, sf=4, lq_patchsize=72, isp_model=None): function degradation_bsrgan_variant (line 534) | def degradation_bsrgan_variant(image, sf=4, isp_model=None): FILE: ldm_exp/ldm/modules/image_degradation/utils_image.py function is_image_file (line 29) | def is_image_file(filename): function get_timestamp (line 33) | def get_timestamp(): function imshow (line 37) | def imshow(x, title=None, cbar=False, figsize=None): function surf (line 47) | def surf(Z, cmap='rainbow', figsize=None): function get_image_paths (line 67) | def get_image_paths(dataroot): function _get_paths_from_images (line 74) | def _get_paths_from_images(path): function patches_from_image (line 93) | def patches_from_image(img, p_size=512, p_overlap=64, p_max=800): function imssave (line 112) | def imssave(imgs, img_path): function split_imageset (line 125) | def split_imageset(original_dataroot, taget_dataroot, n_channels=3, p_si... function mkdir (line 153) | def mkdir(path): function mkdirs (line 158) | def mkdirs(paths): function mkdir_and_rename (line 166) | def mkdir_and_rename(path): function imread_uint (line 185) | def imread_uint(path, n_channels=3): function imsave (line 203) | def imsave(img, img_path): function imwrite (line 209) | def imwrite(img, img_path): function read_img (line 220) | def read_img(path): function uint2single (line 249) | def uint2single(img): function single2uint (line 254) | def single2uint(img): function uint162single (line 259) | def uint162single(img): function single2uint16 (line 264) | def single2uint16(img): function uint2tensor4 (line 275) | def uint2tensor4(img): function uint2tensor3 (line 282) | def uint2tensor3(img): function tensor2uint (line 289) | def tensor2uint(img): function single2tensor3 (line 302) | def single2tensor3(img): function single2tensor4 (line 307) | def single2tensor4(img): function tensor2single (line 312) | def tensor2single(img): function tensor2single3 (line 320) | def tensor2single3(img): function single2tensor5 (line 329) | def single2tensor5(img): function single32tensor5 (line 333) | def single32tensor5(img): function single42tensor4 (line 337) | def single42tensor4(img): function tensor2img (line 342) | def tensor2img(tensor, out_type=np.uint8, min_max=(0, 1)): function augment_img (line 380) | def augment_img(img, mode=0): function augment_img_tensor4 (line 401) | def augment_img_tensor4(img, mode=0): function augment_img_tensor (line 422) | def augment_img_tensor(img, mode=0): function augment_img_np3 (line 441) | def augment_img_np3(img, mode=0): function augment_imgs (line 469) | def augment_imgs(img_list, hflip=True, rot=True): function modcrop (line 494) | def modcrop(img_in, scale): function shave (line 510) | def shave(img_in, border=0): function rgb2ycbcr (line 529) | def rgb2ycbcr(img, only_y=True): function ycbcr2rgb (line 553) | def ycbcr2rgb(img): function bgr2ycbcr (line 573) | def bgr2ycbcr(img, only_y=True): function channel_convert (line 597) | def channel_convert(in_c, tar_type, img_list): function calculate_psnr (line 621) | def calculate_psnr(img1, img2, border=0): function calculate_ssim (line 642) | def calculate_ssim(img1, img2, border=0): function ssim (line 669) | def ssim(img1, img2): function cubic (line 700) | def cubic(x): function calculate_weights_indices (line 708) | def calculate_weights_indices(in_length, out_length, scale, kernel, kern... function imresize (line 766) | def imresize(img, scale, antialiasing=True): function imresize_np (line 839) | def imresize_np(img, scale, antialiasing=True): FILE: ldm_exp/ldm/modules/losses/contperceptual.py class LPIPSWithDiscriminator (line 7) | class LPIPSWithDiscriminator(nn.Module): method __init__ (line 8) | def __init__(self, disc_start, logvar_init=0.0, kl_weight=1.0, pixello... method calculate_adaptive_weight (line 32) | def calculate_adaptive_weight(self, nll_loss, g_loss, last_layer=None): method forward (line 45) | def forward(self, inputs, reconstructions, posteriors, optimizer_idx, FILE: ldm_exp/ldm/modules/losses/vqperceptual.py function hinge_d_loss_with_exemplar_weights (line 11) | def hinge_d_loss_with_exemplar_weights(logits_real, logits_fake, weights): function adopt_weight (line 20) | def adopt_weight(weight, global_step, threshold=0, value=0.): function measure_perplexity (line 26) | def measure_perplexity(predicted_indices, n_embed): function l1 (line 35) | def l1(x, y): function l2 (line 39) | def l2(x, y): class VQLPIPSWithDiscriminator (line 43) | class VQLPIPSWithDiscriminator(nn.Module): method __init__ (line 44) | def __init__(self, disc_start, codebook_weight=1.0, pixelloss_weight=1.0, method calculate_adaptive_weight (line 85) | def calculate_adaptive_weight(self, nll_loss, g_loss, last_layer=None): method forward (line 98) | def forward(self, codebook_loss, inputs, reconstructions, optimizer_idx, FILE: ldm_exp/ldm/modules/x_transformer.py class AbsolutePositionalEmbedding (line 25) | class AbsolutePositionalEmbedding(nn.Module): method __init__ (line 26) | def __init__(self, dim, max_seq_len): method init_ (line 31) | def init_(self): method forward (line 34) | def forward(self, x): class FixedPositionalEmbedding (line 39) | class FixedPositionalEmbedding(nn.Module): method __init__ (line 40) | def __init__(self, dim): method forward (line 45) | def forward(self, x, seq_dim=1, offset=0): function exists (line 54) | def exists(val): function default (line 58) | def default(val, d): function always (line 64) | def always(val): function not_equals (line 70) | def not_equals(val): function equals (line 76) | def equals(val): function max_neg_value (line 82) | def max_neg_value(tensor): function pick_and_pop (line 88) | def pick_and_pop(keys, d): function group_dict_by_key (line 93) | def group_dict_by_key(cond, d): function string_begins_with (line 102) | def string_begins_with(prefix, str): function group_by_key_prefix (line 106) | def group_by_key_prefix(prefix, d): function groupby_prefix_and_trim (line 110) | def groupby_prefix_and_trim(prefix, d): class Scale (line 117) | class Scale(nn.Module): method __init__ (line 118) | def __init__(self, value, fn): method forward (line 123) | def forward(self, x, **kwargs): class Rezero (line 128) | class Rezero(nn.Module): method __init__ (line 129) | def __init__(self, fn): method forward (line 134) | def forward(self, x, **kwargs): class ScaleNorm (line 139) | class ScaleNorm(nn.Module): method __init__ (line 140) | def __init__(self, dim, eps=1e-5): method forward (line 146) | def forward(self, x): class RMSNorm (line 151) | class RMSNorm(nn.Module): method __init__ (line 152) | def __init__(self, dim, eps=1e-8): method forward (line 158) | def forward(self, x): class Residual (line 163) | class Residual(nn.Module): method forward (line 164) | def forward(self, x, residual): class GRUGating (line 168) | class GRUGating(nn.Module): method __init__ (line 169) | def __init__(self, dim): method forward (line 173) | def forward(self, x, residual): class GEGLU (line 184) | class GEGLU(nn.Module): method __init__ (line 185) | def __init__(self, dim_in, dim_out): method forward (line 189) | def forward(self, x): class FeedForward (line 194) | class FeedForward(nn.Module): method __init__ (line 195) | def __init__(self, dim, dim_out=None, mult=4, glu=False, dropout=0.): method forward (line 210) | def forward(self, x): class Attention (line 215) | class Attention(nn.Module): method __init__ (line 216) | def __init__( method forward (line 268) | def forward( class AttentionLayers (line 370) | class AttentionLayers(nn.Module): method __init__ (line 371) | def __init__( method forward (line 481) | def forward( class Encoder (line 541) | class Encoder(AttentionLayers): method __init__ (line 542) | def __init__(self, **kwargs): class TransformerWrapper (line 548) | class TransformerWrapper(nn.Module): method __init__ (line 549) | def __init__( method init_ (line 595) | def init_(self): method forward (line 598) | def forward( FILE: ldm_exp/ldm/util.py function log_txt_as_img (line 17) | def log_txt_as_img(wh, xc, size=10): function ismap (line 41) | def ismap(x): function isimage (line 47) | def isimage(x): function exists (line 53) | def exists(x): function default (line 57) | def default(val, d): function mean_flat (line 63) | def mean_flat(tensor): function count_params (line 71) | def count_params(model, verbose=False): function instantiate_from_config (line 78) | def instantiate_from_config(config): function get_obj_from_str (line 88) | def get_obj_from_str(string, reload=False): function _do_parallel_data_prefetch (line 96) | def _do_parallel_data_prefetch(func, Q, data, idx, idx_to_fn=False): function parallel_data_prefetch (line 108) | def parallel_data_prefetch( FILE: ldm_exp/main.py function get_parser (line 28) | def get_parser(**parser_kwargs): function nondefault_trainer_args (line 135) | def nondefault_trainer_args(opt): class WrappedDataset (line 142) | class WrappedDataset(Dataset): method __init__ (line 145) | def __init__(self, dataset): method __len__ (line 148) | def __len__(self): method __getitem__ (line 151) | def __getitem__(self, idx): function worker_init_fn (line 155) | def worker_init_fn(_): class DataModuleFromConfig (line 171) | class DataModuleFromConfig(pl.LightningDataModule): method __init__ (line 172) | def __init__(self, batch_size, train=None, validation=None, test=None,... method prepare_data (line 194) | def prepare_data(self): method setup (line 198) | def setup(self, stage=None): method _train_dataloader (line 206) | def _train_dataloader(self): method _val_dataloader (line 216) | def _val_dataloader(self, shuffle=False): method _test_dataloader (line 227) | def _test_dataloader(self, shuffle=False): method _predict_dataloader (line 240) | def _predict_dataloader(self, shuffle=False): class SetupCallback (line 249) | class SetupCallback(Callback): method __init__ (line 250) | def __init__(self, resume, now, logdir, ckptdir, cfgdir, config, light... method on_keyboard_interrupt (line 260) | def on_keyboard_interrupt(self, trainer, pl_module): method on_pretrain_routine_start (line 266) | def on_pretrain_routine_start(self, trainer, pl_module): class ImageLogger (line 301) | class ImageLogger(Callback): method __init__ (line 302) | def __init__(self, batch_frequency, max_images, clamp=True, increase_l... method _testtube (line 322) | def _testtube(self, pl_module, images, batch_idx, split): method log_local (line 333) | def log_local(self, save_dir, split, images, method log_img (line 352) | def log_img(self, pl_module, batch, batch_idx, split="train"): method check_frequency (line 384) | def check_frequency(self, check_idx): method on_train_batch_end (line 395) | def on_train_batch_end(self, trainer, pl_module, outputs, batch, batch... method on_validation_batch_end (line 399) | def on_validation_batch_end(self, trainer, pl_module, outputs, batch, ... class CUDACallback (line 407) | class CUDACallback(Callback): method on_train_epoch_start (line 409) | def on_train_epoch_start(self, trainer, pl_module): method on_train_epoch_end (line 415) | def on_train_epoch_end(self, trainer, pl_module, outputs): function load_model_from_config (line 548) | def load_model_from_config(config, ckpt): function get_model (line 558) | def get_model(): function melk (line 730) | def melk(*args, **kwargs): function divein (line 738) | def divein(*args, **kwargs): FILE: ldm_exp/notebook_helpers.py function download_models (line 19) | def download_models(mode): function load_model_from_config (line 40) | def load_model_from_config(config, ckpt): function get_model (line 52) | def get_model(mode): function get_custom_cond (line 59) | def get_custom_cond(mode): function get_cond_options (line 85) | def get_cond_options(mode): function select_cond_path (line 92) | def select_cond_path(mode): function get_cond (line 107) | def get_cond(mode, selected_path): function visualize_cond_img (line 127) | def visualize_cond_img(path): function run (line 131) | def run(model, selected_path, task, custom_steps, resize_enabled=False, ... function convsample_ddim (line 188) | def convsample_ddim(model, cond, steps, shape, eta=1.0, callback=None, n... function make_convolutional_sample (line 208) | def make_convolutional_sample(batch, model, mode="vanilla", custom_steps... FILE: ldm_exp/profile_ldm_pretrained.py function load_model_from_config (line 17) | def load_model_from_config(config, ckpt): function get_model (line 28) | def get_model(): FILE: ldm_exp/profile_model.py function load_model_from_config (line 21) | def load_model_from_config(config, ckpt): function get_model (line 32) | def get_model(): FILE: ldm_exp/prune_ldm.py function load_model_from_config (line 21) | def load_model_from_config(config, ckpt): function get_model (line 32) | def get_model(): FILE: ldm_exp/prune_ldm_no_grad.py function load_model_from_config (line 23) | def load_model_from_config(config, ckpt): function get_model (line 34) | def get_model(): FILE: ldm_exp/sample_for_FID.py function load_model_from_config (line 25) | def load_model_from_config(config, ckpt): function get_model (line 35) | def get_model(): FILE: ldm_exp/sample_imagenet.py function load_model_from_config (line 14) | def load_model_from_config(config, ckpt): function get_model (line 25) | def get_model(): FILE: ldm_exp/scripts/inpaint.py function make_batch (line 11) | def make_batch(image, mask, device): FILE: ldm_exp/scripts/knn2img.py function chunk (line 36) | def chunk(it, size): function load_model_from_config (line 41) | def load_model_from_config(config, ckpt, verbose=False): class Searcher (line 61) | class Searcher(object): method __init__ (line 62) | def __init__(self, database, retriever_version='ViT-L/14'): method train_searcher (line 75) | def train_searcher(self, k, method load_single_file (line 91) | def load_single_file(self, saved_embeddings): method load_multi_files (line 96) | def load_multi_files(self, data_archive): method load_database (line 104) | def load_database(self): method load_retriever (line 123) | def load_retriever(self, version='ViT-L/14', ): method load_searcher (line 130) | def load_searcher(self): method search (line 135) | def search(self, x, k): method __call__ (line 163) | def __call__(self, x, n): FILE: ldm_exp/scripts/sample_diffusion.py function custom_to_pil (line 15) | def custom_to_pil(x): function custom_to_np (line 27) | def custom_to_np(x): function logs2pil (line 36) | def logs2pil(logs, keys=["sample"]): function convsample (line 54) | def convsample(model, shape, return_intermediates=True, function convsample_ddim (line 69) | def convsample_ddim(model, steps, shape, eta=1.0 function make_convolutional_sample (line 79) | def make_convolutional_sample(model, batch_size, vanilla=False, custom_s... function run (line 108) | def run(model, logdir, batch_size=50, vanilla=False, custom_steps=None, ... function save_logs (line 143) | def save_logs(logs, path, n_saved=0, key="sample", np_path=None): function get_parser (line 162) | def get_parser(): function load_model_from_config (line 220) | def load_model_from_config(config, sd): function load_model (line 228) | def load_model(config, ckpt, gpu, eval_mode): FILE: ldm_exp/scripts/train_searcher.py function search_bruteforce (line 12) | def search_bruteforce(searcher): function search_partioned_ah (line 16) | def search_partioned_ah(searcher, dims_per_block, aiq_threshold, reorder_k, function search_ah (line 24) | def search_ah(searcher, dims_per_block, aiq_threshold, reorder_k): function load_datapool (line 28) | def load_datapool(dpath): function train_searcher (line 62) | def train_searcher(opt, FILE: ldm_exp/scripts/txt2img.py function load_model_from_config (line 15) | def load_model_from_config(config, ckpt, verbose=False): FILE: ldm_exp/test_criterion.py function load_model_from_config (line 27) | def load_model_from_config(config, ckpt): function get_model (line 38) | def get_model(): FILE: ldm_prune.py function reset_parameters (line 116) | def reset_parameters(model): FILE: tools/convert_ddpm_original_checkpoint_to_diffusers_cifar10.py function shave_segments (line 9) | def shave_segments(path, n_shave_prefix_segments=1): function renew_resnet_paths (line 19) | def renew_resnet_paths(old_list, n_shave_prefix_segments=0): function renew_attention_paths (line 35) | def renew_attention_paths(old_list, n_shave_prefix_segments=0, in_mid=Fa... function assign_to_checkpoint (line 56) | def assign_to_checkpoint( function convert_ddpm_checkpoint (line 99) | def convert_ddpm_checkpoint(checkpoint, config): function convert_vq_autoenc_checkpoint (line 236) | def convert_vq_autoenc_checkpoint(checkpoint, config): FILE: tools/convert_ldm_original_checkpoint_to_diffusers.py function shave_segments (line 25) | def shave_segments(path, n_shave_prefix_segments=1): function renew_resnet_paths (line 35) | def renew_resnet_paths(old_list, n_shave_prefix_segments=0): function renew_attention_paths (line 57) | def renew_attention_paths(old_list, n_shave_prefix_segments=0): function assign_to_checkpoint (line 78) | def assign_to_checkpoint( function convert_ldm_checkpoint (line 130) | def convert_ldm_checkpoint(checkpoint, config): FILE: utils.py class UnlabeledImageFolder (line 8) | class UnlabeledImageFolder(torch.utils.data.Dataset): method __init__ (line 9) | def __init__(self, root, transform=None, exts=["*.jpg", "*.png", "*.jp... method __len__ (line 16) | def __len__(self): method __getitem__ (line 19) | def __getitem__(self, idx): function set_dropout (line 26) | def set_dropout(model, p): function get_dataset (line 31) | def get_dataset(name_or_path, transform=None):