MCPcopy Create free account

hub / github.com/claudiom4sir/StableVSR / functions

Functions53 in github.com/claudiom4sir/StableVSR

↓ 5 callersFunctionget_flow
(of_model, target, source, rescale_factor=1)
util/flow_utils.py:42
↓ 4 callersFunctionflow_warp
Warp an image or feature map with optical flow Args: x (Tensor): size (N, C, H, W) flow (Tensor): size (N, H, W, 2), normal value
util/flow_utils.py:4
↓ 3 callersMethod_get_variance
(self, t, predicted_variance=None, variance_type=None)
scheduler/ddpm_scheduler.py:282
↓ 3 callersFunctioncompute_flow_magnitude
(flow)
util/flow_utils.py:49
↓ 3 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
scheduler/ddpm_scheduler.py:356
↓ 2 callersMethodadd_noise
( self, original_samples: torch.FloatTensor, noise: torch.FloatTensor, timeste
scheduler/ddpm_scheduler.py:456
↓ 2 callersFunctionalpha_bar_fn
(t)
scheduler/ddpm_scheduler.py:73
↓ 2 callersMethodcheck_image
(self, image, prompt, prompt_embeds)
pipeline/stablevsr_pipeline.py:617
↓ 2 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
pipeline/stablevsr_pipeline.py:276
↓ 2 callersMethodprevious_timestep
(self, timestep)
scheduler/ddpm_scheduler.py:502
↓ 2 callersMethodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. A
scheduler/ddpm_scheduler.py:190
↓ 2 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`)
scheduler/ddpm_scheduler.py:207
↓ 1 callersMethod__init__
(self, opt)
dataset/reds_dataset.py:46
↓ 1 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
scheduler/ddpm_scheduler.py:322
↓ 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 = [
scheduler/ddpm_scheduler.py:48
↓ 1 callersMethodcheck_inputs
( self, prompt, image, callback_steps, negative_prompt=None, p
pipeline/stablevsr_pipeline.py:477
↓ 1 callersFunctioncompute_flow_gradients
(flow)
util/flow_utils.py:53
↓ 1 callersMethodcompute_flows
(self, of_model, images, rescale_factor=1)
pipeline/stablevsr_pipeline.py:703
↓ 1 callersFunctiondetect_occlusion
(fw_flow, bw_flow)
util/flow_utils.py:74
↓ 1 callersMethodget_approximated_x0
( self, model_output: torch.FloatTensor, timesteps: int, sample: torch.FloatTe
scheduler/ddpm_scheduler.py:517
↓ 1 callersFunctionget_flow_forward_backward
(net, current, prev, rescale_factor=1)
util/flow_utils.py:108
↓ 1 callersMethodget_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
scheduler/ddpm_scheduler.py:479
↓ 1 callersFunctionimage_grid
(imgs, rows, cols)
train.py:66
↓ 1 callersFunctionimport_model_class_from_model_name_or_path
(pretrained_model_name_or_path: str, revision: str)
train.py:181
↓ 1 callersFunctionlog_validation
(vae, text_encoder, tokenizer, unet, controlnet, args, accelerator, weight_dtype, step, of_model)
train.py:77
↓ 1 callersFunctionmain
(args)
train.py:620
↓ 1 callersFunctionparse_args
(input_args=None)
train.py:239
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
pipeline/stablevsr_pipeline.py:460
↓ 1 callersMethodprepare_image
( self, image, width, height, batch_size, num_images_per_promp
pipeline/stablevsr_pipeline.py:654
↓ 1 callersMethodprepare_latents
(self, batch_size, num_channels_latents, height, width, dtype, device, generator, latents=None)
pipeline/stablevsr_pipeline.py:685
↓ 1 callersFunctionsave_model_card
(repo_id: str, image_logs=None, base_model=str, repo_folder=None)
train.py:202
Method__call__
r""" The call function to the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*): T
pipeline/stablevsr_pipeline.py:719
Method__getitem__
(self, index)
dataset/reds_dataset.py:93
Method__getitem__
(self, index)
dataset/reds_dataset.py:289
Method__init__
( self, num_train_timesteps: int = 1000, beta_start: float = 0.0001, beta_end:
scheduler/ddpm_scheduler.py:140
Method__init__
(self, opt)
dataset/reds_dataset.py:242
Method__init__
( self, vae: AutoencoderKL, text_encoder: CLIPTextModel, tokenizer: CLIPTokeni
pipeline/stablevsr_pipeline.py:133
Method__len__
(self)
scheduler/ddpm_scheduler.py:499
Method__len__
(self)
dataset/reds_dataset.py:203
Method__len__
(self)
dataset/reds_dataset.py:350
Method_encode_prompt
( self, prompt, device, num_images_per_prompt, do_classifier_free_guid
pipeline/stablevsr_pipeline.py:245
Functioncenter_crop
(im, size=128)
test.py:11
Functioncollate_fn
(examples)
train.py:604
Methoddecode_latents
(self, latents)
pipeline/stablevsr_pipeline.py:448
Methoddisable_vae_slicing
r""" Disable sliced VAE decoding. If `enable_vae_slicing` was previously enabled, this method will go back to computing decoding in on
pipeline/stablevsr_pipeline.py:192
Methoddisable_vae_tiling
r""" Disable tiled VAE decoding. If `enable_vae_tiling` was previously enabled, this method will go back to computing decoding in one
pipeline/stablevsr_pipeline.py:209
Methodenable_model_cpu_offload
r""" Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared to `enable_sequenti
pipeline/stablevsr_pipeline.py:216
Methodenable_vae_slicing
r""" Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to compute decoding in sev
pipeline/stablevsr_pipeline.py:184
Methodenable_vae_tiling
r""" Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and en
pipeline/stablevsr_pipeline.py:200
Functionload_model_hook
(models, input_dir)
train.py:706
Methodrun_safety_checker
(self, image, device, dtype)
pipeline/stablevsr_pipeline.py:433
Functionsave_model_hook
(models, weights, output_dir)
train.py:694
Functionwarp_error
(of_model, current_frame, prev_frame, current_gt, prev_gt, use_occlusion_mask=True)
util/flow_utils.py:30