MCPcopy Create free account

hub / github.com/GaParmar/img2img-turbo / functions

Functions69 in github.com/GaParmar/img2img-turbo

↓ 11 callersMethodforward_with_networks
(x, direction, vae_enc, unet, vae_dec, sched, timesteps, text_emb)
src/cyclegan_turbo.py:200
↓ 4 callersMethod_init_hooks_data
(self)
src/my_utils/dino_struct.py:34
↓ 4 callersFunctionbuild_transform
Constructs a transformation pipeline based on the specified image preparation method. Parameters: - image_prep (str): A string describin
src/my_utils/training_utils.py:184
↓ 4 callersMethodload_ckpt_from_url
(self, url, ckpt_folder)
src/cyclegan_turbo.py:192
↓ 3 callersMethod_clear_hooks
(self)
src/my_utils/dino_struct.py:54
↓ 3 callersMethod_register_hooks
(self, **kwargs)
src/my_utils/dino_struct.py:43
↓ 3 callersMethodget_embedding_dim
(self)
src/my_utils/dino_struct.py:130
↓ 3 callersMethodget_head_num
(self)
src/my_utils/dino_struct.py:125
↓ 3 callersMethodget_patch_num
(self, input_img_shape)
src/my_utils/dino_struct.py:121
↓ 3 callersFunctionmake_1step_sched
()
src/model.py:7
↓ 3 callersFunctionpil_image_to_data_uri
(img, format="PNG")
gradio_sketch2image.py:60
↓ 2 callersMethod__init__
(self, vae, vae_b2a=None)
src/cyclegan_turbo.py:16
↓ 2 callersMethodcalculate_global_ssim_loss
(self, outputs, inputs)
src/my_utils/dino_struct.py:178
↓ 2 callersFunctioncanny_from_pil
(image, low_threshold=100, high_threshold=200)
src/image_prep.py:6
↓ 2 callersMethodget_keys_self_sim_from_input
(self, input_img, layer_num)
src/my_utils/dino_struct.py:161
↓ 2 callersMethodget_patch_size
(self)
src/my_utils/dino_struct.py:108
↓ 2 callersMethodload_ckpt_from_state_dict
(self, sd)
src/cyclegan_turbo.py:162
↓ 1 callersMethod__init__
(self, convin_pretrained, convin_curr)
src/pix2pix_turbo.py:17
↓ 1 callersMethod__init__
Itialize the paired dataset object for loading and transforming paired data samples from specified dataset folders. This con
src/my_utils/training_utils.py:219
↓ 1 callersMethod_get_attn_hook
(self)
src/my_utils/dino_struct.py:65
↓ 1 callersMethod_get_block_hook
(self)
src/my_utils/dino_struct.py:59
↓ 1 callersMethod_get_patch_imd_hook
(self)
src/my_utils/dino_struct.py:78
↓ 1 callersMethod_get_qkv_hook
(self)
src/my_utils/dino_struct.py:71
↓ 1 callersFunctionattn_cosine_sim
(x, eps=1e-08)
src/my_utils/dino_struct.py:6
↓ 1 callersFunctiondownload_url
(url, outf)
src/model.py:57
↓ 1 callersMethodget_height_patch_num
(self, input_img_shape)
src/my_utils/dino_struct.py:116
↓ 1 callersMethodget_keys_from_input
(self, input_img, layer_num)
src/my_utils/dino_struct.py:156
↓ 1 callersMethodget_keys_from_qkv
(self, qkv, input_img_shape)
src/my_utils/dino_struct.py:142
↓ 1 callersMethodget_qkv_feature_from_input
(self, input_img)
src/my_utils/dino_struct.py:92
↓ 1 callersMethodget_traininable_params
(unet, vae_a2b, vae_b2a)
src/cyclegan_turbo.py:210
↓ 1 callersMethodget_width_patch_num
(self, input_img_shape)
src/my_utils/dino_struct.py:111
↓ 1 callersFunctioninitialize_unet
(rank, return_lora_module_names=False)
src/cyclegan_turbo.py:48
↓ 1 callersFunctioninitialize_vae
(rank=4, return_lora_module_names=False)
src/cyclegan_turbo.py:79
↓ 1 callersFunctionmain
(args)
src/train_pix2pix_turbo.py:27
↓ 1 callersFunctionmain
(args)
src/train_cyclegan_turbo.py:25
↓ 1 callersFunctionparse_args_paired_training
Parses command-line arguments used for configuring an paired session (pix2pix-Turbo). This function sets up an argument parser to handle vari
src/my_utils/training_utils.py:12
↓ 1 callersFunctionparse_args_unpaired_training
Parses command-line arguments used for configuring an unpaired session (CycleGAN-Turbo). This function sets up an argument parser to handle v
src/my_utils/training_utils.py:104
↓ 1 callersMethodsave_model
(self, outf)
src/pix2pix_turbo.py:221
↓ 1 callersMethodset_eval
(self)
src/pix2pix_turbo.py:165
↓ 1 callersMethodset_train
(self)
src/pix2pix_turbo.py:171
Method__getitem__
Retrieves a dataset item given its index. Each item consists of an input image, its corresponding output image, the captions associa
src/my_utils/training_utils.py:258
Method__getitem__
Fetches a pair of unaligned images from the source and target domains along with their corresponding tokenized captions. Fo
src/my_utils/training_utils.py:364
Method__init__
(self, pretrained_name=None, pretrained_path=None, ckpt_folder="checkpoints", lora_rank_unet=8, lora_rank_vae=
src/pix2pix_turbo.py:30
Method__init__
(self, vae, vae_b2a=None)
src/cyclegan_turbo.py:31
Method__init__
(self, pretrained_name=None, pretrained_path=None, ckpt_folder="checkpoints", lora_rank_unet=8, lora_rank_vae=
src/cyclegan_turbo.py:110
Method__init__
A dataset class for loading unpaired data samples from two distinct domains (source and target), typically used in unsupervised learn
src/my_utils/training_utils.py:312
Method__init__
(self, model_name, device)
src/my_utils/dino_struct.py:21
Method__init__
(self, )
src/my_utils/dino_struct.py:170
Method__len__
Returns: int: The total number of items in the dataset.
src/my_utils/training_utils.py:251
Method__len__
Returns: int: The total number of items in the dataset.
src/my_utils/training_utils.py:357
Method_get_attn_output
(model, inp, output)
src/my_utils/dino_struct.py:66
Method_get_block_output
(model, input, output)
src/my_utils/dino_struct.py:60
Method_get_qkv_output
(model, inp, output)
src/my_utils/dino_struct.py:72
Functionfn_transform
(x)
src/train_pix2pix_turbo.py:156
Methodforward
(self, x)
src/pix2pix_turbo.py:23
Methodforward
(self, c_t, prompt=None, prompt_tokens=None, deterministic=True, r=1.0, noise_map=None)
src/pix2pix_turbo.py:186
Methodforward
(self, x, direction)
src/cyclegan_turbo.py:21
Methodforward
(self, x, direction)
src/cyclegan_turbo.py:36
Methodforward
(self, x_t, direction=None, caption=None, caption_emb=None)
src/cyclegan_turbo.py:241
Methodget_attn_feature_from_input
(self, input_img)
src/my_utils/dino_struct.py:100
Methodget_feature_from_input
(self, input_img)
src/my_utils/dino_struct.py:84
Methodget_queries_from_qkv
(self, qkv, input_img_shape)
src/my_utils/dino_struct.py:135
Methodget_values_from_qkv
(self, qkv, input_img_shape)
src/my_utils/dino_struct.py:149
Functionmy_vae_decoder_fwd
(self, sample, latent_embeds=None)
src/model.py:30
Functionmy_vae_encoder_fwd
(self, sample)
src/model.py:14
Functionprocess
(input_image, prompt, low_threshold, high_threshold)
gradio_canny2image.py:12
Functionrun
(image, prompt, prompt_template, style_name, seed, val_r)
gradio_sketch2image.py:67
Functionupdate_canvas
(use_line, use_eraser)
gradio_sketch2image.py:94
Functionupload_sketch
(file)
gradio_sketch2image.py:104