class documentation

The GFPGAN architecture: Unet + StyleGAN2 decoder with SFT. It is the clean version without custom compiled CUDA extensions used in StyleGAN2. Ref: GFP-GAN: Towards Real-World Blind Face Restoration with Generative Facial Prior.

Parameters
out_sizeThe spatial size of outputs.
num_style_featChannel number of style features. Default: 512.
channel_multiplierChannel multiplier for large networks of StyleGAN2. Default: 2.
decoder_load_pathThe path to the pre-trained decoder model (usually, the StyleGAN2). Default: None.
fix_decoderWhether to fix the decoder. Default: True.
num_mlpLayer number of MLP style layers. Default: 8.
input_is_latentWhether input is latent style. Default: False.
different_wWhether to use different latent w for different layers. Default: False.
narrowThe narrow ratio for channels. Default: 1.
sft_halfWhether to apply SFT on half of the input channels. Default: False.
Method __init__ Undocumented
Method forward Forward function for GFPGANv1Clean.
Class Variable hyperparameters Undocumented
Instance Variable condition_scale Undocumented
Instance Variable condition_shift Undocumented
Instance Variable conv_body_down Undocumented
Instance Variable conv_body_first Undocumented
Instance Variable conv_body_up Undocumented
Instance Variable different_w Undocumented
Instance Variable final_conv Undocumented
Instance Variable final_linear Undocumented
Instance Variable input_is_latent Undocumented
Instance Variable log_size Undocumented
Instance Variable num_style_feat Undocumented
Instance Variable stylegan_decoder Undocumented
Instance Variable toRGB Undocumented
def __init__(self, *, out_size=512, num_style_feat=512, channel_multiplier=2, decoder_load_path=None, fix_decoder=False, num_mlp=8, input_is_latent=True, different_w=True, narrow=1, sft_half=True): (source)

Undocumented

def forward(self, x, return_latents=False, return_rgb=True, randomize_noise=True, **kwargs): (source)

Forward function for GFPGANv1Clean.

Parameters
x:TensorInput images.
return_latents:boolWhether to return style latents. Default: False.
return_rgb:boolWhether return intermediate rgb images. Default: True.
randomize_noise:boolRandomize noise, used when 'noise' is False. Default: True.
**kwargsUndocumented
hyperparameters: dict = (source)

Undocumented

condition_scale = (source)

Undocumented

condition_shift = (source)

Undocumented

conv_body_down = (source)

Undocumented

conv_body_first = (source)

Undocumented

conv_body_up = (source)

Undocumented

different_w: bool = (source)

Undocumented

final_conv = (source)

Undocumented

final_linear = (source)

Undocumented

input_is_latent: bool = (source)

Undocumented

log_size = (source)

Undocumented

num_style_feat: int = (source)

Undocumented

stylegan_decoder = (source)

Undocumented

Undocumented