MCPcopy Create free account

hub / github.com/JiangkaiWu/Promptus / functions

Functions645 in github.com/JiangkaiWu/Promptus

↓ 1 callersFunctionget_resizing_factor
( desired_shape: Tuple[int, int], current_shape: Tuple[int, int] )
scripts/demo/streamlit_helpers.py:787
↓ 1 callersFunctionget_sampler
(sampler_name, steps, discretization_config, guider_config, key=1)
scripts/demo/streamlit_helpers.py:360
↓ 1 callersMethodget_sigmas
(self, n, device)
sgm/modules/diffusionmodules/discretizer.py:24
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: From Fairseq. Build sinusoidal embeddings. This matches
sgm/modules/diffusionmodules/model.py:26
↓ 1 callersMethodget_trainable_autoencoder_parameters
(self)
sgm/modules/autoencoding/losses/discriminator_loss.py:88
↓ 1 callersMethodget_variables
(self, sigma, sigma_down)
sgm/modules/diffusionmodules/sampling.py:248
↓ 1 callersMethodget_variables
(self, sigma, next_sigma, previous_sigma=None)
sgm/modules/diffusionmodules/sampling.py:288
↓ 1 callersMethodidx_to_sigma
(self, idx)
sgm/modules/diffusionmodules/sigma_sampling.py:23
↓ 1 callersMethodidx_to_sigma
(self, idx: Union[torch.Tensor, int])
sgm/modules/diffusionmodules/denoiser.py:65
↓ 1 callersMethodinit_decoder
(self, config)
sgm/modules/autoencoding/losses/lpips.py:27
↓ 1 callersFunctioninit_embedder_options
(keys, init_dict, prompt=None, negative_prompt=None)
scripts/demo/turbo_demo.py:70
↓ 1 callersMethodinit_from_ckpt
( self, path: str, )
sgm/models/diffusion.py:85
↓ 1 callersFunctioninitial_model_load
(model)
scripts/demo/streamlit_helpers.py:70
↓ 1 callersMethodinner_training_step
( self, batch: dict, batch_idx: int, optimizer_idx: int = 0 )
sgm/models/autoencoder.py:221
↓ 1 callersMethodinstantiate_optimizer_from_config
(self, params, lr, cfg)
sgm/models/diffusion.py:212
↓ 1 callersFunctioninversion
( model, sampler, decoder, rank, interval, frame_path,
inversion.py:66
↓ 1 callersMethodkl
(self, other=None)
sgm/modules/distributions/distributions.py:43
↓ 1 callersFunctionlinear_multistep_coeff
(order, t, i, j, epsrel=1e-4)
sgm/modules/diffusionmodules/sampling_utils.py:7
↓ 1 callersMethodload_from_pretrained
(self, name="vgg_lpips")
sgm/modules/autoencoding/lpips/loss/lpips.py:28
↓ 1 callersFunctionload_img
(display=True, key=None, device="cuda")
scripts/demo/sampling.py:94
↓ 1 callersFunctionload_img
(path: str)
scripts/util/detection/nsfw_and_watermark_dectection.py:78
↓ 1 callersFunctionload_img_for_prediction
( W: int, H: int, display=True, key=None, device="cuda" )
scripts/demo/streamlit_helpers.py:821
↓ 1 callersFunctionload_model_from_config
(config, ckpt=None, verbose=True)
scripts/demo/streamlit_helpers.py:86
↓ 1 callersFunctionload_model_from_config
(config, ckpt, verbose=True, freeze=True)
sgm/util.py:202
↓ 1 callersMethodlog_conditionings
Defines heuristics to log different conditionings. These can be lists of strings (text-to-image), tensors, ints, ...
sgm/models/diffusion.py:255
↓ 1 callersFunctionmeasure_perplexity
( predicted_indices: torch.Tensor, num_centroids: int )
sgm/modules/autoencoding/regularizers/base.py:29
↓ 1 callersMethodmode
(self)
sgm/modules/distributions/distributions.py:71
↓ 1 callersFunctionperform_save_locally
(save_path, samples)
scripts/demo/streamlit_helpers.py:197
↓ 1 callersMethodpool
(self, x, text)
sgm/modules/encoders/modules.py:471
↓ 1 callersMethodpossible_correction_step
( self, euler_step, x, d, dt, next_sigma, denoiser, cond, uc )
sgm/modules/diffusionmodules/sampling.py:219
↓ 1 callersMethodpossibly_get_ucg_val
(self, embedder: AbstractEmbModel, batch: Dict)
sgm/modules/encoders/modules.py:111
↓ 1 callersMethodpossibly_quantize_c_noise
(self, c_noise: torch.Tensor)
sgm/modules/diffusionmodules/denoiser.py:20
↓ 1 callersMethodpossibly_quantize_sigma
(self, sigma: torch.Tensor)
sgm/modules/diffusionmodules/denoiser.py:17
↓ 1 callersMethodpreprocess
(self, x)
sgm/modules/encoders/modules.py:629
↓ 1 callersMethodq_sample
(self, x_start, t, noise=None)
sgm/modules/encoders/modules.py:896
↓ 1 callersFunctionquantize_tensor
(x, scale, zero_point, num_bits=8, signed=False)
quantization.py:36
↓ 1 callersMethodreconstruct
(self, bits)
scripts/demo/detect.py:31
↓ 1 callersMethodregister_schedule
( self, beta_schedule="linear", timesteps=1000, linear_start=1e-4, lin
sgm/modules/encoders/modules.py:848
↓ 1 callersMethodreverse
(self, output)
sgm/modules/autoencoding/lpips/util.py:107
↓ 1 callersMethodrun_decoder_engine
(self, latent)
realtime_demo.py:112
↓ 1 callersMethodrun_denoise_engine
(self, x, timesteps, context)
realtime_demo.py:100
↓ 1 callersFunctionrun_img2img
( state, version_dict, is_legacy=False, return_latents=False, filter=None, stage2stren
scripts/demo/sampling.py:162
↓ 1 callersFunctionrun_txt2img
( state, version, version_dict, is_legacy=False, return_latents=False, filter=None,
scripts/demo/sampling.py:112
↓ 1 callersFunctionsample
( model, sampler, prompt="A lush garden with oversized flowers and vibrant colors, inhabited by mi
scripts/demo/turbo.py:94
↓ 1 callersFunctionsample
( model, sampler, prompt="A scenic landscape with a sky filled with clouds above, a la
scripts/demo/turbo_demo.py:102
↓ 1 callersMethodsample
(self)
sgm/modules/distributions/distributions.py:17
↓ 1 callersMethodsample
(self)
sgm/modules/distributions/distributions.py:37
↓ 1 callersMethodsample
( self, cond: Dict, uc: Union[Dict, None] = None, batch_size: int = 16,
sgm/models/diffusion.py:238
↓ 1 callersMethodsampler_step
( self, old_denoised, previous_sigma, sigma, next_sigma, denoi
sgm/modules/diffusionmodules/sampling.py:310
↓ 1 callersFunctionsave_video_as_grid_and_mp4
( video_batch: torch.Tensor, save_path: str, T: int, fps: int = 5 )
scripts/demo/streamlit_helpers.py:852
↓ 1 callersMethodschedule
(self, n, **kwargs)
sgm/lr_scheduler.py:26
↓ 1 callersMethodschedule
(self, n, **kwargs)
sgm/lr_scheduler.py:83
↓ 1 callersMethodseeded_randn
(self, shape, seed)
realtime_demo.py:131
↓ 1 callersFunctionset_lowvram_mode
(mode)
scripts/demo/streamlit_helpers.py:65
↓ 1 callersMethodshared_step
(self, batch: Dict)
sgm/models/diffusion.py:158
↓ 1 callersFunctionspatial_average
(x, keepdim=True)
sgm/modules/autoencoding/lpips/loss/lpips.py:146
↓ 1 callersMethodtext_transformer_forward
(self, x: torch.Tensor, attn_mask=None)
sgm/modules/encoders/modules.py:479
↓ 1 callersMethodweight_update
(self, num_tokens)
sgm/modules/autoencoding/regularizers/quantize.py:345
FunctionTVLoss
(U, V)
scripts/demo/turbo_demo.py:414
FunctionVAE_encoder
( model, sampler, H=1024, W=1024, seed=0, filter=None, )
scripts/demo/turbo_demo.py:1299
Method__call__
(self, x)
inversion.py:61
Method__call__
(self, x)
generation.py:65
Method__call__
(self, x)
scripts/demo/turbo.py:57
Method__call__
Detects the number of matching bits the predefined watermark with one or multiple images. Images should be in cv2 format, e.g. h x w
scripts/demo/detect.py:83
Method__call__
(self, *args, **kwargs)
scripts/demo/discretization.py:18
Method__call__
(self, *args, **kwargs)
scripts/demo/discretization.py:45
Method__call__
(self, x)
scripts/demo/turbo_demo.py:65
Method__call__
(self, images: torch.Tensor)
scripts/util/detection/nsfw_and_watermark_dectection.py:58
Method__call__
(self, n, **kwargs)
sgm/lr_scheduler.py:47
Method__call__
(self, n, **kwargs)
sgm/lr_scheduler.py:109
Method__call__
(self, sigma: torch.Tensor)
sgm/modules/diffusionmodules/loss_weighting.py:8
Method__call__
(self, sigma: torch.Tensor)
sgm/modules/diffusionmodules/loss_weighting.py:13
Method__call__
(self, sigma: torch.Tensor)
sgm/modules/diffusionmodules/loss_weighting.py:21
Method__call__
(self, sigma: torch.Tensor)
sgm/modules/diffusionmodules/loss_weighting.py:31
Method__call__
(self, sigma)
sgm/modules/diffusionmodules/denoiser_weighting.py:5
Method__call__
(self, sigma)
sgm/modules/diffusionmodules/denoiser_weighting.py:13
Method__call__
(self, sigma)
sgm/modules/diffusionmodules/denoiser_weighting.py:23
Method__call__
( self, sigma: torch.Tensor )
sgm/modules/diffusionmodules/denoiser_scaling.py:9
Method__call__
( self, sigma: torch.Tensor )
sgm/modules/diffusionmodules/denoiser_scaling.py:19
Method__call__
( self, sigma: torch.Tensor )
sgm/modules/diffusionmodules/denoiser_scaling.py:30
Method__call__
( self, sigma: torch.Tensor )
sgm/modules/diffusionmodules/denoiser_scaling.py:41
Method__call__
( self, sigma: torch.Tensor )
sgm/modules/diffusionmodules/denoiser_scaling.py:52
Method__call__
(self, n, do_append_zero=True, device="cpu", flip=False)
sgm/modules/diffusionmodules/discretizer.py:18
Method__call__
(self, denoiser, x, cond, uc=None, num_steps=None)
sgm/modules/diffusionmodules/sampling.py:109
Method__call__
(self, denoiser, x, cond, uc=None, num_steps=None)
sgm/modules/diffusionmodules/sampling.py:155
Method__call__
(self, denoiser, x, cond, uc=None, num_steps=None, **kwargs)
sgm/modules/diffusionmodules/sampling.py:184
Method__call__
(self, denoiser, x, cond, uc=None, num_steps=None, **kwargs)
sgm/modules/diffusionmodules/sampling.py:344
Method__call__
(self, n_samples, rand=None)
sgm/modules/diffusionmodules/sigma_sampling.py:11
Method__call__
(self, n_samples, rand=None)
sgm/modules/diffusionmodules/sigma_sampling.py:26
Method__call__
(self, x: torch.Tensor, sigma: float)
sgm/modules/diffusionmodules/guiders.py:15
Method__call__
(self, x: torch.Tensor, sigma: torch.Tensor)
sgm/modules/diffusionmodules/guiders.py:28
Method__call__
(self, x: torch.Tensor, sigma: float)
sgm/modules/diffusionmodules/guiders.py:46
Method__call__
(self, x: torch.Tensor, sigma: torch.Tensor)
sgm/modules/diffusionmodules/guiders.py:78
Method__call__
Adds a predefined watermark to the input image Args: image: ([N,] B, RGB, H, W) in range [0, 1] Returns:
sgm/inference/helpers.py:23
Method__call__
(self, *args, **kwargs)
sgm/inference/helpers.py:89
Method__del__
(self)
tensorrt_acceleration/utilities.py:94
Method__getitem__
(self, i)
sgm/data/cifar10.py:12
Method__getitem__
(self, i)
sgm/data/mnist.py:12
Method__init__
(self, n_sample_steps=1, *args, **kwargs)
inversion.py:32
Method__init__
(self, n_sample_steps=1, *args, **kwargs)
generation.py:36
← previousnext →201–300 of 645, ranked by callers