Spaces:
Sleeping
Sleeping
File size: 7,556 Bytes
95b1715 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
import torch
STYLEGAN2_ADA_CONV_WEIGHT_WITHOUT_BIAS_SHAPES = {
"b4.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 0},
"b4.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 1},
"b8.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 2},
"b8.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 3},
"b8.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 3},
"b16.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 4},
"b16.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 5},
"b16.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 5},
"b32.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 6},
"b32.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 7},
"b32.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 7},
"b64.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 8},
"b64.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 9},
"b64.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 9},
"b128.conv0.weight": {"shape": torch.Size([256, 512, 3, 3]), "w_idx": 10},
"b128.conv1.weight": {"shape": torch.Size([256, 256, 3, 3]), "w_idx": 11},
"b128.torgb.weight": {"shape": torch.Size([3, 256, 1, 1]), "w_idx": 11},
"b256.conv0.weight": {"shape": torch.Size([128, 256, 3, 3]), "w_idx": 12},
"b256.conv1.weight": {"shape": torch.Size([128, 128, 3, 3]), "w_idx": 13},
"b256.torgb.weight": {"shape": torch.Size([3, 128, 1, 1]), "w_idx": 13},
"b512.conv0.weight": {"shape": torch.Size([64, 128, 3, 3]), "w_idx": 14},
"b512.conv1.weight": {"shape": torch.Size([64, 64, 3, 3]), "w_idx": 15},
"b512.torgb.weight": {"shape": torch.Size([3, 64, 1, 1]), "w_idx": 15},
"b1024.conv0.weight": {"shape": torch.Size([32, 64, 3, 3]), "w_idx": 16},
"b1024.conv1.weight": {"shape": torch.Size([32, 32, 3, 3]), "w_idx": 17},
"b1024.torgb.weight": {"shape": torch.Size([3, 32, 1, 1]), "w_idx": 17},
}
STYLEGAN2_ADA_CONV_WEIGHT_WITHOUT_BIAS_WITHOUT_TO_RGB_SHAPES = {
"b4.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 0},
"b8.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 2},
"b8.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 3},
"b16.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 4},
"b16.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 5},
"b32.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 6},
"b32.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 7},
"b64.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 8},
"b64.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 9},
"b128.conv0.weight": {"shape": torch.Size([256, 512, 3, 3]), "w_idx": 10},
"b128.conv1.weight": {"shape": torch.Size([256, 256, 3, 3]), "w_idx": 11},
"b256.conv0.weight": {"shape": torch.Size([128, 256, 3, 3]), "w_idx": 12},
"b256.conv1.weight": {"shape": torch.Size([128, 128, 3, 3]), "w_idx": 13},
"b512.conv0.weight": {"shape": torch.Size([64, 128, 3, 3]), "w_idx": 14},
"b512.conv1.weight": {"shape": torch.Size([64, 64, 3, 3]), "w_idx": 15},
"b1024.conv0.weight": {"shape": torch.Size([32, 64, 3, 3]), "w_idx": 16},
"b1024.conv1.weight": {"shape": torch.Size([32, 32, 3, 3]), "w_idx": 17},
}
STYLEGAN2_ADA_ALL_WEIGHT_WITHOUT_BIAS_SHAPES = {
"b4.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 0},
"b4.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 1},
"b8.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 2},
"b8.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 3},
"b8.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 3},
"b16.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 4},
"b16.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 5},
"b16.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 5},
"b32.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 6},
"b32.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 7},
"b32.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 7},
"b64.conv0.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 8},
"b64.conv1.weight": {"shape": torch.Size([512, 512, 3, 3]), "w_idx": 9},
"b64.torgb.weight": {"shape": torch.Size([3, 512, 1, 1]), "w_idx": 9},
"b128.conv0.weight": {"shape": torch.Size([256, 512, 3, 3]), "w_idx": 10},
"b128.conv1.weight": {"shape": torch.Size([256, 256, 3, 3]), "w_idx": 11},
"b128.torgb.weight": {"shape": torch.Size([3, 256, 1, 1]), "w_idx": 11},
"b256.conv0.weight": {"shape": torch.Size([128, 256, 3, 3]), "w_idx": 12},
"b256.conv1.weight": {"shape": torch.Size([128, 128, 3, 3]), "w_idx": 13},
"b256.torgb.weight": {"shape": torch.Size([3, 128, 1, 1]), "w_idx": 13},
"b512.conv0.weight": {"shape": torch.Size([64, 128, 3, 3]), "w_idx": 14},
"b512.conv1.weight": {"shape": torch.Size([64, 64, 3, 3]), "w_idx": 15},
"b512.torgb.weight": {"shape": torch.Size([3, 64, 1, 1]), "w_idx": 15},
"b1024.conv0.weight": {"shape": torch.Size([32, 64, 3, 3]), "w_idx": 16},
"b1024.conv1.weight": {"shape": torch.Size([32, 32, 3, 3]), "w_idx": 17},
"b1024.torgb.weight": {"shape": torch.Size([3, 32, 1, 1]), "w_idx": 17},
# affine
"b4.conv1.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 0},
"b4.torgb.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 1},
"b8.conv0.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 2},
"b8.conv1.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 3},
"b8.torgb.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 3},
"b16.conv0.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 4},
"b16.conv1.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 5},
"b16.torgb.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 5},
"b32.conv0.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 6},
"b32.conv1.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 7},
"b32.torgb.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 7},
"b64.conv0.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 8},
"b64.conv1.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 9},
"b64.torgb.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 9},
"b128.conv0.affine.weight": {"shape": torch.Size([512, 512]), "w_idx": 10},
"b128.conv1.affine.weight": {"shape": torch.Size([256, 512]), "w_idx": 11},
"b128.torgb.affine.weight": {"shape": torch.Size([256, 512]), "w_idx": 11},
"b256.conv0.affine.weight": {"shape": torch.Size([256, 512]), "w_idx": 12},
"b256.conv1.affine.weight": {"shape": torch.Size([128, 512]), "w_idx": 13},
"b256.torgb.affine.weight": {"shape": torch.Size([128, 512]), "w_idx": 13},
"b512.conv0.affine.weight": {"shape": torch.Size([128, 512]), "w_idx": 14},
"b512.conv1.affine.weight": {"shape": torch.Size([64, 512]), "w_idx": 15},
"b512.torgb.affine.weight": {"shape": torch.Size([64, 512]), "w_idx": 15},
"b1024.conv0.affine.weight": {"shape": torch.Size([64, 512]), "w_idx": 16},
"b1024.conv1.affine.weight": {"shape": torch.Size([32, 512]), "w_idx": 17},
"b1024.torgb.affine.weight": {"shape": torch.Size([32, 512]), "w_idx": 17},
}
|