Blonde girl
Input
input_image
Input image to upscale
![https://files.tungsten.run/uploads/bd7b532984bb4cbdb0035437bc5cb201/tmppgowdctq123.png](https://files.tungsten.run/uploads/bd7b532984bb4cbdb0035437bc5cb201/tmppgowdctq123.png)
Output
![https://files.tungsten.run/uploads/f75cf5fcbd4a422a9b6bb99afc782b86/output.png](https://files.tungsten.run/uploads/f75cf5fcbd4a422a9b6bb99afc782b86/output.png)
Preparing inputs...
Predicting...
/usr/local/lib/python3.10/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
Disable distributed.
2023-08-25 15:21:16,799 INFO:
____ _ _____ ____
/ __ ) ____ _ _____ (_)_____/ ___/ / __ \
/ __ |/ __ `// ___// // ___/\__ \ / /_/ /
/ /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
/_____/ \__,_//____//_/ \___//____//_/ |_|
______ __ __ __ __
/ ____/____ ____ ____/ / / / __ __ _____ / /__ / /
/ / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
/ /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
\____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
Version Information:
BasicSR: 1.3.4.9
PyTorch: 2.0.1+cu118
TorchVision: 0.15.2+cu118
2023-08-25 15:21:16,799 INFO:
name: HAT_GAN_Real_sharper
model_type: HATModel
scale: 4
num_gpu: 1
manual_seed: 0
tile:[
tile_size: 512
tile_pad: 32
]
datasets:[
test_1:[
name: custom
type: SingleImageDataset
dataroot_lq: input_dir
io_backend:[
type: disk
]
phase: test
scale: 4
]
]
network_g:[
type: HAT
upscale: 4
in_chans: 3
img_size: 64
window_size: 16
compress_ratio: 3
squeeze_factor: 30
conv_scale: 0.01
overlap_ratio: 0.5
img_range: 1.0
depths: [6, 6, 6, 6, 6, 6]
embed_dim: 180
num_heads: [6, 6, 6, 6, 6, 6]
mlp_ratio: 2
upsampler: pixelshuffle
resi_connection: 1conv
]
path:[
pretrain_network_g: ./experiments/pretrained_models/Real_HAT_GAN_sharper.pth
strict_load_g: True
param_key_g: params_ema
results_root: /tungsten/results/HAT_GAN_Real_sharper
log: /tungsten/results/HAT_GAN_Real_sharper
visualization: /tungsten/results/HAT_GAN_Real_sharper/visualization
]
val:[
save_img: True
suffix: None
]
dist: False
rank: 0
world_size: 1
auto_resume: False
is_train: False
2023-08-25 15:21:16,799 INFO: Dataset [SingleImageDataset] - custom is built.
2023-08-25 15:21:16,799 INFO: Number of test images in custom: 1
/usr/local/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
2023-08-25 15:21:17,054 INFO: Network [HAT] is created.
2023-08-25 15:21:17,423 INFO: Network: HAT, with parameters: 20,772,507
2023-08-25 15:21:17,424 INFO: HAT(
(conv_first): Conv2d(3, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(patch_embed): PatchEmbed(
(norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
)
(patch_unembed): PatchUnEmbed()
(pos_drop): Dropout(p=0.0, inplace=False)
(layers): ModuleList(
(0): RHAG(
(residual_group): AttenBlocks(
(blocks): ModuleList(
(0): HAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(attn): WindowAttention(
(qkv): Linear(in_features=180, out_features=540, bias=True)
(attn_drop): Dropout(p=0.0, inplace=False)
(proj): Linear(in_features=180, out_features=180, bias=True)
(proj_drop): Dropout(p=0.0, inplace=False)
(softmax): Softmax(dim=-1)
)
(conv_block): CAB(
(cab): Sequential(
(0): Conv2d(180, 60, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): GELU(approximate='none')
(2): Conv2d(60, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): ChannelAttention(
(attention): Sequential(
(0): AdaptiveAvgPool2d(output_size=1)
(1): Conv2d(180, 6, kernel_size=(1, 1), stride=(1, 1))
(2): ReLU(inplace=True)
(3): Conv2d(6, 180, kernel_size=(1, 1), stride=(1, 1))
(4): Sigmoid()
)
)
)
)
(drop_path): Identity()
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
(1-5): 5 x HAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(attn): WindowAttention(
(qkv): Linear(in_features=180, out_features=540, bias=True)
(attn_drop): Dropout(p=0.0, inplace=False)
(proj): Linear(in_features=180, out_features=180, bias=True)
(proj_drop): Dropout(p=0.0, inplace=False)
(softmax): Softmax(dim=-1)
)
(conv_block): CAB(
(cab): Sequential(
(0): Conv2d(180, 60, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): GELU(approximate='none')
(2): Conv2d(60, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): ChannelAttention(
(attention): Sequential(
(0): AdaptiveAvgPool2d(output_size=1)
(1): Conv2d(180, 6, kernel_size=(1, 1), stride=(1, 1))
(2): ReLU(inplace=True)
(3): Conv2d(6, 180, kernel_size=(1, 1), stride=(1, 1))
(4): Sigmoid()
)
)
)
)
(drop_path): DropPath()
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(overlap_attn): OCAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(qkv): Linear(in_features=180, out_features=540, bias=True)
(unfold): Unfold(kernel_size=(24, 24), dilation=1, padding=4, stride=16)
(softmax): Softmax(dim=-1)
(proj): Linear(in_features=180, out_features=180, bias=True)
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(patch_embed): PatchEmbed()
(patch_unembed): PatchUnEmbed()
)
(1-5): 5 x RHAG(
(residual_group): AttenBlocks(
(blocks): ModuleList(
(0-5): 6 x HAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(attn): WindowAttention(
(qkv): Linear(in_features=180, out_features=540, bias=True)
(attn_drop): Dropout(p=0.0, inplace=False)
(proj): Linear(in_features=180, out_features=180, bias=True)
(proj_drop): Dropout(p=0.0, inplace=False)
(softmax): Softmax(dim=-1)
)
(conv_block): CAB(
(cab): Sequential(
(0): Conv2d(180, 60, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): GELU(approximate='none')
(2): Conv2d(60, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): ChannelAttention(
(attention): Sequential(
(0): AdaptiveAvgPool2d(output_size=1)
(1): Conv2d(180, 6, kernel_size=(1, 1), stride=(1, 1))
(2): ReLU(inplace=True)
(3): Conv2d(6, 180, kernel_size=(1, 1), stride=(1, 1))
(4): Sigmoid()
)
)
)
)
(drop_path): DropPath()
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(overlap_attn): OCAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(qkv): Linear(in_features=180, out_features=540, bias=True)
(unfold): Unfold(kernel_size=(24, 24), dilation=1, padding=4, stride=16)
(softmax): Softmax(dim=-1)
(proj): Linear(in_features=180, out_features=180, bias=True)
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(patch_embed): PatchEmbed()
(patch_unembed): PatchUnEmbed()
)
)
(norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(conv_before_upsample): Sequential(
(0): Conv2d(180, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): LeakyReLU(negative_slope=0.01, inplace=True)
)
(upsample): Upsample(
(0): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): PixelShuffle(upscale_factor=2)
(2): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): PixelShuffle(upscale_factor=2)
)
(conv_last): Conv2d(64, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
)
2023-08-25 15:21:17,529 INFO: Loading HAT model from ./experiments/pretrained_models/Real_HAT_GAN_sharper.pth, with param key: [params_ema].
2023-08-25 15:21:17,635 INFO: Model [HATModel] is created.
2023-08-25 15:21:17,635 INFO: Testing custom...
/usr/local/lib/python3.10/site-packages/torch/nn/modules/conv.py:459: UserWarning: Applied workaround for CuDNN issue, install nvrtc.so (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:80.)
return F.conv2d(input, weight, bias, self.stride,
Tile 1/2
Tile 2/2
Prediction done.
input_image
Input image to upscale
![https://files.tungsten.run/uploads/bd7b532984bb4cbdb0035437bc5cb201/tmppgowdctq123.png](https://files.tungsten.run/uploads/bd7b532984bb4cbdb0035437bc5cb201/tmppgowdctq123.png)
![https://files.tungsten.run/uploads/f75cf5fcbd4a422a9b6bb99afc782b86/output.png](https://files.tungsten.run/uploads/f75cf5fcbd4a422a9b6bb99afc782b86/output.png)
Preparing inputs...
Predicting...
/usr/local/lib/python3.10/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
Disable distributed.
2023-08-25 15:21:16,799 INFO:
____ _ _____ ____
/ __ ) ____ _ _____ (_)_____/ ___/ / __ \
/ __ |/ __ `// ___// // ___/\__ \ / /_/ /
/ /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
/_____/ \__,_//____//_/ \___//____//_/ |_|
______ __ __ __ __
/ ____/____ ____ ____/ / / / __ __ _____ / /__ / /
/ / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
/ /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
\____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
Version Information:
BasicSR: 1.3.4.9
PyTorch: 2.0.1+cu118
TorchVision: 0.15.2+cu118
2023-08-25 15:21:16,799 INFO:
name: HAT_GAN_Real_sharper
model_type: HATModel
scale: 4
num_gpu: 1
manual_seed: 0
tile:[
tile_size: 512
tile_pad: 32
]
datasets:[
test_1:[
name: custom
type: SingleImageDataset
dataroot_lq: input_dir
io_backend:[
type: disk
]
phase: test
scale: 4
]
]
network_g:[
type: HAT
upscale: 4
in_chans: 3
img_size: 64
window_size: 16
compress_ratio: 3
squeeze_factor: 30
conv_scale: 0.01
overlap_ratio: 0.5
img_range: 1.0
depths: [6, 6, 6, 6, 6, 6]
embed_dim: 180
num_heads: [6, 6, 6, 6, 6, 6]
mlp_ratio: 2
upsampler: pixelshuffle
resi_connection: 1conv
]
path:[
pretrain_network_g: ./experiments/pretrained_models/Real_HAT_GAN_sharper.pth
strict_load_g: True
param_key_g: params_ema
results_root: /tungsten/results/HAT_GAN_Real_sharper
log: /tungsten/results/HAT_GAN_Real_sharper
visualization: /tungsten/results/HAT_GAN_Real_sharper/visualization
]
val:[
save_img: True
suffix: None
]
dist: False
rank: 0
world_size: 1
auto_resume: False
is_train: False
2023-08-25 15:21:16,799 INFO: Dataset [SingleImageDataset] - custom is built.
2023-08-25 15:21:16,799 INFO: Number of test images in custom: 1
/usr/local/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
2023-08-25 15:21:17,054 INFO: Network [HAT] is created.
2023-08-25 15:21:17,423 INFO: Network: HAT, with parameters: 20,772,507
2023-08-25 15:21:17,424 INFO: HAT(
(conv_first): Conv2d(3, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(patch_embed): PatchEmbed(
(norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
)
(patch_unembed): PatchUnEmbed()
(pos_drop): Dropout(p=0.0, inplace=False)
(layers): ModuleList(
(0): RHAG(
(residual_group): AttenBlocks(
(blocks): ModuleList(
(0): HAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(attn): WindowAttention(
(qkv): Linear(in_features=180, out_features=540, bias=True)
(attn_drop): Dropout(p=0.0, inplace=False)
(proj): Linear(in_features=180, out_features=180, bias=True)
(proj_drop): Dropout(p=0.0, inplace=False)
(softmax): Softmax(dim=-1)
)
(conv_block): CAB(
(cab): Sequential(
(0): Conv2d(180, 60, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): GELU(approximate='none')
(2): Conv2d(60, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): ChannelAttention(
(attention): Sequential(
(0): AdaptiveAvgPool2d(output_size=1)
(1): Conv2d(180, 6, kernel_size=(1, 1), stride=(1, 1))
(2): ReLU(inplace=True)
(3): Conv2d(6, 180, kernel_size=(1, 1), stride=(1, 1))
(4): Sigmoid()
)
)
)
)
(drop_path): Identity()
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
(1-5): 5 x HAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(attn): WindowAttention(
(qkv): Linear(in_features=180, out_features=540, bias=True)
(attn_drop): Dropout(p=0.0, inplace=False)
(proj): Linear(in_features=180, out_features=180, bias=True)
(proj_drop): Dropout(p=0.0, inplace=False)
(softmax): Softmax(dim=-1)
)
(conv_block): CAB(
(cab): Sequential(
(0): Conv2d(180, 60, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): GELU(approximate='none')
(2): Conv2d(60, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): ChannelAttention(
(attention): Sequential(
(0): AdaptiveAvgPool2d(output_size=1)
(1): Conv2d(180, 6, kernel_size=(1, 1), stride=(1, 1))
(2): ReLU(inplace=True)
(3): Conv2d(6, 180, kernel_size=(1, 1), stride=(1, 1))
(4): Sigmoid()
)
)
)
)
(drop_path): DropPath()
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(overlap_attn): OCAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(qkv): Linear(in_features=180, out_features=540, bias=True)
(unfold): Unfold(kernel_size=(24, 24), dilation=1, padding=4, stride=16)
(softmax): Softmax(dim=-1)
(proj): Linear(in_features=180, out_features=180, bias=True)
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(patch_embed): PatchEmbed()
(patch_unembed): PatchUnEmbed()
)
(1-5): 5 x RHAG(
(residual_group): AttenBlocks(
(blocks): ModuleList(
(0-5): 6 x HAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(attn): WindowAttention(
(qkv): Linear(in_features=180, out_features=540, bias=True)
(attn_drop): Dropout(p=0.0, inplace=False)
(proj): Linear(in_features=180, out_features=180, bias=True)
(proj_drop): Dropout(p=0.0, inplace=False)
(softmax): Softmax(dim=-1)
)
(conv_block): CAB(
(cab): Sequential(
(0): Conv2d(180, 60, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): GELU(approximate='none')
(2): Conv2d(60, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): ChannelAttention(
(attention): Sequential(
(0): AdaptiveAvgPool2d(output_size=1)
(1): Conv2d(180, 6, kernel_size=(1, 1), stride=(1, 1))
(2): ReLU(inplace=True)
(3): Conv2d(6, 180, kernel_size=(1, 1), stride=(1, 1))
(4): Sigmoid()
)
)
)
)
(drop_path): DropPath()
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(overlap_attn): OCAB(
(norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(qkv): Linear(in_features=180, out_features=540, bias=True)
(unfold): Unfold(kernel_size=(24, 24), dilation=1, padding=4, stride=16)
(softmax): Softmax(dim=-1)
(proj): Linear(in_features=180, out_features=180, bias=True)
(norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): Linear(in_features=180, out_features=360, bias=True)
(act): GELU(approximate='none')
(fc2): Linear(in_features=360, out_features=180, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(patch_embed): PatchEmbed()
(patch_unembed): PatchUnEmbed()
)
)
(norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
(conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(conv_before_upsample): Sequential(
(0): Conv2d(180, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): LeakyReLU(negative_slope=0.01, inplace=True)
)
(upsample): Upsample(
(0): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): PixelShuffle(upscale_factor=2)
(2): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(3): PixelShuffle(upscale_factor=2)
)
(conv_last): Conv2d(64, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
)
2023-08-25 15:21:17,529 INFO: Loading HAT model from ./experiments/pretrained_models/Real_HAT_GAN_sharper.pth, with param key: [params_ema].
2023-08-25 15:21:17,635 INFO: Model [HATModel] is created.
2023-08-25 15:21:17,635 INFO: Testing custom...
/usr/local/lib/python3.10/site-packages/torch/nn/modules/conv.py:459: UserWarning: Applied workaround for CuDNN issue, install nvrtc.so (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:80.)
return F.conv2d(input, weight, bias, self.stride,
Tile 1/2
Tile 2/2
Prediction done.