MCPcopy Create free account

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

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

Functionread_img
(path)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:220
Functionregister_corrector
A decorator for registering corrector classes.
examples/score_sde_pytorch/sampling.py:54
Functionregister_corrector
A decorator for registering corrector classes.
examples/score_sde_jax/sampling.py:58
Functionregister_model
A decorator for registering model classes.
examples/score_sde_pytorch/models/utils.py:27
Functionregister_model
A decorator for registering model classes.
examples/score_sde_jax/models/utils.py:46
Functionregister_predictor
A decorator for registering predictor classes.
examples/score_sde_pytorch/sampling.py:35
Functionregister_predictor
A decorator for registering predictor classes.
examples/score_sde_jax/sampling.py:39
Methodregister_schedule
(self, given_betas=None, beta_schedule="linear", timesteps=1000,
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:493
Methodremain_step
(inputs)
dpm_solver_jax.py:950
Methodremain_step
(inputs)
examples/score_sde_jax/dpm_solver.py:950
Methodrescale_bbox
(bbox)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:882
Functionreset
()
examples/ddpm_and_guided-diffusion/models/guided_diffusion/logger.py:479
Functionrgb2ycbcr
same as matlab rgb2ycbcr only_y: only return Y channel Input: uint8, [0, 255] float, [0, 1]
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:529
Functionrun
(model, selected_path, task, custom_steps, resize_enabled=False, classifier_ckpt=None, global_step=None)
examples/stable-diffusion/notebook_helpers.py:131
Functionrun_inception_distributed
Distribute the inception network computation to all available TPUs. Args: input_tensor: The input images. Assumed to be within [0, 255]. in
examples/score_sde_pytorch/evaluation.py:108
Functionrun_inception_distributed
Distribute the inception network computation to all available TPUs. Args: input_tensor: The input images. Assumed to be within [0, 255]. in
examples/score_sde_jax/evaluation.py:108
Functionsample
(rank, world_size, args, config)
examples/ddpm_and_guided-diffusion/main.py:256
Methodsample
Compute the sample at time `t_end` by DPM-Solver, given the initial `x` at time `t_start`. =========================================
dpm_solver_jax.py:966
Methodsample
(self)
examples/stable-diffusion/ldm/modules/distributions/distributions.py:6
Methodsample
(self)
examples/stable-diffusion/ldm/modules/distributions/distributions.py:35
Methodsample
(self, S, batch_size, shape, conditioning=None,
examples/stable-diffusion/ldm/models/diffusion/plms.py:58
Methodsample
(self, S, batch_size, shape, conditioning=None,
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/sampler.py:23
Methodsample_interpolation
(self, model)
examples/ddpm_and_guided-diffusion/runners/diffusion.py:484
Methodsample_sequence
(self, model, classifier=None)
examples/ddpm_and_guided-diffusion/runners/diffusion.py:461
Methodscale_init
(key, shape, dtype=jnp.float32)
examples/score_sde_jax/models/normalization.py:49
Methodscale_init
(key, shape, dtype=jnp.float32)
examples/score_sde_jax/models/normalization.py:86
Functionscale_module
Scale the parameters of a module and return it.
examples/ddpm_and_guided-diffusion/models/guided_diffusion/nn.py:77
Functionscale_module
Scale the parameters of a module and return it.
examples/ddpm_and_guided-diffusion/models/improved_ddpm/nn.py:76
Functionscale_module
Scale the parameters of a module and return it.
examples/stable-diffusion/ldm/modules/diffusionmodules/util.py:183
Methodschedule
(self, n, **kwargs)
examples/stable-diffusion/ldm/lr_scheduler.py:83
Functionscoped_configure
(dir=None, format_strs=None, comm=None)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/logger.py:487
Methodsde
Create the drift and diffusion functions for the reverse SDE/ODE.
examples/score_sde_pytorch/sde_lib.py:93
Methodsde
(self, x, t)
examples/score_sde_pytorch/sde_lib.py:135
Methodsde
(self, x, t)
examples/score_sde_pytorch/sde_lib.py:185
Methodsde
(self, x, t)
examples/score_sde_pytorch/sde_lib.py:226
Methodsde
Create the drift and diffusion functions for the reverse SDE/ODE.
examples/score_sde_jax/sde_lib.py:95
Methodsde
(self, x, t)
examples/score_sde_jax/sde_lib.py:137
Methodsde
(self, x, t)
examples/score_sde_jax/sde_lib.py:187
Methodsde
(self, x, t)
examples/score_sde_jax/sde_lib.py:229
Functionselect_cond_path
(mode)
examples/stable-diffusion/notebook_helpers.py:92
Functionset_comm
(comm)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/logger.py:277
Functionset_level
Set logging threshold on current logger.
examples/ddpm_and_guided-diffusion/models/guided_diffusion/logger.py:270
Functionshake_drop_eval
ShakeDrop eval pass. See https://arxiv.org/abs/1802.02375 Args: x: Input to apply ShakeDrop to. mask_prob: Mask probability. alpha_m
examples/score_sde_jax/models/wideresnet_noise_conditional.py:177
Functionshake_drop_train
ShakeDrop training pass. See https://arxiv.org/abs/1802.02375 Args: x: Input to apply ShakeDrop to. mask_prob: Mask probability. alp
examples/score_sde_jax/models/wideresnet_noise_conditional.py:131
Functionshake_shake_eval
Shake-shake regularization in testing mode. Args: xa: Input, branch A. xb: Input, branch B. Returns: Mix of input branches.
examples/score_sde_jax/models/wideresnet_noise_conditional.py:117
Functionshake_shake_train
Shake-shake regularization in training mode. Shake-shake regularization interpolates between inputs A and B with *different* random uniform (per-
examples/score_sde_jax/models/wideresnet_noise_conditional.py:83
Functionshared_corrector_update_fn
A wrapper tha configures and returns the update function of correctors.
examples/score_sde_pytorch/sampling.py:361
Functionshared_corrector_update_fn
A wrapper tha configures and returns the update function of correctors.
examples/score_sde_jax/sampling.py:380
Functionshared_predictor_update_fn
A wrapper that configures and returns the update function of predictors.
examples/score_sde_pytorch/sampling.py:350
Functionshared_predictor_update_fn
A wrapper that configures and returns the update function of predictors.
examples/score_sde_jax/sampling.py:369
Methodshared_step
(self, batch, **kwargs)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:865
Functionshave
(img_in, border=0)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:510
Functionsingle2tensor3
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:302
Functionsingle2tensor4
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:307
Functionsingle2tensor5
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:329
Functionsingle2uint
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:254
Functionsingle2uint16
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:264
Functionsingle32tensor5
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:333
Functionsingle42tensor4
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:337
Methodsinglestep_loop_fn
(idx, val, order)
dpm_solver_jax.py:1099
Methodsinglestep_loop_fn
(idx, val, order)
examples/score_sde_jax/dpm_solver.py:1099
Methodslerp
(z1, z2, alpha)
examples/ddpm_and_guided-diffusion/runners/diffusion.py:487
Functionsplit_imageset
split the large images from original_dataroot into small overlapped images with size (p_size)x(p_size), and save them into taget_dataroot; on
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:125
Functionsrmd_degradation
blur + bicubic downsampling Args: x: HxWxC image, [0, 1] k: hxw, double sf: down-scale factor Return: downsam
examples/stable-diffusion/ldm/modules/image_degradation/bsrgan_light.py:240
Functionsrmd_degradation
blur + bicubic downsampling Args: x: HxWxC image, [0, 1] k: hxw, double sf: down-scale factor Return: downsam
examples/stable-diffusion/ldm/modules/image_degradation/bsrgan.py:240
Methodstate_dict_to_master_params
(self, state_dict)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/fp16_util.py:232
Functionstep_fn
Running one step of training or evaluation. This function will undergo `jax.lax.scan` so that multiple steps can be pmapped and jit-compiled toge
examples/score_sde_pytorch/losses.py:177
Functionstep_fn
Running one step of training or evaluation. This function will undergo `jax.lax.scan` so that multiple steps can be pmapped and jit-compiled toge
examples/score_sde_jax/losses.py:207
Methodstochastic_encode
(self, x0, encode_ratio, noise=None)
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/sampler.py:92
Functionstr2bool
(v)
examples/stable-diffusion/main.py:25
Functionstring_begins_with
(prefix, str)
examples/stable-diffusion/ldm/modules/x_transformer.py:102
Methodsummary_val
(k, v)
examples/ddpm_and_guided-diffusion/models/guided_diffusion/logger.py:172
Functionsurf
(Z, cmap='rainbow', figsize=None)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:47
Functiontensor2img
Converts a torch Tensor into an image Numpy array of BGR channel order Input: 4D(B,(3/1),H,W), 3D(C,H,W), or 2D(H,W), any range, RGB channel
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:342
Functiontensor2single
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:312
Functiontensor2single3
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:320
Functiontensor2uint
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:289
Functiontestit
(img_path)
examples/stable-diffusion/scripts/tests/test_watermark.py:6
Methodtime_continuous_to_discrete
Convert [0.001, 1] to [0, 999].
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/sampler.py:146
Methodtime_discrete_to_continuous
Convert [0, 999] to [0.001, 1].
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/sampler.py:140
Methodtime_to_ratio
Convert [0.001, 1] to [0, 1].
examples/stable-diffusion/ldm/models/diffusion/dpm_solver/sampler.py:158
Functiontorch2hwcuint8
(x, clip=False)
examples/ddpm_and_guided-diffusion/runners/diffusion.py:55
Functiontotal_grad_fn
(x, t)
examples/score_sde_jax/controllable_generation.py:245
Functiontrain
Runs the training pipeline. Args: config: Configuration to use. workdir: Working directory for checkpoints and TF summaries. If this
examples/score_sde_pytorch/run_lib.py:47
Functiontrain
Runs the training pipeline. Args: config: Configuration to use. workdir: Working directory for checkpoints and TF summaries. If this
examples/score_sde_jax/run_lib.py:51
Methodtraining_step
(self, batch, batch_idx, optimizer_idx)
examples/stable-diffusion/ldm/models/autoencoder.py:142
Methodtraining_step
(self, batch, batch_idx, optimizer_idx)
examples/stable-diffusion/ldm/models/autoencoder.py:351
Methodtraining_step
(self, batch, batch_idx)
examples/stable-diffusion/ldm/models/diffusion/classifier.py:198
Methodtraining_step
(self, batch, batch_idx)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:342
Functionuint162single
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:259
Functionuint2single
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:249
Functionuint2tensor3
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:282
Functionuint2tensor4
(img)
examples/stable-diffusion/ldm/modules/image_degradation/utils_image.py:275
Functionuniform_on_device
(r1, r2, shape, device)
examples/stable-diffusion/ldm/models/diffusion/ddpm.py:40
Functionuniq
(arr)
examples/stable-diffusion/ldm/modules/attention.py:15
Functionupdate_ema
Update target parameters to be closer to those of source parameters using an exponential moving average. :param target_params: the targe
examples/ddpm_and_guided-diffusion/models/guided_diffusion/nn.py:55
Functionupdate_ema
Update target parameters to be closer to those of source parameters using an exponential moving average. :param target_params: the target
examples/ddpm_and_guided-diffusion/models/improved_ddpm/nn.py:55
Methodupdate_fn
(val)
dpm_solver_jax.py:939
Methodupdate_fn
One update of the predictor. Args: x: A PyTorch tensor representing the current state t: A Pytorch tensor representing the current ti
examples/score_sde_pytorch/sampling.py:154
Methodupdate_fn
One update of the corrector. Args: x: A PyTorch tensor representing the current state t: A PyTorch tensor representing the current ti
examples/score_sde_pytorch/sampling.py:179
← previousnext →1,501–1,600 of 1,626, ranked by callers