SYMBOL INDEX (761 symbols across 51 files) FILE: diffueraser_node.py class Propainter_Loader (line 29) | class Propainter_Loader(io.ComfyNode): method define_schema (line 31) | def define_schema(cls): method execute (line 47) | def execute(cls, propainter,flow,fix_raft,device) -> io.NodeOutput: class DiffuEraser_Loader (line 57) | class DiffuEraser_Loader(io.ComfyNode): method define_schema (line 59) | def define_schema(cls): method execute (line 73) | def execute(cls, vae,lora) -> io.NodeOutput: class DiffuEraser_PreData (line 83) | class DiffuEraser_PreData(io.ComfyNode): method define_schema (line 85) | def define_schema(cls): method execute (line 101) | def execute(cls, images,seg_repo,video_mask_image=None,video_mask=None... class Propainter_Sampler (line 137) | class Propainter_Sampler(io.ComfyNode): method define_schema (line 139) | def define_schema(cls): method execute (line 161) | def execute(cls, model,conditioning,fps,video_length,mask_dilation_ite... class DiffuEraser_Sampler (line 179) | class DiffuEraser_Sampler(io.ComfyNode): method define_schema (line 181) | def define_schema(cls): method execute (line 203) | def execute(cls, model,positive,conditioning,steps,seed,save_result_vi... function get_hello (line 236) | async def get_hello(request): class DiffuEraser_SM_Extension (line 239) | class DiffuEraser_SM_Extension(ComfyExtension): method get_node_list (line 241) | async def get_node_list(self) -> list[type[io.ComfyNode]]: function comfy_entrypoint (line 249) | async def comfy_entrypoint() -> DiffuEraser_SM_Extension: # ComfyUI cal... FILE: libs/brushnet_CA.py class BrushNetOutput (line 38) | class BrushNetOutput(BaseOutput): class BrushNetModel (line 62) | class BrushNetModel(ModelMixin, ConfigMixin): method __init__ (line 139) | def __init__( method from_unet (line 454) | def from_unet( method attn_processors (line 543) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 567) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 602) | def set_default_attn_processor(self): method set_attention_slice (line 618) | def set_attention_slice(self, slice_size: Union[str, int, List[int]]) ... method _set_gradient_checkpointing (line 683) | def _set_gradient_checkpointing(self, module, value: bool = False) -> ... method forward (line 687) | def forward( function zero_module (line 936) | def zero_module(module): FILE: libs/diffueraser.py function extract_step_number (line 30) | def extract_step_number(ckpt_name): function import_model_class_from_model_name_or_path (line 53) | def import_model_class_from_model_name_or_path(pretrained_model_name_or_... function resize_frames (line 76) | def resize_frames(frames, size=None): function read_mask (line 89) | def read_mask(validation_mask, fps, n_total_frames, img_size, mask_dilat... function read_priori (line 132) | def read_priori(priori, fps, n_total_frames, img_size): function read_video (line 163) | def read_video(validation_image, video_length, nframes, max_img_size): class DiffuEraser (line 195) | class DiffuEraser: method __init__ (line 196) | def __init__(self, device, ): method load_model (line 199) | def load_model(self,repo, diffueraser_path, ckpt_path,original_config_... method to (line 281) | def to(self, device): method forward (line 285) | def forward(self, validation_image, validation_mask, prioris, output_p... function simple_flicker_smoothing (line 512) | def simple_flicker_smoothing(frames, alpha=0.1): function morphological_edge_blur (line 536) | def morphological_edge_blur(mask, sigma=3.0, edge_width=5): FILE: libs/pipeline_diffueraser.py function retrieve_timesteps (line 43) | def retrieve_timesteps( function get_frames_context_swap (line 86) | def get_frames_context_swap(total_frames=192, overlap=4, num_frames_per_... class DiffuEraserPipelineOutput (line 111) | class DiffuEraserPipelineOutput(BaseOutput): class StableDiffusionDiffuEraserPipeline (line 115) | class StableDiffusionDiffuEraserPipeline( method __init__ (line 163) | def __init__( method _encode_prompt (line 210) | def _encode_prompt( method encode_prompt (line 243) | def encode_prompt( method encode_image (line 425) | def encode_image(self, image, device, num_images_per_prompt, output_hi... method decode_latents (line 449) | def decode_latents(self, latents, weight_dtype): method prepare_ip_adapter_image_embeds (line 461) | def prepare_ip_adapter_image_embeds( method run_safety_checker (line 513) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 528) | def decode_latents(self, latents, weight_dtype): method prepare_extra_step_kwargs (line 542) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 559) | def check_inputs( method check_image (line 674) | def check_image(self, images, masks, prompt, prompt_embeds): method prepare_image (line 731) | def prepare_image( method prepare_latents (line 765) | def prepare_latents(self, batch_size, num_channels_latents, num_frames... method temp_blend (line 792) | def temp_blend(a, b, overlap): method get_guidance_scale_embedding (line 799) | def get_guidance_scale_embedding(self, w, embedding_dim=512, dtype=tor... method guidance_scale (line 828) | def guidance_scale(self): method clip_skip (line 832) | def clip_skip(self): method do_classifier_free_guidance (line 839) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 843) | def cross_attention_kwargs(self): method num_timesteps (line 847) | def num_timesteps(self): method __call__ (line 852) | def __call__( FILE: libs/transformer_temporal.py class TransformerTemporalModelOutput (line 29) | class TransformerTemporalModelOutput(BaseOutput): class TransformerTemporalModel (line 41) | class TransformerTemporalModel(ModelMixin, ConfigMixin): method __init__ (line 71) | def __init__( method forward (line 121) | def forward( class TransformerSpatioTemporalModel (line 198) | class TransformerSpatioTemporalModel(nn.Module): method __init__ (line 213) | def __init__( method forward (line 273) | def forward( FILE: libs/unet_2d_blocks.py function get_down_block (line 43) | def get_down_block( function get_mid_block (line 252) | def get_mid_block( function get_up_block (line 351) | def get_up_block( class AutoencoderTinyBlock (line 576) | class AutoencoderTinyBlock(nn.Module): method __init__ (line 592) | def __init__(self, in_channels: int, out_channels: int, act_fn: str): method forward (line 609) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: class UNetMidBlock2D (line 613) | class UNetMidBlock2D(nn.Module): method __init__ (line 644) | def __init__( method forward (line 758) | def forward(self, hidden_states: torch.FloatTensor, temb: Optional[tor... class UNetMidBlock2DCrossAttn (line 768) | class UNetMidBlock2DCrossAttn(nn.Module): method __init__ (line 769) | def __init__( method forward (line 862) | def forward( class UNetMidBlock2DSimpleCrossAttn (line 914) | class UNetMidBlock2DSimpleCrossAttn(nn.Module): method __init__ (line 915) | def __init__( method forward (line 999) | def forward( class MidBlock2D (line 1038) | class MidBlock2D(nn.Module): method __init__ (line 1039) | def __init__( method forward (line 1094) | def forward( class AttnDownBlock2D (line 1126) | class AttnDownBlock2D(nn.Module): method __init__ (line 1127) | def __init__( method forward (line 1218) | def forward( class CrossAttnDownBlock2D (line 1249) | class CrossAttnDownBlock2D(nn.Module): method __init__ (line 1250) | def __init__( method forward (line 1341) | def forward( class DownBlock2D (line 1417) | class DownBlock2D(nn.Module): method __init__ (line 1418) | def __init__( method forward (line 1469) | def forward( class DownEncoderBlock2D (line 1512) | class DownEncoderBlock2D(nn.Module): method __init__ (line 1513) | def __init__( method forward (line 1576) | def forward(self, hidden_states: torch.FloatTensor, scale: float = 1.0... class AttnDownEncoderBlock2D (line 1587) | class AttnDownEncoderBlock2D(nn.Module): method __init__ (line 1588) | def __init__( method forward (line 1674) | def forward(self, hidden_states: torch.FloatTensor, scale: float = 1.0... class AttnSkipDownBlock2D (line 1687) | class AttnSkipDownBlock2D(nn.Module): method __init__ (line 1688) | def __init__( method forward (line 1768) | def forward( class SkipDownBlock2D (line 1795) | class SkipDownBlock2D(nn.Module): method __init__ (line 1796) | def __init__( method forward (line 1855) | def forward( class ResnetDownsampleBlock2D (line 1880) | class ResnetDownsampleBlock2D(nn.Module): method __init__ (line 1881) | def __init__( method forward (line 1944) | def forward( class SimpleCrossAttnDownBlock2D (line 1980) | class SimpleCrossAttnDownBlock2D(nn.Module): method __init__ (line 1981) | def __init__( method forward (line 2075) | def forward( class KDownBlock2D (line 2140) | class KDownBlock2D(nn.Module): method __init__ (line 2141) | def __init__( method forward (line 2186) | def forward( class KCrossAttnDownBlock2D (line 2220) | class KCrossAttnDownBlock2D(nn.Module): method __init__ (line 2221) | def __init__( method forward (line 2285) | def forward( class AttnUpBlock2D (line 2347) | class AttnUpBlock2D(nn.Module): method __init__ (line 2348) | def __init__( method forward (line 2439) | def forward( class CrossAttnUpBlock2D (line 2467) | class CrossAttnUpBlock2D(nn.Module): method __init__ (line 2468) | def __init__( method forward (line 2558) | def forward( class UpBlock2D (line 2654) | class UpBlock2D(nn.Module): method __init__ (line 2655) | def __init__( method forward (line 2704) | def forward( class UpDecoderBlock2D (line 2782) | class UpDecoderBlock2D(nn.Module): method __init__ (line 2783) | def __init__( method forward (line 2844) | def forward( class AttnUpDecoderBlock2D (line 2857) | class AttnUpDecoderBlock2D(nn.Module): method __init__ (line 2858) | def __init__( method forward (line 2944) | def forward( class AttnSkipUpBlock2D (line 2959) | class AttnSkipUpBlock2D(nn.Module): method __init__ (line 2960) | def __init__( method forward (line 3053) | def forward( class SkipUpBlock2D (line 3089) | class SkipUpBlock2D(nn.Module): method __init__ (line 3090) | def __init__( method forward (line 3161) | def forward( class ResnetUpsampleBlock2D (line 3194) | class ResnetUpsampleBlock2D(nn.Module): method __init__ (line 3195) | def __init__( method forward (line 3263) | def forward( class SimpleCrossAttnUpBlock2D (line 3303) | class SimpleCrossAttnUpBlock2D(nn.Module): method __init__ (line 3304) | def __init__( method forward (line 3402) | def forward( class KUpBlock2D (line 3469) | class KUpBlock2D(nn.Module): method __init__ (line 3470) | def __init__( method forward (line 3519) | def forward( class KCrossAttnUpBlock2D (line 3558) | class KCrossAttnUpBlock2D(nn.Module): method __init__ (line 3559) | def __init__( method forward (line 3644) | def forward( class KAttentionBlock (line 3706) | class KAttentionBlock(nn.Module): method __init__ (line 3730) | def __init__( method _to_3d (line 3773) | def _to_3d(self, hidden_states: torch.FloatTensor, height: int, weight... method _to_4d (line 3776) | def _to_4d(self, hidden_states: torch.FloatTensor, height: int, weight... method forward (line 3779) | def forward( FILE: libs/unet_2d_condition.py class UNet2DConditionOutput (line 57) | class UNet2DConditionOutput(BaseOutput): class UNet2DConditionModel (line 69) | class UNet2DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoade... method __init__ (line 166) | def __init__( method _check_config (line 482) | def _check_config( method _set_time_proj (line 534) | def _set_time_proj( method _set_encoder_hid_proj (line 562) | def _set_encoder_hid_proj( method _set_class_embedding (line 602) | def _set_class_embedding( method _set_add_embedding (line 639) | def _set_add_embedding( method _set_pos_net_if_use_gligen (line 679) | def _set_pos_net_if_use_gligen(self, attention_type: str, cross_attent... method attn_processors (line 693) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 716) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 750) | def set_default_attn_processor(self): method set_attention_slice (line 765) | def set_attention_slice(self, slice_size: Union[str, int, List[int]] =... method _set_gradient_checkpointing (line 830) | def _set_gradient_checkpointing(self, module, value=False): method enable_freeu (line 834) | def enable_freeu(self, s1: float, s2: float, b1: float, b2: float): method disable_freeu (line 858) | def disable_freeu(self): method fuse_qkv_projections (line 866) | def fuse_qkv_projections(self): method unfuse_qkv_projections (line 889) | def unfuse_qkv_projections(self): method unload_lora (line 902) | def unload_lora(self): method get_time_embed (line 913) | def get_time_embed( method get_class_embed (line 939) | def get_class_embed(self, sample: torch.Tensor, class_labels: Optional... method get_aug_embed (line 955) | def get_aug_embed( method process_encoder_hidden_states (line 1007) | def process_encoder_hidden_states( method forward (line 1039) | def forward( FILE: libs/unet_3d_blocks.py function get_down_block (line 37) | def get_down_block( function get_up_block (line 165) | def get_up_block( class UNetMidBlock3DCrossAttn (line 304) | class UNetMidBlock3DCrossAttn(nn.Module): method __init__ (line 305) | def __init__( method forward (line 406) | def forward( class CrossAttnDownBlock3D (line 438) | class CrossAttnDownBlock3D(nn.Module): method __init__ (line 439) | def __init__( method forward (line 539) | def forward( class DownBlock3D (line 580) | class DownBlock3D(nn.Module): method __init__ (line 581) | def __init__( method forward (line 646) | def forward( class CrossAttnUpBlock3D (line 669) | class CrossAttnUpBlock3D(nn.Module): method __init__ (line 670) | def __init__( method forward (line 764) | def forward( class UpBlock3D (line 826) | class UpBlock3D(nn.Module): method __init__ (line 827) | def __init__( method forward (line 886) | def forward( class DownBlockMotion (line 929) | class DownBlockMotion(nn.Module): method __init__ (line 930) | def __init__( method forward (line 1003) | def forward( class CrossAttnDownBlockMotion (line 1066) | class CrossAttnDownBlockMotion(nn.Module): method __init__ (line 1067) | def __init__( method forward (line 1181) | def forward( class CrossAttnUpBlockMotion (line 1275) | class CrossAttnUpBlockMotion(nn.Module): method __init__ (line 1276) | def __init__( method forward (line 1383) | def forward( class UpBlockMotion (line 1485) | class UpBlockMotion(nn.Module): method __init__ (line 1486) | def __init__( method forward (line 1555) | def forward( class UNetMidBlockCrossAttnMotion (line 1639) | class UNetMidBlockCrossAttnMotion(nn.Module): method __init__ (line 1640) | def __init__( method forward (line 1747) | def forward( class MidBlockTemporalDecoder (line 1824) | class MidBlockTemporalDecoder(nn.Module): method __init__ (line 1825) | def __init__( method forward (line 1868) | def forward( class UpBlockTemporalDecoder (line 1887) | class UpBlockTemporalDecoder(nn.Module): method __init__ (line 1888) | def __init__( method forward (line 1919) | def forward( class UNetMidBlockSpatioTemporal (line 1937) | class UNetMidBlockSpatioTemporal(nn.Module): method __init__ (line 1938) | def __init__( method forward (line 1992) | def forward( class DownBlockSpatioTemporal (line 2047) | class DownBlockSpatioTemporal(nn.Module): method __init__ (line 2048) | def __init__( method forward (line 2088) | def forward( class CrossAttnDownBlockSpatioTemporal (line 2137) | class CrossAttnDownBlockSpatioTemporal(nn.Module): method __init__ (line 2138) | def __init__( method forward (line 2198) | def forward( class UpBlockSpatioTemporal (line 2259) | class UpBlockSpatioTemporal(nn.Module): method __init__ (line 2260) | def __init__( method forward (line 2297) | def forward( class CrossAttnUpBlockSpatioTemporal (line 2348) | class CrossAttnUpBlockSpatioTemporal(nn.Module): method __init__ (line 2349) | def __init__( method forward (line 2406) | def forward( FILE: libs/unet_motion_model.py class MotionModules (line 50) | class MotionModules(nn.Module): method __init__ (line 51) | def __init__( class MotionAdapter (line 81) | class MotionAdapter(ModelMixin, ConfigMixin): method __init__ (line 83) | def __init__( method forward (line 165) | def forward(self, sample): class UNetMotionModel (line 169) | class UNetMotionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMix... method __init__ (line 181) | def __init__( method from_unet2d (line 389) | def from_unet2d( method freeze_unet2d_params (line 468) | def freeze_unet2d_params(self) -> None: method load_motion_modules (line 492) | def load_motion_modules(self, motion_adapter: Optional[MotionAdapter])... method save_motion_modules (line 502) | def save_motion_modules( method attn_processors (line 539) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 563) | def set_attn_processor( method enable_forward_chunking (line 600) | def enable_forward_chunking(self, chunk_size: Optional[int] = None, di... method disable_forward_chunking (line 630) | def disable_forward_chunking(self) -> None: method set_default_attn_processor (line 642) | def set_default_attn_processor(self) -> None: method _set_gradient_checkpointing (line 657) | def _set_gradient_checkpointing(self, module, value: bool = False) -> ... method enable_freeu (line 662) | def enable_freeu(self, s1: float, s2: float, b1: float, b2: float) -> ... method disable_freeu (line 687) | def disable_freeu(self) -> None: method forward (line 695) | def forward( FILE: node_utils.py function image2masks (line 20) | def image2masks(repo,video_image): function resize_and_center_paste (line 53) | def resize_and_center_paste(image_list, target_size=(1024, 1024)): function center_paste_and_resize (line 93) | def center_paste_and_resize(image_list, target_size=(1024, 1024)): function tensor_to_pil (line 120) | def tensor_to_pil(tensor): function tensor2pil_list (line 125) | def tensor2pil_list(image,width,height): function tensor2pil_upscale (line 134) | def tensor2pil_upscale(img_tensor, width, height): function nomarl_upscale (line 141) | def nomarl_upscale(img, width, height): function tensor2cv (line 149) | def tensor2cv(tensor_image): function cvargb2tensor (line 162) | def cvargb2tensor(img): function cv2tensor (line 167) | def cv2tensor(img): function images_generator (line 173) | def images_generator(img_list: list,): function load_images (line 224) | def load_images(img_list: list,): function tensor2pil (line 232) | def tensor2pil(tensor): function pil2narry (line 237) | def pil2narry(img): function equalize_lists (line 241) | def equalize_lists(list1, list2): function file_exists (line 268) | def file_exists(directory, filename): function download_weights (line 274) | def download_weights(file_dir,repo_id,subfolder="",pt_name=""): FILE: propainter/RAFT/corr.py class CorrBlock (line 12) | class CorrBlock: method __init__ (line 13) | def __init__(self, fmap1, fmap2, num_levels=4, radius=4): method __call__ (line 29) | def __call__(self, coords): method corr (line 53) | def corr(fmap1, fmap2): class CorrLayer (line 63) | class CorrLayer(torch.autograd.Function): method forward (line 65) | def forward(ctx, fmap1, fmap2, coords, r): method backward (line 75) | def backward(ctx, grad_corr): class AlternateCorrBlock (line 83) | class AlternateCorrBlock: method __init__ (line 84) | def __init__(self, fmap1, fmap2, num_levels=4, radius=4): method __call__ (line 94) | def __call__(self, coords): FILE: propainter/RAFT/datasets.py class FlowDataset (line 18) | class FlowDataset(data.Dataset): method __init__ (line 19) | def __init__(self, aug_params=None, sparse=False): method __getitem__ (line 34) | def __getitem__(self, index): method __rmul__ (line 93) | def __rmul__(self, v): method __len__ (line 98) | def __len__(self): class MpiSintel (line 102) | class MpiSintel(FlowDataset): method __init__ (line 103) | def __init__(self, aug_params=None, split='training', root='datasets/S... class FlyingChairs (line 121) | class FlyingChairs(FlowDataset): method __init__ (line 122) | def __init__(self, aug_params=None, split='train', root='datasets/Flyi... class FlyingThings3D (line 137) | class FlyingThings3D(FlowDataset): method __init__ (line 138) | def __init__(self, aug_params=None, root='datasets/FlyingThings3D', ds... class KITTI (line 161) | class KITTI(FlowDataset): method __init__ (line 162) | def __init__(self, aug_params=None, split='training', root='datasets/K... class HD1K (line 180) | class HD1K(FlowDataset): method __init__ (line 181) | def __init__(self, aug_params=None, root='datasets/HD1k'): function fetch_dataloader (line 199) | def fetch_dataloader(args, TRAIN_DS='C+T+K+S+H'): FILE: propainter/RAFT/demo.py function load_image (line 18) | def load_image(imfile): function load_image_list (line 24) | def load_image_list(image_files): function viz (line 36) | def viz(img, flo): function demo (line 50) | def demo(args): function RAFT_infer (line 71) | def RAFT_infer(args): FILE: propainter/RAFT/extractor.py class ResidualBlock (line 6) | class ResidualBlock(nn.Module): method __init__ (line 7) | def __init__(self, in_planes, planes, norm_fn='group', stride=1): method forward (line 48) | def forward(self, x): class BottleneckBlock (line 60) | class BottleneckBlock(nn.Module): method __init__ (line 61) | def __init__(self, in_planes, planes, norm_fn='group', stride=1): method forward (line 107) | def forward(self, x): class BasicEncoder (line 118) | class BasicEncoder(nn.Module): method __init__ (line 119) | def __init__(self, output_dim=128, norm_fn='batch', dropout=0.0): method _make_layer (line 159) | def _make_layer(self, dim, stride=1): method forward (line 168) | def forward(self, x): class SmallEncoder (line 195) | class SmallEncoder(nn.Module): method __init__ (line 196) | def __init__(self, output_dim=128, norm_fn='batch', dropout=0.0): method _make_layer (line 235) | def _make_layer(self, dim, stride=1): method forward (line 244) | def forward(self, x): FILE: propainter/RAFT/raft.py class autocast (line 15) | class autocast: method __init__ (line 16) | def __init__(self, enabled): method __enter__ (line 18) | def __enter__(self): method __exit__ (line 20) | def __exit__(self, *args): class RAFT (line 24) | class RAFT(nn.Module): method __init__ (line 25) | def __init__(self, args): method freeze_bn (line 59) | def freeze_bn(self): method initialize_flow (line 64) | def initialize_flow(self, img): method upsample_flow (line 73) | def upsample_flow(self, flow, mask): method forward (line 87) | def forward(self, image1, image2, iters=12, flow_init=None, test_mode=... FILE: propainter/RAFT/update.py class FlowHead (line 6) | class FlowHead(nn.Module): method __init__ (line 7) | def __init__(self, input_dim=128, hidden_dim=256): method forward (line 13) | def forward(self, x): class ConvGRU (line 16) | class ConvGRU(nn.Module): method __init__ (line 17) | def __init__(self, hidden_dim=128, input_dim=192+128): method forward (line 23) | def forward(self, h, x): class SepConvGRU (line 33) | class SepConvGRU(nn.Module): method __init__ (line 34) | def __init__(self, hidden_dim=128, input_dim=192+128): method forward (line 45) | def forward(self, h, x): class SmallMotionEncoder (line 62) | class SmallMotionEncoder(nn.Module): method __init__ (line 63) | def __init__(self, args): method forward (line 71) | def forward(self, flow, corr): class BasicMotionEncoder (line 79) | class BasicMotionEncoder(nn.Module): method __init__ (line 80) | def __init__(self, args): method forward (line 89) | def forward(self, flow, corr): class SmallUpdateBlock (line 99) | class SmallUpdateBlock(nn.Module): method __init__ (line 100) | def __init__(self, args, hidden_dim=96): method forward (line 106) | def forward(self, net, inp, corr, flow): class BasicUpdateBlock (line 114) | class BasicUpdateBlock(nn.Module): method __init__ (line 115) | def __init__(self, args, hidden_dim=128, input_dim=128): method forward (line 127) | def forward(self, net, inp, corr, flow, upsample=True): FILE: propainter/RAFT/utils/augmentor.py class FlowAugmentor (line 15) | class FlowAugmentor: method __init__ (line 16) | def __init__(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=T... method color_transform (line 36) | def color_transform(self, img1, img2): method eraser_transform (line 52) | def eraser_transform(self, img1, img2, bounds=[50, 100]): method spatial_transform (line 67) | def spatial_transform(self, img1, img2, flow): method __call__ (line 111) | def __call__(self, img1, img2, flow): class SparseFlowAugmentor (line 122) | class SparseFlowAugmentor: method __init__ (line 123) | def __init__(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=F... method color_transform (line 142) | def color_transform(self, img1, img2): method eraser_transform (line 148) | def eraser_transform(self, img1, img2): method resize_sparse_flow_map (line 161) | def resize_sparse_flow_map(self, flow, valid, fx=1.0, fy=1.0): method spatial_transform (line 195) | def spatial_transform(self, img1, img2, flow, valid): method __call__ (line 236) | def __call__(self, img1, img2, flow, valid): FILE: propainter/RAFT/utils/flow_viz.py function make_colorwheel (line 20) | def make_colorwheel(): function flow_uv_to_colors (line 70) | def flow_uv_to_colors(u, v, convert_to_bgr=False): function flow_to_image (line 109) | def flow_to_image(flow_uv, clip_flow=None, convert_to_bgr=False): FILE: propainter/RAFT/utils/flow_viz_pt.py function flow_to_image (line 6) | def flow_to_image(flow: torch.Tensor) -> torch.Tensor: function _normalized_flow_to_image (line 39) | def _normalized_flow_to_image(normalized_flow: torch.Tensor) -> torch.Te... function _make_colorwheel (line 74) | def _make_colorwheel() -> torch.Tensor: FILE: propainter/RAFT/utils/frame_utils.py function readFlow (line 12) | def readFlow(fn): function readPFM (line 33) | def readPFM(file): function writeFlow (line 70) | def writeFlow(filename,uv,v=None): function readFlowKITTI (line 102) | def readFlowKITTI(filename): function readDispKITTI (line 109) | def readDispKITTI(filename): function writeFlowKITTI (line 116) | def writeFlowKITTI(filename, uv): function read_gen (line 123) | def read_gen(file_name, pil=False): FILE: propainter/RAFT/utils/utils.py class InputPadder (line 7) | class InputPadder: method __init__ (line 9) | def __init__(self, dims, mode='sintel'): method pad (line 18) | def pad(self, *inputs): method unpad (line 21) | def unpad(self,x): function forward_interpolate (line 26) | def forward_interpolate(flow): function bilinear_sampler (line 57) | def bilinear_sampler(img, coords, mode='bilinear', mask=False): function coords_grid (line 74) | def coords_grid(batch, ht, wd): function upflow8 (line 80) | def upflow8(flow, mode='bilinear'): FILE: propainter/core/dataset.py class TrainDataset (line 19) | class TrainDataset(torch.utils.data.Dataset): method __init__ (line 20) | def __init__(self, args: dict): method __len__ (line 58) | def __len__(self): method _sample_index (line 61) | def _sample_index(self, length, sample_length, num_ref_frame=3): method __getitem__ (line 70) | def __getitem__(self, index): class TestDataset (line 141) | class TestDataset(torch.utils.data.Dataset): method __init__ (line 142) | def __init__(self, args): method __len__ (line 170) | def __len__(self): method __getitem__ (line 173) | def __getitem__(self, index): FILE: propainter/core/dist.py function get_world_size (line 5) | def get_world_size(): function get_global_rank (line 17) | def get_global_rank(): function get_local_rank (line 29) | def get_local_rank(): function get_master_ip (line 41) | def get_master_ip(): FILE: propainter/core/loss.py class PerceptualLoss (line 6) | class PerceptualLoss(nn.Module): method __init__ (line 29) | def __init__(self, method forward (line 59) | def forward(self, x, gt): method _gram_mat (line 101) | def _gram_mat(self, x): class LPIPSLoss (line 116) | class LPIPSLoss(nn.Module): method __init__ (line 117) | def __init__(self, method forward (line 133) | def forward(self, pred, target): class AdversarialLoss (line 144) | class AdversarialLoss(nn.Module): method __init__ (line 149) | def __init__(self, method __call__ (line 168) | def __call__(self, outputs, is_real, is_disc=None): FILE: propainter/core/lr_scheduler.py class MultiStepRestartLR (line 9) | class MultiStepRestartLR(_LRScheduler): method __init__ (line 20) | def __init__(self, method get_lr (line 35) | def get_lr(self): function get_position_from_periods (line 50) | def get_position_from_periods(iteration, cumulative_period): class CosineAnnealingRestartLR (line 68) | class CosineAnnealingRestartLR(_LRScheduler): method __init__ (line 84) | def __init__(self, method get_lr (line 100) | def get_lr(self): FILE: propainter/core/metrics.py function calculate_epe (line 13) | def calculate_epe(flow1, flow2): function calculate_psnr (line 21) | def calculate_psnr(img1, img2): function calc_psnr_and_ssim (line 40) | def calc_psnr_and_ssim(img1, img2): function init_i3d_model (line 64) | def init_i3d_model(i3d_model_path): function calculate_i3d_activations (line 72) | def calculate_i3d_activations(video1, video2, i3d_model, device): function calculate_vfid (line 87) | def calculate_vfid(real_activations, fake_activations): function calculate_frechet_distance (line 101) | def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6): function get_i3d_activations (line 155) | def get_i3d_activations(batched_video, class MaxPool3dSamePadding (line 197) | class MaxPool3dSamePadding(nn.MaxPool3d): method compute_pad (line 198) | def compute_pad(self, dim, s): method forward (line 204) | def forward(self, x): class Unit3D (line 223) | class Unit3D(nn.Module): method __init__ (line 224) | def __init__(self, method compute_pad (line 260) | def compute_pad(self, dim, s): method forward (line 266) | def forward(self, x): class InceptionModule (line 291) | class InceptionModule(nn.Module): method __init__ (line 292) | def __init__(self, in_channels, out_channels, name): method forward (line 328) | def forward(self, x): class InceptionI3d (line 336) | class InceptionI3d(nn.Module): method __init__ (line 373) | def __init__(self, method replace_logits (line 535) | def replace_logits(self, num_classes): method build (line 546) | def build(self): method forward (line 550) | def forward(self, x): method extract_features (line 562) | def extract_features(self, x, target_endpoint='Logits'): FILE: propainter/core/prefetch_dataloader.py class PrefetchGenerator (line 7) | class PrefetchGenerator(threading.Thread): method __init__ (line 18) | def __init__(self, generator, num_prefetch_queue): method run (line 25) | def run(self): method __next__ (line 30) | def __next__(self): method __iter__ (line 36) | def __iter__(self): class PrefetchDataLoader (line 40) | class PrefetchDataLoader(DataLoader): method __init__ (line 55) | def __init__(self, num_prefetch_queue, **kwargs): method __iter__ (line 59) | def __iter__(self): class CPUPrefetcher (line 63) | class CPUPrefetcher(): method __init__ (line 70) | def __init__(self, loader): method next (line 74) | def next(self): method reset (line 80) | def reset(self): class CUDAPrefetcher (line 84) | class CUDAPrefetcher(): method __init__ (line 97) | def __init__(self, loader, opt): method preload (line 105) | def preload(self): method next (line 117) | def next(self): method reset (line 123) | def reset(self): FILE: propainter/core/trainer.py class Trainer (line 26) | class Trainer: method __init__ (line 27) | def __init__(self, config): method setup_optimizers (line 129) | def setup_optimizers(self): method setup_schedulers (line 156) | def setup_schedulers(self): method update_learning_rate (line 187) | def update_learning_rate(self): method get_lr (line 193) | def get_lr(self): method add_summary (line 197) | def add_summary(self, writer, name, val): method load (line 207) | def load(self): method save (line 274) | def save(self, it): method train (line 321) | def train(self): method _train_epoch (line 350) | def _train_epoch(self, pbar): FILE: propainter/core/trainer_flow_w_edge.py class Trainer (line 26) | class Trainer: method __init__ (line 27) | def __init__(self, config): method setup_optimizers (line 88) | def setup_optimizers(self): method setup_schedulers (line 109) | def setup_schedulers(self): method update_learning_rate (line 128) | def update_learning_rate(self): method get_lr (line 132) | def get_lr(self): method add_summary (line 136) | def add_summary(self, writer, name, val): method load (line 146) | def load(self): method save (line 183) | def save(self, it): method train (line 212) | def train(self): method get_edges (line 261) | def get_edges(self, flows): method _train_epoch (line 275) | def _train_epoch(self, pbar): FILE: propainter/core/utils.py function read_dirnames_under_root (line 24) | def read_dirnames_under_root(root_dir): class TrainZipReader (line 33) | class TrainZipReader(object): method __init__ (line 36) | def __init__(self): method build_file_dict (line 40) | def build_file_dict(path): method imread (line 50) | def imread(path, idx): class TestZipReader (line 60) | class TestZipReader(object): method __init__ (line 63) | def __init__(self): method build_file_dict (line 67) | def build_file_dict(path): method imread (line 77) | def imread(path, idx): function to_tensors (line 94) | def to_tensors(): class GroupRandomHorizontalFlowFlip (line 98) | class GroupRandomHorizontalFlowFlip(object): method __call__ (line 101) | def __call__(self, img_group, flowF_group, flowB_group): class GroupRandomHorizontalFlip (line 114) | class GroupRandomHorizontalFlip(object): method __call__ (line 117) | def __call__(self, img_group, is_flow=False): class Stack (line 130) | class Stack(object): method __init__ (line 131) | def __init__(self, roll=False): method __call__ (line 134) | def __call__(self, img_group): class ToTorchFormatTensor (line 151) | class ToTorchFormatTensor(object): method __init__ (line 154) | def __init__(self, div=True): method __call__ (line 157) | def __call__(self, pic): function create_random_shape_with_random_motion (line 178) | def create_random_shape_with_random_motion(video_length, function create_random_shape_with_random_motion_zoom_rotation (line 220) | def create_random_shape_with_random_motion_zoom_rotation(video_length, z... function get_random_shape (line 268) | def get_random_shape(edge_num=9, ratio=0.7, width=432, height=240): function random_accelerate (line 309) | def random_accelerate(velocity, maxAcceleration, dist='uniform'): function get_random_velocity (line 324) | def get_random_velocity(max_speed=3, dist='uniform'): function random_move_control_points (line 336) | def random_move_control_points(X, FILE: propainter/inference.py function resize_frames (line 35) | def resize_frames(frames, size=None): function read_frame_from_videos (line 50) | def read_frame_from_videos(frame_root, video_length): function binary_mask (line 72) | def binary_mask(mask, th=0.1): function read_mask (line 78) | def read_mask(mpath, frames_len, size, flow_mask_dilates=8, mask_dilates... function get_ref_index (line 133) | def get_ref_index(mid_neighbor_id, neighbor_ids, length, ref_stride=10, ... function file_exists (line 149) | def file_exists(directory, filename): class Propainter (line 155) | class Propainter: method __init__ (line 156) | def __init__(self, device): method load_propainter (line 159) | def load_propainter(self,fix_raft_path,flow_path,ProPainter_path): method to (line 193) | def to(self, device): method forward (line 199) | def forward(self, video, mask,load_videobypath=False, resize_ratio=1.0... FILE: propainter/model/canny/canny_filter.py function rgb_to_grayscale (line 12) | def rgb_to_grayscale(image, rgb_weights = None): function canny (line 38) | def canny( class Canny (line 178) | class Canny(nn.Module): method __init__ (line 204) | def __init__( method __repr__ (line 242) | def __repr__(self) -> str: method forward (line 253) | def forward(self, input: torch.Tensor) -> Tuple[torch.Tensor, torch.Te... FILE: propainter/model/canny/filter.py function _compute_padding (line 9) | def _compute_padding(kernel_size: List[int]) -> List[int]: function filter2d (line 32) | def filter2d( function filter2d_separable (line 135) | def filter2d_separable( function filter3d (line 189) | def filter3d( FILE: propainter/model/canny/gaussian.py function gaussian_blur2d (line 10) | def gaussian_blur2d( class GaussianBlur2d (line 56) | class GaussianBlur2d(nn.Module): method __init__ (line 86) | def __init__( method __repr__ (line 99) | def __repr__(self) -> str: method forward (line 115) | def forward(self, input: torch.Tensor) -> torch.Tensor: FILE: propainter/model/canny/kernels.py function normalize_kernel2d (line 8) | def normalize_kernel2d(input: torch.Tensor) -> torch.Tensor: function gaussian (line 16) | def gaussian(window_size: int, sigma: float) -> torch.Tensor: function gaussian_discrete_erf (line 28) | def gaussian_discrete_erf(window_size: int, sigma) -> torch.Tensor: function _modified_bessel_0 (line 43) | def _modified_bessel_0(x: torch.Tensor) -> torch.Tensor: function _modified_bessel_1 (line 60) | def _modified_bessel_1(x: torch.Tensor) -> torch.Tensor: function _modified_bessel_i (line 77) | def _modified_bessel_i(n: int, x: torch.Tensor) -> torch.Tensor: function gaussian_discrete (line 106) | def gaussian_discrete(window_size, sigma) -> torch.Tensor: function laplacian_1d (line 127) | def laplacian_1d(window_size) -> torch.Tensor: function get_box_kernel2d (line 136) | def get_box_kernel2d(kernel_size: Tuple[int, int]) -> torch.Tensor: function get_binary_kernel2d (line 145) | def get_binary_kernel2d(window_size: Tuple[int, int]) -> torch.Tensor: function get_sobel_kernel_3x3 (line 157) | def get_sobel_kernel_3x3() -> torch.Tensor: function get_sobel_kernel_5x5_2nd_order (line 162) | def get_sobel_kernel_5x5_2nd_order() -> torch.Tensor: function _get_sobel_kernel_5x5_2nd_order_xy (line 175) | def _get_sobel_kernel_5x5_2nd_order_xy() -> torch.Tensor: function get_diff_kernel_3x3 (line 188) | def get_diff_kernel_3x3() -> torch.Tensor: function get_diff_kernel3d (line 193) | def get_diff_kernel3d(device=torch.device('cpu'), dtype=torch.float) -> ... function get_diff_kernel3d_2nd_order (line 219) | def get_diff_kernel3d_2nd_order(device=torch.device('cpu'), dtype=torch.... function get_sobel_kernel2d (line 260) | def get_sobel_kernel2d() -> torch.Tensor: function get_diff_kernel2d (line 266) | def get_diff_kernel2d() -> torch.Tensor: function get_sobel_kernel2d_2nd_order (line 272) | def get_sobel_kernel2d_2nd_order() -> torch.Tensor: function get_diff_kernel2d_2nd_order (line 279) | def get_diff_kernel2d_2nd_order() -> torch.Tensor: function get_spatial_gradient_kernel2d (line 286) | def get_spatial_gradient_kernel2d(mode: str, order: int) -> torch.Tensor: function get_spatial_gradient_kernel3d (line 318) | def get_spatial_gradient_kernel3d(mode: str, order: int, device=torch.de... function get_gaussian_kernel1d (line 346) | def get_gaussian_kernel1d(kernel_size: int, sigma: float, force_even: bo... function get_gaussian_discrete_kernel1d (line 374) | def get_gaussian_discrete_kernel1d(kernel_size: int, sigma: float, force... function get_gaussian_erf_kernel1d (line 403) | def get_gaussian_erf_kernel1d(kernel_size: int, sigma: float, force_even... function get_gaussian_kernel2d (line 432) | def get_gaussian_kernel2d( function get_laplacian_kernel1d (line 472) | def get_laplacian_kernel1d(kernel_size: int) -> torch.Tensor: function get_laplacian_kernel2d (line 496) | def get_laplacian_kernel2d(kernel_size: int) -> torch.Tensor: function get_pascal_kernel_2d (line 530) | def get_pascal_kernel_2d(kernel_size: int, norm: bool = True) -> torch.T... function get_pascal_kernel_1d (line 562) | def get_pascal_kernel_1d(kernel_size: int, norm: bool = False) -> torch.... function get_canny_nms_kernel (line 604) | def get_canny_nms_kernel(device=torch.device('cpu'), dtype=torch.float) ... function get_hysteresis_kernel (line 623) | def get_hysteresis_kernel(device=torch.device('cpu'), dtype=torch.float)... function get_hanning_kernel1d (line 642) | def get_hanning_kernel1d(kernel_size: int, device=torch.device('cpu'), d... function get_hanning_kernel2d (line 672) | def get_hanning_kernel2d(kernel_size: Tuple[int, int], device=torch.devi... FILE: propainter/model/canny/sobel.py function spatial_gradient (line 8) | def spatial_gradient(input: torch.Tensor, mode: str = 'sobel', order: in... function spatial_gradient3d (line 58) | def spatial_gradient3d(input: torch.Tensor, mode: str = 'diff', order: i... function sobel (line 122) | def sobel(input: torch.Tensor, normalized: bool = True, eps: float = 1e-... class SpatialGradient (line 164) | class SpatialGradient(nn.Module): method __init__ (line 184) | def __init__(self, mode: str = 'sobel', order: int = 1, normalized: bo... method __repr__ (line 190) | def __repr__(self) -> str: method forward (line 196) | def forward(self, input: torch.Tensor) -> torch.Tensor: class SpatialGradient3d (line 200) | class SpatialGradient3d(nn.Module): method __init__ (line 221) | def __init__(self, mode: str = 'diff', order: int = 1) -> None: method __repr__ (line 228) | def __repr__(self) -> str: method forward (line 231) | def forward(self, input: torch.Tensor) -> torch.Tensor: # type: ignore class Sobel (line 235) | class Sobel(nn.Module): method __init__ (line 254) | def __init__(self, normalized: bool = True, eps: float = 1e-6) -> None: method __repr__ (line 259) | def __repr__(self) -> str: method forward (line 262) | def forward(self, input: torch.Tensor) -> torch.Tensor: FILE: propainter/model/misc.py function constant_init (line 12) | def constant_init(module, val, bias=0): function get_root_logger (line 19) | def get_root_logger(logger_name='basicsr', log_level=logging.INFO, log_f... function gpu_is_available (line 61) | def gpu_is_available(): function get_device (line 67) | def get_device(gpu_id=None): function set_random_seed (line 81) | def set_random_seed(seed): function get_time_str (line 90) | def get_time_str(): function scandir (line 94) | def scandir(dir_path, suffix=None, recursive=False, full_path=False): FILE: propainter/model/modules/base_module.py class BaseNetwork (line 7) | class BaseNetwork(nn.Module): method __init__ (line 8) | def __init__(self): method print_network (line 11) | def print_network(self): method init_weights (line 22) | def init_weights(self, init_type='normal', gain=0.02): class Vec2Feat (line 64) | class Vec2Feat(nn.Module): method __init__ (line 65) | def __init__(self, channel, hidden, kernel_size, stride, padding): method forward (line 79) | def forward(self, x, t, output_size): class FusionFeedForward (line 94) | class FusionFeedForward(nn.Module): method __init__ (line 95) | def __init__(self, dim, hidden_dim=1960, t2t_params=None): method forward (line 104) | def forward(self, x, output_size): FILE: propainter/model/modules/deformconv.py class ModulatedDeformConv2d (line 7) | class ModulatedDeformConv2d(nn.Module): method __init__ (line 8) | def __init__(self, method init_weights (line 40) | def init_weights(self): method forward (line 53) | def forward(self, x, offset, mask): FILE: propainter/model/modules/flow_comp_raft.py function initialize_RAFT (line 15) | def initialize_RAFT(model_path='weights/raft-things.pth', device='cuda'): class RAFT_bi (line 32) | class RAFT_bi(nn.Module): method __init__ (line 34) | def __init__(self, model_path='weights/raft-things.pth', device='cuda'): method forward (line 44) | def forward(self, gt_local_frames, iters=20): function smoothness_loss (line 64) | def smoothness_loss(flow, cmask): function smoothness_deltas (line 71) | def smoothness_deltas(flow): function second_order_loss (line 92) | def second_order_loss(flow, cmask): function charbonnier_loss (line 99) | def charbonnier_loss(x, mask=None, truncate=None, alpha=0.45, beta=1.0, ... function second_order_deltas (line 118) | def second_order_deltas(flow): function create_mask (line 147) | def create_mask(tensor, paddings): function ternary_loss (line 168) | def ternary_loss(flow_comp, flow_gt, mask, current_frame, shift_frame, s... class FlowLoss (line 178) | class FlowLoss(nn.Module): method __init__ (line 179) | def __init__(self): method forward (line 183) | def forward(self, pred_flows, gt_flows, masks, frames): function edgeLoss (line 212) | def edgeLoss(preds_edges, edges): class EdgeLoss (line 233) | class EdgeLoss(nn.Module): method __init__ (line 234) | def __init__(self): method forward (line 237) | def forward(self, pred_edges, gt_edges, masks): class FlowSimpleLoss (line 252) | class FlowSimpleLoss(nn.Module): method __init__ (line 253) | def __init__(self): method forward (line 257) | def forward(self, pred_flows, gt_flows): FILE: propainter/model/modules/flow_loss_utils.py function flow_warp (line 6) | def flow_warp(x, function length_sq (line 62) | def length_sq(x): function fbConsistencyCheck (line 66) | def fbConsistencyCheck(flow_fw, flow_bw, alpha1=0.01, alpha2=0.5): function rgb2gray (line 83) | def rgb2gray(image): function ternary_transform (line 89) | def ternary_transform(image, max_distance=1): function hamming_distance (line 102) | def hamming_distance(t1, t2): function create_mask (line 109) | def create_mask(mask, paddings): function ternary_loss2 (line 124) | def ternary_loss2(frame1, warp_frame21, confMask, masks, max_distance=1): FILE: propainter/model/modules/sparse_transformer.py class SoftSplit (line 7) | class SoftSplit(nn.Module): method __init__ (line 8) | def __init__(self, channel, hidden, kernel_size, stride, padding): method forward (line 19) | def forward(self, x, b, output_size): class SoftComp (line 34) | class SoftComp(nn.Module): method __init__ (line 35) | def __init__(self, channel, hidden, kernel_size, stride, padding): method forward (line 49) | def forward(self, x, t, output_size): class FusionFeedForward (line 64) | class FusionFeedForward(nn.Module): method __init__ (line 65) | def __init__(self, dim, hidden_dim=1960, t2t_params=None): method forward (line 74) | def forward(self, x, output_size): function window_partition (line 104) | def window_partition(x, window_size, n_head): class SparseWindowAttention (line 117) | class SparseWindowAttention(nn.Module): method __init__ (line 118) | def __init__(self, dim, n_head, window_size, pool_size=(4,4), qkv_bias... method forward (line 158) | def forward(self, x, mask=None, T_ind=None, attn_mask=None): class TemporalSparseTransformer (line 284) | class TemporalSparseTransformer(nn.Module): method __init__ (line 285) | def __init__(self, dim, n_head, window_size, pool_size, method forward (line 294) | def forward(self, x, fold_x_size, mask=None, T_ind=None): class TemporalSparseTransformerBlock (line 317) | class TemporalSparseTransformerBlock(nn.Module): method __init__ (line 318) | def __init__(self, dim, n_head, window_size, pool_size, depths, t2t_pa... method forward (line 328) | def forward(self, x, fold_x_size, l_mask=None, t_dilation=2): FILE: propainter/model/modules/spectral_norm.py class SpectralNorm (line 8) | class SpectralNorm(object): method __init__ (line 20) | def __init__(self, name='weight', n_power_iterations=1, dim=0, eps=1e-... method reshape_weight_to_matrix (line 30) | def reshape_weight_to_matrix(self, weight): method compute_weight (line 40) | def compute_weight(self, module, do_power_iteration): method remove (line 98) | def remove(self, module): method __call__ (line 108) | def __call__(self, module, inputs): method _solve_v_and_rescale (line 113) | def _solve_v_and_rescale(self, weight_mat, u, target_sigma): method apply (line 122) | def apply(module, name, n_power_iterations, dim, eps): class SpectralNormLoadStateDictPreHook (line 161) | class SpectralNormLoadStateDictPreHook(object): method __init__ (line 163) | def __init__(self, fn): method __call__ (line 174) | def __call__(self, state_dict, prefix, local_metadata, strict, class SpectralNormStateDictHook (line 192) | class SpectralNormStateDictHook(object): method __init__ (line 194) | def __init__(self, fn): method __call__ (line 197) | def __call__(self, module, state_dict, prefix, local_metadata): function spectral_norm (line 207) | def spectral_norm(module, function remove_spectral_norm (line 264) | def remove_spectral_norm(module, name='weight'): function use_spectral_norm (line 285) | def use_spectral_norm(module, use_sn=False): FILE: propainter/model/propainter.py function length_sq (line 29) | def length_sq(x): function fbConsistencyCheck (line 32) | def fbConsistencyCheck(flow_fw, flow_bw, alpha1=0.01, alpha2=0.5): #debug class DeformableAlignment (line 44) | class DeformableAlignment(ModulatedDeformConv2d): method __init__ (line 46) | def __init__(self, *args, **kwargs): method init_offset (line 63) | def init_offset(self): method forward (line 66) | def forward(self, x, cond_feat, flow): class BidirectionalPropagation (line 82) | class BidirectionalPropagation(nn.Module): method __init__ (line 83) | def __init__(self, channel, learnable=True): method binary_mask (line 108) | def binary_mask(self, mask, th=0.1): method forward (line 114) | def forward(self, x, flows_forward, flows_backward, mask, interpolatio... class Encoder (line 214) | class Encoder(nn.Module): method __init__ (line 215) | def __init__(self): method forward (line 239) | def forward(self, x): class deconv (line 256) | class deconv(nn.Module): method __init__ (line 257) | def __init__(self, method forward (line 269) | def forward(self, x): class InpaintGenerator (line 277) | class InpaintGenerator(BaseNetwork): method __init__ (line 278) | def __init__(self, init_weights=True, model_path=None): method img_propagation (line 336) | def img_propagation(self, masked_frames, completed_flows, masks, inter... method forward (line 340) | def forward(self, masked_frames, completed_flows, masks_in, masks_upda... class Discriminator (line 399) | class Discriminator(BaseNetwork): method __init__ (line 400) | def __init__(self, method forward (line 464) | def forward(self, xs): class Discriminator_2D (line 475) | class Discriminator_2D(BaseNetwork): method __init__ (line 476) | def __init__(self, method forward (line 540) | def forward(self, xs): function spectral_norm (line 550) | def spectral_norm(module, mode=True): FILE: propainter/model/recurrent_flow_completion.py class SecondOrderDeformableAlignment (line 14) | class SecondOrderDeformableAlignment(ModulatedDeformConv2d): method __init__ (line 16) | def __init__(self, *args, **kwargs): method init_offset (line 32) | def init_offset(self): method forward (line 35) | def forward(self, x, extra_feat): class BidirectionalPropagation (line 51) | class BidirectionalPropagation(nn.Module): method __init__ (line 52) | def __init__(self, channel): method forward (line 71) | def forward(self, x): class deconv (line 132) | class deconv(nn.Module): method __init__ (line 133) | def __init__(self, method forward (line 145) | def forward(self, x): class P3DBlock (line 153) | class P3DBlock(nn.Module): method __init__ (line 154) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 167) | def forward(self, feats): class EdgeDetection (line 177) | class EdgeDetection(nn.Module): method __init__ (line 178) | def __init__(self, in_ch=2, out_ch=1, mid_ch=16): method forward (line 198) | def forward(self, flow): class RecurrentFlowCompleteNet (line 208) | class RecurrentFlowCompleteNet(nn.Module): method __init__ (line 209) | def __init__(self, model_path=None): method forward (line 277) | def forward(self, masked_flows, masks): method forward_bidirect_flow (line 317) | def forward_bidirect_flow(self, masked_flows_bi, masks): method combine_flow (line 345) | def combine_flow(self, masked_flows_bi, pred_flows_bi, masks): FILE: propainter/model/vgg_arch.py function insert_bn (line 34) | def insert_bn(names): class VGGFeatureExtractor (line 51) | class VGGFeatureExtractor(nn.Module): method __init__ (line 74) | def __init__(self, method forward (line 137) | def forward(self, x): FILE: propainter/utils/download_util.py function sizeof_fmt (line 8) | def sizeof_fmt(size, suffix='B'): function download_file_from_google_drive (line 25) | def download_file_from_google_drive(file_id, save_path): function get_confirm_token (line 55) | def get_confirm_token(response): function save_response_content (line 62) | def save_response_content(response, destination, file_size=None, chunk_s... function load_file_from_url (line 83) | def load_file_from_url(url, model_dir=None, progress=True, file_name=None): FILE: propainter/utils/file_client.py class BaseStorageBackend (line 4) | class BaseStorageBackend(metaclass=ABCMeta): method get (line 13) | def get(self, filepath): method get_text (line 17) | def get_text(self, filepath): class MemcachedBackend (line 21) | class MemcachedBackend(BaseStorageBackend): method __init__ (line 31) | def __init__(self, server_list_cfg, client_cfg, sys_path=None): method get (line 46) | def get(self, filepath): method get_text (line 53) | def get_text(self, filepath): class HardDiskBackend (line 57) | class HardDiskBackend(BaseStorageBackend): method get (line 60) | def get(self, filepath): method get_text (line 66) | def get_text(self, filepath): class LmdbBackend (line 73) | class LmdbBackend(BaseStorageBackend): method __init__ (line 93) | def __init__(self, db_paths, client_keys='default', readonly=True, loc... method get (line 113) | def get(self, filepath, client_key): method get_text (line 127) | def get_text(self, filepath): class FileClient (line 131) | class FileClient(object): method __init__ (line 150) | def __init__(self, backend='disk', **kwargs): method get (line 157) | def get(self, filepath, client_key='default'): method get_text (line 165) | def get_text(self, filepath): FILE: propainter/utils/flow_util.py function resize_flow (line 6) | def resize_flow(flow, newh, neww): function resize_flow_pytorch (line 13) | def resize_flow_pytorch(flow, newh, neww): function imwrite (line 21) | def imwrite(img, file_path, params=None, auto_mkdir=True): function flowread (line 28) | def flowread(flow_path, quantize=False, concat_axis=0, *args, **kwargs): function flowwrite (line 67) | def flowwrite(flow, filename, quantize=False, concat_axis=0, *args, **kw... function quantize_flow (line 102) | def quantize_flow(flow, max_val=0.02, norm=True): function dequantize_flow (line 128) | def dequantize_flow(dx, dy, max_val=0.02, denorm=True): function quantize (line 152) | def quantize(arr, min_val, max_val, levels, dtype=np.int64): function dequantize (line 176) | def dequantize(arr, min_val, max_val, levels, dtype=np.float64): FILE: propainter/utils/img_util.py function img2tensor (line 9) | def img2tensor(imgs, bgr2rgb=True, float32=True): function tensor2img (line 38) | def tensor2img(tensor, rgb2bgr=True, out_type=np.uint8, min_max=(0, 1)): function tensor2img_fast (line 97) | def tensor2img_fast(tensor, rgb2bgr=True, min_max=(0, 1)): function imfrombytes (line 114) | def imfrombytes(content, flag='color', float32=False): function imwrite (line 135) | def imwrite(img, file_path, params=None, auto_mkdir=True): function crop_border (line 154) | def crop_border(imgs, crop_border): FILE: run_diffueraser.py function load_diffueraser (line 11) | def load_diffueraser(sd_repo,pre_model_path, ckpt_path,original_config_f... function load_propainter (line 18) | def load_propainter(fix_raft_path,flow_path,ProPainter_path,device="cpu"):