Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CompVis/diff2flow
/ functions
Functions
426 in github.com/CompVis/diff2flow
⨍
Functions
426
◇
Types & classes
79
Method
condition_score
(self, cond_fn, *args, **kwargs)
diff2flow/openai_diffusion/respace.py:102
Method
configure_optimizers
(self)
diff2flow/trainer_module.py:185
Function
continuous_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
Function
convert_module_to_f16
(x)
diff2flow/models/unet/openaimodel.py:27
Function
convert_module_to_f32
(x)
diff2flow/models/unet/openaimodel.py:30
Method
convert_to_fp16
Convert the torso of the model to float16.
diff2flow/models/unet/openaimodel.py:805
Method
convert_to_fp32
Convert the torso of the model to float32.
diff2flow/models/unet/openaimodel.py:813
Method
copy_params_from_ema_to_model
(self)
diff2flow/ema.py:162
Method
count_flops
(model, _x, y)
diff2flow/models/unet/openaimodel.py:378
Method
count_flops
(model, _x, y)
diff2flow/models/unet/openaimodel.py:412
Function
create_diffusion
( timestep_respacing, noise_schedule="linear", use_kl=False, sigma_small=False, predict_x
diff2flow/openai_diffusion/__init__.py:10
Function
create_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
Method
ddim_reverse_sample
Sample x_{t+1} from the model using DDIM reverse ODE.
diff2flow/openai_diffusion/gaussian_diffusion.py:562
Method
ddim_sample_loop
Generate samples from the model using DDIM. Same usage as p_sample_loop().
diff2flow/openai_diffusion/gaussian_diffusion.py:600
Method
decode
( self, model, x_latent, t_start=None, ddim_steps=100, use_ori
diff2flow/ddim.py:284
Function
default
(val, d)
diff2flow/kl_autoencoder.py:29
Function
dict_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
Method
diffusion_fn
(x, t)
diff2flow/flow.py:261
Method
encode
( self, model, x0, t_enc=None, ddim_steps=100, use_original_st
diff2flow/ddim.py:224
Method
encode
(self, text)
diff2flow/conditioning/encoders.py:144
Function
extract_and_interpolate_into_tensor
(a, t, x_shape)
diff2flow/utils/diffusion_utils.py:61
Method
filter_out_keys
(self, sample)
diff2flow/dataloader.py:187
Method
forward
(self, *args, **kwargs)
diff2flow/ddpm.py:264
Method
forward
(self, x)
diff2flow/tiny_autoencoder.py:15
Method
forward
(self, x)
diff2flow/tiny_autoencoder.py:25
Method
forward
(self, x: torch.Tensor, t: torch.Tensor, **kwargs)
diff2flow/diffusion.py:104
Method
forward
Forward pass for the flow model
diff2flow/flow_obj.py:182
Method
forward
(self, x)
diff2flow/kl_autoencoder.py:96
Method
forward
(self, x)
diff2flow/kl_autoencoder.py:111
Method
forward
(self, x, temb=None)
diff2flow/kl_autoencoder.py:152
Method
forward
(self, x)
diff2flow/kl_autoencoder.py:201
Method
forward
(self, x)
diff2flow/kl_autoencoder.py:312
Method
forward
(self, z)
diff2flow/kl_autoencoder.py:409
Method
forward
(self, input, sample_posterior=True)
diff2flow/kl_autoencoder.py:521
Method
forward
(self, x)
diff2flow/lora.py:76
Method
forward
Args: x (torch.Tensor): In shape of (B, C, H, W)
diff2flow/lora.py:109
Method
forward
Args: x (torch.Tensor): In shape of (B, C, H, W)
diff2flow/lora.py:155
Method
forward
(self, x)
diff2flow/dataset/image_preprocessing.py:11
Method
forward
(self, x, no_dropout=False)
diff2flow/conditioning/encoders.py:50
Method
forward
(self, x, *args, **kwargs)
diff2flow/conditioning/encoders.py:87
Method
forward
(self, image, no_dropout=False)
diff2flow/conditioning/encoders.py:133
Method
forward
(self, text)
diff2flow/conditioning/encoders.py:185
Method
forward
(self, text)
diff2flow/conditioning/encoders.py:241
Method
forward
(self, x)
diff2flow/models/unet/openaimodel.py:54
Method
forward
Apply the module to `x` given `emb` timestep embeddings.
diff2flow/models/unet/openaimodel.py:71
Method
forward
(self, x, emb, context=None)
diff2flow/models/unet/openaimodel.py:83
Method
forward
(self, x)
diff2flow/models/unet/openaimodel.py:112
Method
forward
(self,x)
diff2flow/models/unet/openaimodel.py:133
Method
forward
(self, x)
diff2flow/models/unet/openaimodel.py:161
Method
forward
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
Method
forward
(self, x)
diff2flow/models/unet/openaimodel.py:317
Method
forward
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
Method
forward
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
Method
forward
(self, t)
diff2flow/models/unet/openaimodel.py:421
Method
forward
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
Method
forward
(self, x)
diff2flow/models/unet/attention.py:52
Method
forward
(self, x)
diff2flow/models/unet/attention.py:73
Method
forward
(self, x)
diff2flow/models/unet/attention.py:117
Method
forward
(self, x, context=None, mask=None)
diff2flow/models/unet/attention.py:161
Method
forward
(self, x, context=None, mask=None)
diff2flow/models/unet/attention.py:214
Method
forward
(self, x, context=None)
diff2flow/models/unet/attention.py:266
Method
forward
(self, x, context=None)
diff2flow/models/unet/attention.py:319
Method
forward
(ctx, run_function, length, *args)
diff2flow/models/unet/attention.py:360
Method
forward
(ctx, run_function, length, *args)
diff2flow/models/unet/util.py:36
Method
forward
(self, x)
diff2flow/models/unet/util.py:111
Function
forward_with_cfg
Function to include sampling with Classifier-Free Guidance (CFG)
diff2flow/diffusion.py:193
Method
generate
Args: x: source minibatch (bs, *dim) sample_kwargs: dict, additional sampling arguments for the solver
diff2flow/flow.py:454
Method
generate
Args: x: source minibatch (bs, *dim) sample_kwargs: dict, additional sampling arguments for the solver
diff2flow/diffusion.py:116
Function
get_batch_stats
(x: Tensor, stats=None)
diff2flow/helpers.py:163
Function
get_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
Function
get_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
Method
get_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
Function
get_module_device
(m: Module)
diff2flow/ema.py:17
Function
get_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
Method
get_noise_from_velocity
Wrapper function: transfrom velocity prediction model to denoiser Args: velocity: [batch_dim, ...] shaped tensor; velocity model o
diff2flow/flow.py:135
Method
get_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
Method
get_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
Method
get_velocity_from_score
Wrapper function: transfrom score prediction model to velocity Args: score: [batch_dim, ...] shaped tensor; score model output
diff2flow/flow.py:151
Function
identity
(x)
diff2flow/dataloader.py:50
Method
inference
(self, batch, use_ema: bool = True, **kwargs)
diff2flow/trainer_module.py:609
Function
init_
(tensor)
diff2flow/models/unet/attention.py:39
Function
inplace_copy
(src: Tensor, tgt: Tensor, *, auto_move_device = False)
diff2flow/ema.py:20
Function
inplace_lerp
(src: Tensor, tgt: Tensor, weight, *, auto_move_device = False)
diff2flow/ema.py:26
Method
is_vb
(self)
diff2flow/openai_diffusion/gaussian_diffusion.py:54
Method
kl
(self, other=None)
diff2flow/kl_autoencoder.py:60
Function
load_model_from_config
(config, ckpt, verbose=False, ignore_keys=[])
diff2flow/helpers.py:30
Function
log_snr_to_alpha_bar
(t)
diff2flow/diffusion.py:28
Function
max_neg_value
(t)
diff2flow/models/unet/attention.py:35
Method
nll
(self, sample, dims=[1,2,3])
diff2flow/kl_autoencoder.py:74
Method
ode_fn
(self, t, x, **kwargs)
diff2flow/flow.py:451
Method
ode_fn
(self, t, x, **kwargs)
diff2flow/flow_obj.py:34
Method
on_validation_epoch_end
(self)
diff2flow/trainer_module.py:667
Method
p_mean_variance
( self, model, *args, **kwargs )
diff2flow/openai_diffusion/respace.py:89
Method
p_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
Function
pad_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
Method
predict_eps_from_z_and_v
(self, x_t, t, v)
diff2flow/ddpm.py:281
Method
prepare_data
(self)
diff2flow/dataloader.py:254
Method
process_xstart
(x)
diff2flow/openai_diffusion/gaussian_diffusion.py:310
Method
reset
(self)
diff2flow/metrics.py:49
Method
reset
(self)
diff2flow/metrics.py:93
← previous
next →
301–400 of 426, ranked by callers