MCPcopy Create free account

hub / github.com/CompVis/diff2flow / functions

Functions426 in github.com/CompVis/diff2flow

↓ 1 callersMethod_vb_terms_bpd
Get a term for the variational lower-bound. The resulting units are bits (rather than nats, as one might expect). This allow
diff2flow/ddpm.py:412
↓ 1 callersMethod_warmed_up
(self)
diff2flow/openai_diffusion/timestep_sampler.py:149
↓ 1 callersFunctionabs_rel_error
(pred, target, valid_mask=None)
diff2flow/dataset/depth_utils.py:84
↓ 1 callersMethodadd_lora_to_unet
(self)
diff2flow/trainer_module.py:197
↓ 1 callersMethodaggregate
(self)
diff2flow/metrics.py:54
↓ 1 callersMethodalpha_dt_t
(self, t)
diff2flow/flow.py:64
↓ 1 callersMethodalpha_dt_t
(self, t)
diff2flow/flow.py:168
↓ 1 callersMethodalpha_t
(self, t)
diff2flow/flow.py:61
↓ 1 callersMethodalpha_t
(self, t)
diff2flow/flow.py:165
↓ 1 callersMethodapply_cond_dropout
(self, x)
diff2flow/trainer_module.py:440
↓ 1 callersFunctionapply_scale_and_shift
Returns a scale-and-shift version of pred according to gt Args: pred: predicted image (b, c, h, w) gt : ground truth image
diff2flow/dataset/depth_utils.py:66
↓ 1 callersFunctionavg_pool_nd
Create a 1D, 2D, or 3D average pooling module.
diff2flow/models/unet/util.py:135
↓ 1 callersMethodbackward
(ctx, *output_grads)
diff2flow/models/unet/util.py:48
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
diff2flow/ddpm.py:42
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
diff2flow/openai_diffusion/gaussian_diffusion.py:125
↓ 1 callersFunctioncalculate_PSNR
(img1, img2)
diff2flow/metrics.py:12
↓ 1 callersFunctioncalculate_valid_mask
(depth, dataset_name)
diff2flow/dataset/depth_preprocessing.py:42
↓ 1 callersFunctioncheck_config
(cfg)
train.py:30
↓ 1 callersMethodcheck_interval
(self, diffusion_form="sigma", reverse=False, last_step_size=0.04)
diff2flow/flow.py:241
↓ 1 callersFunctioncheckpoint
Evaluate a function without caching intermediate activations, allowing for reduced memory at the expense of extra compute in the backward pas
diff2flow/models/unet/attention.py:341
↓ 1 callersMethodcompute_d_alpha_alpha_ratio_t
Compute the ratio between d_alpha and alpha
diff2flow/flow.py:82
↓ 1 callersMethodcompute_diffusion
Compute the diffusion term of the SDE Args: x: [batch_dim, ...], data point t: [batch_dim,], time vector form: s
diff2flow/flow.py:96
↓ 1 callersMethodcondition_mean
Compute the mean for the previous step, given a function cond_fn that computes the gradient of a conditional log probability with res
diff2flow/openai_diffusion/gaussian_diffusion.py:346
↓ 1 callersMethodconvert_fm_xt_to_dm_xt
Convert fm trajectory to dm trajectory using the fm t We use linear scaling here
diff2flow/flow_obj.py:120
↓ 1 callersFunctioncosine_log_snr
Returns log Signal-to-Noise ratio for time step t and image size 64 eps: avoid division by zero
diff2flow/diffusion.py:16
↓ 1 callersFunctioncount_params
(model)
diff2flow/helpers.py:114
↓ 1 callersMethodddim_sample
Sample x_{t-1} from the model using DDIM. Same usage as p_sample().
diff2flow/openai_diffusion/gaussian_diffusion.py:513
↓ 1 callersMethodddim_sample_loop_progressive
Use DDIM to sample from the model and yield intermediate samples from each timestep of DDIM. Same usage as p_sample_loop_prog
diff2flow/openai_diffusion/gaussian_diffusion.py:633
↓ 1 callersMethoddecode
Args: z: torch.Tensor, shape (b, latent_channels, h, w)
diff2flow/tiny_autoencoder.py:76
↓ 1 callersMethoddecode
Args: z: latent code tensor (B, C, H, W)
diff2flow/kl_autoencoder.py:511
↓ 1 callersFunctiondelta1_accuracy
(pred, target)
diff2flow/dataset/depth_utils.py:95
↓ 1 callersFunctiondiscretized_gaussian_log_likelihood
Compute the log-likelihood of a Gaussian distribution discretizing to a given image. :param x: the target images. It is assumed that thi
diff2flow/ddpm.py:533
↓ 1 callersFunctiondiscretized_gaussian_log_likelihood
Compute the log-likelihood of a Gaussian distribution discretizing to a given image. :param x: the target images. It is assumed that this
diff2flow/openai_diffusion/diffusion_utils.py:62
↓ 1 callersFunctiondistance_to_planar_depth
Convert distance to focal point to planar depth. Adapted from https://github.com/apple/ml-hypersim/issues/9#issuecomment-754935697 Args:
diff2flow/dataset/depth_preprocessing.py:9
↓ 1 callersMethodencode
(self, *args, **kwargs)
diff2flow/ema.py:235
↓ 1 callersMethodencode
Args: x: torch.Tensor, shape (b, 3, h, w) in [-1, 1]
diff2flow/tiny_autoencoder.py:66
↓ 1 callersMethodencode
Args: x: input tensor (B, C, H, W) in range [-1, 1] scaled with self.scale and shifted with self.shift
diff2flow/kl_autoencoder.py:495
↓ 1 callersMethodencode
(self, text)
diff2flow/conditioning/encoders.py:210
↓ 1 callersMethodencode
(self, text)
diff2flow/conditioning/encoders.py:251
↓ 1 callersMethodencode_with_transformer
(self, text)
diff2flow/conditioning/encoders.py:191
↓ 1 callersMethodencode_with_vision_transformer
(self, img)
diff2flow/conditioning/encoders.py:139
↓ 1 callersFunctionenforce_zero_terminal_snr
Fix for linear beta schedules to ensure that the SNR at the end of the diffusion chain is 0 (zero terminal SNR), according to the paper
diff2flow/ddpm.py:61
↓ 1 callersFunctionenforce_zero_terminal_snr
(betas)
diff2flow/utils/diffusion_utils.py:29
↓ 1 callersMethodevaluate_and_visualize_batch
(self, batch, prefix="train")
diff2flow/trainer_module.py:681
↓ 1 callersFunctionexists
(val)
diff2flow/ema.py:14
↓ 1 callersMethodforward
(self, x1: Tensor, x0: Tensor, **kwargs)
diff2flow/trainer_module.py:194
↓ 1 callersMethodfreeze
(self)
diff2flow/conditioning/encoders.py:128
↓ 1 callersMethodfreeze
(self)
diff2flow/conditioning/encoders.py:180
↓ 1 callersMethodfreeze
(self)
diff2flow/conditioning/encoders.py:236
↓ 1 callersMethodget_batch
(self, x=None)
diff2flow/lora.py:36
↓ 1 callersFunctionget_batch_scale_and_shift
Returns the scale and shift between two images More precisely, we find (b1, b2) such that img1 = b1 + b2*img2 We mod
diff2flow/dataset/depth_utils.py:46
↓ 1 callersFunctionget_beta_schedule
This is the deprecated API for creating beta schedules. See get_named_beta_schedule() for the new library of schedules.
diff2flow/openai_diffusion/gaussian_diffusion.py:65
↓ 1 callersMethodget_current_decay
(self)
diff2flow/ema.py:171
↓ 1 callersFunctionget_grad_norm
(model)
diff2flow/trainer_module.py:726
↓ 1 callersFunctionget_iter_exponential_schedule
(optimizer: Optimizer, num_warmup_steps: int, num_training_steps: int, final_ratio: float)
diff2flow/lr_schedulers.py:111
↓ 1 callersFunctionget_lr
(optimizer)
diff2flow/lr_schedulers.py:121
↓ 1 callersFunctionget_scale_and_shift
Returns the scale and shift between two images More precisely, we find (b1, b2) such that img1 = b1 + b2*img2 We mod
diff2flow/dataset/depth_utils.py:12
↓ 1 callersMethodget_score_from_velocity
Wrapper function: transfrom velocity prediction model to score Args: velocity: [batch_dim, ...] shaped tensor; velocity model outp
diff2flow/flow.py:119
↓ 1 callersMethodget_v
v-parameterization: sqrt(alpha_bar_t) * eps - sqrt(1 - alpha_bar_t) * x_0
diff2flow/ddpm.py:211
↓ 1 callersMethodget_vector_field_from_eps
eps is the SD eps-parameterized vector field with the FM vector field is defined as z - eps First of all convert the x_t fro
diff2flow/flow_obj.py:169
↓ 1 callersMethodget_vector_field_from_v
v is the SD v-parameterized vector field with v = sqrt(alpha_cumprod) * eps - sqrt(1 - alpha_cumprod) * z the FM vector field is defi
diff2flow/flow_obj.py:156
↓ 1 callersMethodguess_latent_channels
guess latent channel count based on encoder filename
diff2flow/tiny_autoencoder.py:84
↓ 1 callersFunctionims_to_grid
Args: ims: Tensor of shape (b, c, h, w) stack: "row" or "col" split: If 'row' stack by rows, if 'col' stack by columns.
diff2flow/visualizer.py:7
↓ 1 callersMethodinit_uncond
(self, path="nulltext.npy")
diff2flow/conditioning/encoders.py:33
↓ 1 callersFunctioninterpolate_nans
Interpolate nans in a depth image by using the closest non-nan value.
diff2flow/dataset/depth_preprocessing.py:29
↓ 1 callersMethodlast_step
Get the last step function of the SDE solver
diff2flow/flow.py:273
↓ 1 callersMethodload_from_ckpt
(self, ckpt_path)
diff2flow/models/unet/openaimodel.py:772
↓ 1 callersFunctionload_lora_weights
(model, ckpt_path, strict=False, verbose=False)
diff2flow/helpers.py:87
↓ 1 callersFunctionload_model_weights
(model, ckpt_path, strict=True, verbose=True)
diff2flow/helpers.py:65
↓ 1 callersFunctionmain
(cfg: DictConfig)
train.py:42
↓ 1 callersFunctionmake_beta_schedule
(schedule, n_timestep, linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3)
diff2flow/ddpm.py:13
↓ 1 callersFunctionmake_beta_schedule
(schedule, n_timestep, linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3)
diff2flow/utils/diffusion_utils.py:5
↓ 1 callersFunctionmake_ddim_sampling_parameters
(alphacums, ddim_timesteps, eta, verbose=True)
diff2flow/ddim.py:37
↓ 1 callersFunctionmake_ddim_timesteps
(ddim_discr_method, num_ddim_timesteps, num_ddpm_timesteps, verbose=True)
diff2flow/ddim.py:18
↓ 1 callersMethodmodel
(self)
diff2flow/ema.py:131
↓ 1 callersMethodp_sample
Sample x_{t-1} from the model at the given timestep.
diff2flow/ddpm.py:336
↓ 1 callersMethodp_sample
Sample x_{t-1} from the model at the given timestep. :param model: the model to sample from. :param x: the current tensor at
diff2flow/openai_diffusion/gaussian_diffusion.py:376
↓ 1 callersMethodp_sample_loop
Generate samples from the model.
diff2flow/ddpm.py:350
↓ 1 callersMethodp_sample_loop_progressive
Generate samples from the model and yield intermediate samples from each timestep of diffusion. Arguments are the same as p_s
diff2flow/openai_diffusion/gaussian_diffusion.py:464
↓ 1 callersFunctionper_sample_min_max_normalization
Normalize each sample in a batch independently with min-max normalization to [0, 1]
diff2flow/dataset/depth_utils.py:122
↓ 1 callersMethodpredict_eps_from_xstart
(self, x_t, t, pred_xstart)
diff2flow/ddpm.py:287
↓ 1 callersMethodpredict_start_from_eps
(self, x_t, t, noise)
diff2flow/flow_obj.py:150
↓ 1 callersMethodpredict_start_from_noise
(self, x_t, t, noise)
diff2flow/ddpm.py:269
↓ 1 callersMethodpredict_start_from_z_and_v
(self, x_t, t, v)
diff2flow/ddpm.py:275
↓ 1 callersMethodpreprocess
(self, x)
diff2flow/conditioning/encoders.py:42
↓ 1 callersMethodpreprocess
(self, x)
diff2flow/conditioning/encoders.py:120
↓ 1 callersFunctionpreprocess_depth
Args: depth: depth map in numpy format and range [0, inf] w. shape (H, W) dataset_name: name of the dataset (e.g. vkitti2, hypers
diff2flow/dataset/depth_preprocessing.py:76
↓ 1 callersMethodpreprocess_sample
get dataset name
diff2flow/dataset/depth_preprocessing.py:133
↓ 1 callersMethodprior_bpd
Get the prior KL term for the variational lower-bound, measured in bits-per-dim. This term can't be optimized, as it only depends on
diff2flow/ddpm.py:397
↓ 1 callersMethodq_mean_variance
Get the distribution q(x_t | x_0).
diff2flow/ddpm.py:190
↓ 1 callersMethodq_mean_variance
Get the distribution q(x_t | x_0). :param x_start: the [N x C x ...] tensor of noiseless inputs. :param t: the number of diff
diff2flow/openai_diffusion/gaussian_diffusion.py:203
↓ 1 callersMethodq_sample
Diffuse the data for a given number of diffusion steps. In other words sample from q(x_t | x_0). Args: x_start:
diff2flow/diffusion.py:48
↓ 1 callersMethodregister_schedule
(self, beta_schedule="linear", timesteps=1000, linear_start=1e-4, linear_end=2e-2, c
diff2flow/ddpm.py:129
↓ 1 callersMethodregister_sdv2_schedule
(self, diffusion_schedule, enforce_zero_snr=True)
diff2flow/flow_obj.py:40
↓ 1 callersMethodreset
(self)
diff2flow/lora.py:50
↓ 1 callersFunctionresize
(sample, size)
diff2flow/dataset/depth_preprocessing.py:62
↓ 1 callersFunctionresize_ims
(x: Tensor, size: int, mode: str = "bilinear", **kwargs)
diff2flow/helpers.py:158
↓ 1 callersMethodscore
(self, x, t, model, **model_kwargs)
diff2flow/flow.py:236
↓ 1 callersFunctionseed_everything
(seed)
diff2flow/helpers.py:135
↓ 1 callersFunctionshifted_cosine_alpha_bar
(t, im_size: int, ref_size: int = 64)
diff2flow/diffusion.py:32
← previousnext →101–200 of 426, ranked by callers