MCPcopy Create free account

hub / github.com/LuChengTHU/dpm-solver / functions

Functions1,626 in github.com/LuChengTHU/dpm-solver

↓ 2 callersFunctionget_score_fn
Wraps `score_fn` so that the model output corresponds to a real time-dependent score function. Args: sde: An `sde_lib.SDE` object that represen
examples/score_sde_jax/models/utils.py:196
↓ 2 callersFunctiongroup_dict_by_key
(cond, d)
examples/stable-diffusion/ldm/modules/x_transformer.py:93
↓ 2 callersFunctiongroupby_prefix_and_trim
(prefix, d)
examples/stable-diffusion/ldm/modules/x_transformer.py:110
↓ 2 callersMethodinit_from_ckpt
(self, path, ignore_keys=list(), only_model=False)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:186
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
dpm_solver_jax.py:1125
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
dpm_solver_pytorch.py:1253
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
examples/ddpm_and_guided-diffusion/dpm_solver/sampler.py:1253
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
examples/score_sde_pytorch/dpm_solver.py:1261
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.py:1261
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
examples/score_sde_jax/dpm_solver.py:1125
↓ 2 callersMethodlog_img
(self, pl_module, batch, batch_idx, split="train")
examples/stable-diffusion/main.py:340
↓ 2 callersFunctionloss_fn
Compute the loss function. Args: model: A score model. batch: A mini-batch of training data. Returns: loss: A scalar that
examples/score_sde_pytorch/losses.py:73
↓ 2 callersFunctionmake_ddim_sampling_parameters
(alphacums, ddim_timesteps, eta, verbose=True)
examples/stable-diffusion/ldm/modules/diffusionmodules/util.py:63
↓ 2 callersFunctionmake_ddim_timesteps
(ddim_discr_method, num_ddim_timesteps, num_ddpm_timesteps, verbose=True)
examples/stable-diffusion/ldm/modules/diffusionmodules/util.py:46
↓ 2 callersFunctionmake_master_params
Copy model parameters into a (differently-shaped) list of full-precision parameters.
examples/ddpm_and_guided-diffusion/models/guided_diffusion/fp16_util.py:35
↓ 2 callersMethodmake_schedule
(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True)
examples/stable-diffusion/ldm/models/diffusion/ddim.py:25
↓ 2 callersFunctionmakedir_exist_ok
Python2 support for os.makedirs(.., exist_ok=True)
examples/ddpm_and_guided-diffusion/datasets/utils.py:36
↓ 2 callersFunctionmd5_hash
(path)
examples/ddpm_and_guided-diffusion/functions/ckpt_util.py:49
↓ 2 callersFunctionmkdir
(path)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:153
↓ 2 callersFunctionmodel_fn
The noise predicition model function that is used for DPM-Solver.
examples/score_sde_jax/dpm_solver.py:320
↓ 2 callersFunctionmodel_wrapper
Create a wrapper function for the noise prediction model. DPM-Solver needs to solve the continuous-time diffusion ODEs. For DPMs trained on discr
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.py:178
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A jnp.DeviceArray. The ini
dpm_solver_jax.py:875
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
dpm_solver_pytorch.py:932
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
examples/ddpm_and_guided-diffusion/dpm_solver/sampler.py:932
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
examples/score_sde_pytorch/dpm_solver.py:940
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.py:940
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A jnp.DeviceArray. The ini
examples/score_sde_jax/dpm_solver.py:875
↓ 2 callersFunctionncsn_conv1x1
1x1 convolution with PyTorch initialization. Same as NCSNv1/v2.
examples/score_sde_jax/models/layers.py:45
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
dpm_solver_jax.py:379
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
dpm_solver_pytorch.py:427
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
examples/ddpm_and_guided-diffusion/dpm_solver/sampler.py:427
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
examples/score_sde_pytorch/dpm_solver.py:435
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.py:435
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
examples/score_sde_jax/dpm_solver.py:379
↓ 2 callersMethodp_sample
(self, x, c, t, clip_denoised=False, repeat_noise=False, return_codebook_ids=False, quantize_
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:1079
↓ 2 callersMethodp_sample_ddim
(self, x, c, t, index, repeat_noise=False, use_original_steps=False, quantize_denoised=False,
examples/stable-diffusion/ldm/models/diffusion/ddim.py:166
↓ 2 callersMethodp_sample_loop
(self, shape, return_intermediates=False)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:253
↓ 2 callersFunctionparallel_data_prefetch
( func: callable, data, n_proc, target_data_type="ndarray", cpu_intensive=True, use_worker_id=False )
examples/stable-diffusion/ldm/util.py:108
↓ 2 callersMethodpredict_start_from_noise
(self, x_t, t, noise)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:216
↓ 2 callersMethodprogressive_denoising
(self, cond, shape, verbose=True, callback=None, quantize_denoised=False, img_ca
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:1110
↓ 2 callersFunctionput_watermark
(img, wm_encoder=None)
examples/stable-diffusion/scripts/txt2img.py:69
↓ 2 callersMethodq_posterior
(self, x_start, x_t, t)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:222
↓ 2 callersFunctionrandom_crop
(lq, hq, sf=4, lq_patchsize=64)
examples/stable-diffusion/ldm/modules/image_degradation/bsrgan.py:427
↓ 2 callersMethodratio_to_time
Convert [0, 1] to [0.001, 1].
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/sampler.py:152
↓ 2 callersMethodregister
(self, module)
examples/ddpm_and_guided-diffusion/models/ema.py:9
↓ 2 callersMethodregister_schedule
(self, given_betas=None, beta_schedule="linear", timesteps=1000, linear_start=1e-4,
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:117
↓ 2 callersFunctionresize_small
Shrink an image to the given resolution.
examples/score_sde_pytorch/datasets.py:55
↓ 2 callersFunctionresize_small
Shrink an image to the given resolution.
examples/score_sde_jax/datasets.py:55
↓ 2 callersMethodrestore
Restore the parameters stored with the `store` method. Useful to validate the model with EMA parameters without affecting the original op
examples/score_sde_pytorch/models/ema.py:76
↓ 2 callersMethodrestore
Restore the parameters stored with the `store` method. Useful to validate the model with EMA parameters without affecting the
examples/stable-diffusion/ldm/modules/ema.py:64
↓ 2 callersMethodsample
Compute the sample at time `t_end` by DPM-Solver, given the initial `x` at time `t_start`. =========================================
examples/ddpm_and_guided-diffusion/dpm_solver/sampler.py:1047
↓ 2 callersMethodsample
Compute the sample at time `t_end` by DPM-Solver, given the initial `x` at time `t_start`. =========================================
examples/score_sde_pytorch/dpm_solver.py:1055
↓ 2 callersMethodsample
Compute the sample at time `t_end` by DPM-Solver, given the initial `x` at time `t_start`. =========================================
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.py:1055
↓ 2 callersFunctionsave_checkpoint
(ckpt_dir, state)
examples/score_sde_pytorch/utils.py:22
↓ 2 callersFunctionsave_image
Make a grid of images and save it into an image file. Pixel values are assumed to be within [0, 1]. Args: ndarray (array_like): 4D mini-batc
examples/score_sde_jax/utils.py:51
↓ 2 callersFunctionshift_pixel
shift pixel for super-resolution with different scale factors Args: x: WxHxC or WxH sf: scale factor upper_left: shift dir
examples/stable-diffusion/ldm/modules/image_degradation/bsrgan_light.py:99
↓ 2 callersFunctionshift_pixel
shift pixel for super-resolution with different scale factors Args: x: WxHxC or WxH sf: scale factor upper_left: shift dir
examples/stable-diffusion/ldm/modules/image_degradation/bsrgan.py:99
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A jnp.DeviceArray. The initial value at time `s`.
dpm_solver_jax.py:623
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
dpm_solver_pytorch.py:675
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
examples/ddpm_and_guided-diffusion/dpm_solver/sampler.py:675
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
examples/score_sde_pytorch/dpm_solver.py:683
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.py:683
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A jnp.DeviceArray. The initial value at time `s`.
examples/score_sde_jax/dpm_solver.py:623
↓ 2 callersMethodstore
Save the current parameters for restoring later. Args: parameters: Iterable of `torch.nn.Parameter`; the parameters to be temp
examples/score_sde_pytorch/models/ema.py:66
↓ 2 callersMethodstore
Save the current parameters for restoring later. Args: parameters: Iterable of `torch.nn.Parameter`; the parameters to be
examples/stable-diffusion/ldm/modules/ema.py:55
↓ 2 callersMethodtest
(self)
examples/ddpm_and_guided-diffusion/runners/diffusion.py:645
↓ 2 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may b
examples/ddpm_and_guided-diffusion/models/guided_diffusion/nn.py:103
↓ 2 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
examples/ddpm_and_guided-diffusion/models/improved_ddpm/nn.py:101
↓ 2 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
examples/stable-diffusion/ldm/modules/diffusionmodules/util.py:151
↓ 2 callersFunctionto_flattened_numpy
Flatten a torch tensor `x` and convert it to numpy.
examples/score_sde_pytorch/models/utils.py:210
↓ 2 callersFunctionto_flattened_numpy
Flatten a JAX array `x` and convert it to numpy.
examples/score_sde_jax/models/utils.py:257
↓ 2 callersMethodto_rgb
(self, x)
examples/stable-diffusion/ldm/models/autoencoder.py:417
↓ 2 callersFunctionunflatten_master_params
(param_group, master_param)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/fp16_util.py:78
↓ 2 callersMethodupdate_fn
(self, rng, x, t)
examples/score_sde_jax/sampling.py:273
↓ 2 callersMethodupdate_fn
(self, rng, x, t)
examples/score_sde_jax/sampling.py:365
↓ 2 callersMethodzero_grad
(self)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/fp16_util.py:173
↓ 2 callersFunctionzero_master_grads
(master_params)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/fp16_util.py:128
↓ 1 callersMethod__init__
(self, root, classes="train", transform=None, target_transform=None)
examples/ddpm_and_guided-diffusion/datasets/lsun.py:75
↓ 1 callersMethod__len__
(self)
examples/ddpm_and_guided-diffusion/datasets/vision.py:31
↓ 1 callersMethod__len__
(self)
examples/stable-diffusion/ldm/data/base.py:18
↓ 1 callersFunction_augment
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:475
↓ 1 callersFunction_compute_fans
(shape, in_axis=1, out_axis=0)
examples/score_sde_pytorch/models/layers.py:60
↓ 1 callersFunction_configure_default_logger
()
examples/ddpm_and_guided-diffusion/models/guided_diffusion/logger.py:474
↓ 1 callersMethod_do_log
(self, args)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/logger.py:397
↓ 1 callersFunction_einsum
(a, b, c, x, y)
examples/score_sde_pytorch/models/layers.py:532
↓ 1 callersFunction_einsum
(a, b, c, x, y)
examples/score_sde_jax/models/layers.py:481
↓ 1 callersMethod_filter_relpaths
(self, relpaths)
examples/stable-diffusion/ldm/data/imagenet.py:48
↓ 1 callersFunction_get_confirm_token
(response)
examples/ddpm_and_guided-diffusion/datasets/utils.py:169
↓ 1 callersFunction_get_paths_from_images
(path)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:74
↓ 1 callersMethod_load
(self)
examples/stable-diffusion/ldm/data/imagenet.py:93
↓ 1 callersMethod_optimize_fp16
(self, opt: th.optim.Optimizer)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/fp16_util.py:189
↓ 1 callersMethod_optimize_normal
(self, opt: th.optim.Optimizer)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/fp16_util.py:210
↓ 1 callersFunction_output_add
Add two tensors, padding them with zeros or pooling them if necessary. Args: block_x: Output of a resnet block. orig_x: Residual branch to
examples/score_sde_jax/models/wideresnet_noise_conditional.py:209
↓ 1 callersMethod_prepare
(self)
examples/stable-diffusion/ldm/data/imagenet.py:45
↓ 1 callersMethod_prepare_human_to_integer_label
(self)
examples/stable-diffusion/ldm/data/imagenet.py:80
↓ 1 callersMethod_prepare_idx_to_synset
(self)
examples/stable-diffusion/ldm/data/imagenet.py:74
↓ 1 callersMethod_prepare_synset_to_human
(self)
examples/stable-diffusion/ldm/data/imagenet.py:66
↓ 1 callersFunction_register
(cls)
examples/score_sde_pytorch/models/utils.py:30
↓ 1 callersFunction_register
(cls)
examples/score_sde_jax/models/utils.py:49
↓ 1 callersFunction_save_response_content
(response, destination, chunk_size=32768)
examples/ddpm_and_guided-diffusion/datasets/utils.py:177
← previousnext →301–400 of 1,626, ranked by callers