MCPcopy Create free account

hub / github.com/CompVis/diff2flow / functions

Functions426 in github.com/CompVis/diff2flow

Methodcondition_score
(self, cond_fn, *args, **kwargs)
diff2flow/openai_diffusion/respace.py:102
Methodconfigure_optimizers
(self)
diff2flow/trainer_module.py:185
Functioncontinuous_gaussian_log_likelihood
Compute the log-likelihood of a continuous Gaussian distribution. :param x: the targets :param means: the Gaussian mean Tensor. :para
diff2flow/openai_diffusion/diffusion_utils.py:47
Functionconvert_module_to_f16
(x)
diff2flow/models/unet/openaimodel.py:27
Functionconvert_module_to_f32
(x)
diff2flow/models/unet/openaimodel.py:30
Methodconvert_to_fp16
Convert the torso of the model to float16.
diff2flow/models/unet/openaimodel.py:805
Methodconvert_to_fp32
Convert the torso of the model to float32.
diff2flow/models/unet/openaimodel.py:813
Methodcopy_params_from_ema_to_model
(self)
diff2flow/ema.py:162
Methodcount_flops
(model, _x, y)
diff2flow/models/unet/openaimodel.py:378
Methodcount_flops
(model, _x, y)
diff2flow/models/unet/openaimodel.py:412
Functioncreate_diffusion
( timestep_respacing, noise_schedule="linear", use_kl=False, sigma_small=False, predict_x
diff2flow/openai_diffusion/__init__.py:10
Functioncreate_named_schedule_sampler
Create a ScheduleSampler from a library of pre-defined samplers. :param name: the name of the sampler. :param diffusion: the diffusion ob
diff2flow/openai_diffusion/timestep_sampler.py:13
Methodddim_reverse_sample
Sample x_{t+1} from the model using DDIM reverse ODE.
diff2flow/openai_diffusion/gaussian_diffusion.py:562
Methodddim_sample_loop
Generate samples from the model using DDIM. Same usage as p_sample_loop().
diff2flow/openai_diffusion/gaussian_diffusion.py:600
Methoddecode
( self, model, x_latent, t_start=None, ddim_steps=100, use_ori
diff2flow/ddim.py:284
Functiondefault
(val, d)
diff2flow/kl_autoencoder.py:29
Functiondict_collation_fn
Take a list of samples (as dictionary) and create a batch, preserving the keys. If `tensors` is True, `ndarray` objects are combined into ten
diff2flow/dataloader.py:19
Methoddiffusion_fn
(x, t)
diff2flow/flow.py:261
Methodencode
( self, model, x0, t_enc=None, ddim_steps=100, use_original_st
diff2flow/ddim.py:224
Methodencode
(self, text)
diff2flow/conditioning/encoders.py:144
Functionextract_and_interpolate_into_tensor
(a, t, x_shape)
diff2flow/utils/diffusion_utils.py:61
Methodfilter_out_keys
(self, sample)
diff2flow/dataloader.py:187
Methodforward
(self, *args, **kwargs)
diff2flow/ddpm.py:264
Methodforward
(self, x)
diff2flow/tiny_autoencoder.py:15
Methodforward
(self, x)
diff2flow/tiny_autoencoder.py:25
Methodforward
(self, x: torch.Tensor, t: torch.Tensor, **kwargs)
diff2flow/diffusion.py:104
Methodforward
Forward pass for the flow model
diff2flow/flow_obj.py:182
Methodforward
(self, x)
diff2flow/kl_autoencoder.py:96
Methodforward
(self, x)
diff2flow/kl_autoencoder.py:111
Methodforward
(self, x, temb=None)
diff2flow/kl_autoencoder.py:152
Methodforward
(self, x)
diff2flow/kl_autoencoder.py:201
Methodforward
(self, x)
diff2flow/kl_autoencoder.py:312
Methodforward
(self, z)
diff2flow/kl_autoencoder.py:409
Methodforward
(self, input, sample_posterior=True)
diff2flow/kl_autoencoder.py:521
Methodforward
(self, x)
diff2flow/lora.py:76
Methodforward
Args: x (torch.Tensor): In shape of (B, C, H, W)
diff2flow/lora.py:109
Methodforward
Args: x (torch.Tensor): In shape of (B, C, H, W)
diff2flow/lora.py:155
Methodforward
(self, x)
diff2flow/dataset/image_preprocessing.py:11
Methodforward
(self, x, no_dropout=False)
diff2flow/conditioning/encoders.py:50
Methodforward
(self, x, *args, **kwargs)
diff2flow/conditioning/encoders.py:87
Methodforward
(self, image, no_dropout=False)
diff2flow/conditioning/encoders.py:133
Methodforward
(self, text)
diff2flow/conditioning/encoders.py:185
Methodforward
(self, text)
diff2flow/conditioning/encoders.py:241
Methodforward
(self, x)
diff2flow/models/unet/openaimodel.py:54
Methodforward
Apply the module to `x` given `emb` timestep embeddings.
diff2flow/models/unet/openaimodel.py:71
Methodforward
(self, x, emb, context=None)
diff2flow/models/unet/openaimodel.py:83
Methodforward
(self, x)
diff2flow/models/unet/openaimodel.py:112
Methodforward
(self,x)
diff2flow/models/unet/openaimodel.py:133
Methodforward
(self, x)
diff2flow/models/unet/openaimodel.py:161
Methodforward
Apply the block to a Tensor, conditioned on a timestep embedding. :param x: an [N x C x ...] Tensor of features. :param emb:
diff2flow/models/unet/openaimodel.py:246
Methodforward
(self, x)
diff2flow/models/unet/openaimodel.py:317
Methodforward
Apply QKV attention. :param qkv: an [N x (H * 3 * C) x T] tensor of Qs, Ks, and Vs. :return: an [N x (H * C) x T] tensor afte
diff2flow/models/unet/openaimodel.py:359
Methodforward
Apply QKV attention. :param qkv: an [N x (3 * H * C) x T] tensor of Qs, Ks, and Vs. :return: an [N x (H * C) x T] tensor afte
diff2flow/models/unet/openaimodel.py:391
Methodforward
(self, t)
diff2flow/models/unet/openaimodel.py:421
Methodforward
Apply the model to an input batch. :param x: an [N x C x ...] Tensor of inputs. :param t: a 1-D batch of timesteps. :
diff2flow/models/unet/openaimodel.py:821
Methodforward
(self, x)
diff2flow/models/unet/attention.py:52
Methodforward
(self, x)
diff2flow/models/unet/attention.py:73
Methodforward
(self, x)
diff2flow/models/unet/attention.py:117
Methodforward
(self, x, context=None, mask=None)
diff2flow/models/unet/attention.py:161
Methodforward
(self, x, context=None, mask=None)
diff2flow/models/unet/attention.py:214
Methodforward
(self, x, context=None)
diff2flow/models/unet/attention.py:266
Methodforward
(self, x, context=None)
diff2flow/models/unet/attention.py:319
Methodforward
(ctx, run_function, length, *args)
diff2flow/models/unet/attention.py:360
Methodforward
(ctx, run_function, length, *args)
diff2flow/models/unet/util.py:36
Methodforward
(self, x)
diff2flow/models/unet/util.py:111
Functionforward_with_cfg
Function to include sampling with Classifier-Free Guidance (CFG)
diff2flow/diffusion.py:193
Methodgenerate
Args: x: source minibatch (bs, *dim) sample_kwargs: dict, additional sampling arguments for the solver
diff2flow/flow.py:454
Methodgenerate
Args: x: source minibatch (bs, *dim) sample_kwargs: dict, additional sampling arguments for the solver
diff2flow/diffusion.py:116
Functionget_batch_stats
(x: Tensor, stats=None)
diff2flow/helpers.py:163
Functionget_constant_schedule_with_warmup
Create a schedule with a constant learning rate preceded by a warmup period during which the learning rate increases linearly between 0 and t
diff2flow/lr_schedulers.py:18
Functionget_cosine_schedule_with_warmup
Create a schedule with a learning rate that decreases following the values of the cosine function between the initial lr set in the optimizer
diff2flow/lr_schedulers.py:49
Methodget_midblock_features
Apply the model to an input batch and return the features from the middle block. :param x: an [N x C x ...] Tensor of inputs.
diff2flow/models/unet/openaimodel.py:857
Functionget_module_device
(m: Module)
diff2flow/ema.py:17
Functionget_named_beta_schedule
Get a pre-defined beta schedule for the given name. The beta schedule library consists of beta schedules which remain similar in the limi
diff2flow/openai_diffusion/gaussian_diffusion.py:98
Methodget_noise_from_velocity
Wrapper function: transfrom velocity prediction model to denoiser Args: velocity: [batch_dim, ...] shaped tensor; velocity model o
diff2flow/flow.py:135
Methodget_unconditional_conditioning
Returns: torch.Tensor: Unconditional conditioning information for text of shape (1, max_length, d_model), e.g. (1
diff2flow/conditioning/encoders.py:214
Methodget_unconditional_conditioning
Returns: torch.Tensor: Unconditional conditioning information for text of shape (1, max_length, d_model), e.g. (1
diff2flow/conditioning/encoders.py:255
Methodget_velocity_from_score
Wrapper function: transfrom score prediction model to velocity Args: score: [batch_dim, ...] shaped tensor; score model output
diff2flow/flow.py:151
Functionidentity
(x)
diff2flow/dataloader.py:50
Methodinference
(self, batch, use_ema: bool = True, **kwargs)
diff2flow/trainer_module.py:609
Functioninit_
(tensor)
diff2flow/models/unet/attention.py:39
Functioninplace_copy
(src: Tensor, tgt: Tensor, *, auto_move_device = False)
diff2flow/ema.py:20
Functioninplace_lerp
(src: Tensor, tgt: Tensor, weight, *, auto_move_device = False)
diff2flow/ema.py:26
Methodis_vb
(self)
diff2flow/openai_diffusion/gaussian_diffusion.py:54
Methodkl
(self, other=None)
diff2flow/kl_autoencoder.py:60
Functionload_model_from_config
(config, ckpt, verbose=False, ignore_keys=[])
diff2flow/helpers.py:30
Functionlog_snr_to_alpha_bar
(t)
diff2flow/diffusion.py:28
Functionmax_neg_value
(t)
diff2flow/models/unet/attention.py:35
Methodnll
(self, sample, dims=[1,2,3])
diff2flow/kl_autoencoder.py:74
Methodode_fn
(self, t, x, **kwargs)
diff2flow/flow.py:451
Methodode_fn
(self, t, x, **kwargs)
diff2flow/flow_obj.py:34
Methodon_validation_epoch_end
(self)
diff2flow/trainer_module.py:667
Methodp_mean_variance
( self, model, *args, **kwargs )
diff2flow/openai_diffusion/respace.py:89
Methodp_sample_loop
Generate samples from the model. :param model: the model module. :param shape: the shape of the samples, (N, C, H, W).
diff2flow/openai_diffusion/gaussian_diffusion.py:419
Functionpad_vector_like_x
Function to reshape the vector by the number of dimensions of x. E.g. x (bs, c, h, w), v (bs) -> v (bs, 1, 1, 1).
diff2flow/helpers.py:148
Methodpredict_eps_from_z_and_v
(self, x_t, t, v)
diff2flow/ddpm.py:281
Methodprepare_data
(self)
diff2flow/dataloader.py:254
Methodprocess_xstart
(x)
diff2flow/openai_diffusion/gaussian_diffusion.py:310
Methodreset
(self)
diff2flow/metrics.py:49
Methodreset
(self)
diff2flow/metrics.py:93
← previousnext →301–400 of 426, ranked by callers