{
  "id": "ANIME-NHWC-2026-09-07",
  "reviewedAt": "2026-09-07T05:45:10.630Z",
  "model": {
    "modelBytes": 4232723,
    "modelSha256": "95ba7b219073fd5b12f569bc38056ffd3019cf4caf15b1feb9f73d1286c9f69d",
    "inputs": [
      {
        "name": "AnimeGANv3_input:0",
        "elementType": 1,
        "dims": [
          1,
          "unk__1822",
          "unk__1823",
          3
        ]
      }
    ],
    "outputs": [
      {
        "name": "generator_1/main/out_layer:0",
        "elementType": 1,
        "dims": [
          "unk__1824",
          "unk__1825",
          "unk__1826",
          3
        ]
      }
    ],
    "nodeCount": 405,
    "boundaryNodes": [
      {
        "index": 0,
        "opType": "Pad",
        "inputs": [
          "AnimeGANv3_input:0"
        ],
        "outputs": [
          "generator_1/base/MirrorPad:0"
        ],
        "attributes": {
          "mode": "reflect",
          "pads": [
            0,
            3,
            3,
            0,
            0,
            3,
            3,
            0
          ]
        },
        "rawNodeProtobufHex": "0a12416e696d6547414e76335f696e7075743a30121c67656e657261746f725f312f626173652f4d6972726f725061643a301a1a67656e657261746f725f312f626173652f4d6972726f7250616422035061642a120a046d6f646522077265666c656374a001032a190a047061647340004003400340004000400340034000a00107"
      },
      {
        "index": 1,
        "opType": "Transpose",
        "inputs": [
          "generator_1/base/MirrorPad:0"
        ],
        "outputs": [
          "generator_1/base/Conv/Conv2D__8:0"
        ],
        "attributes": {
          "perm": [
            0,
            3,
            1,
            2
          ]
        },
        "rawNodeProtobufHex": "0a1c67656e657261746f725f312f626173652f4d6972726f725061643a30122167656e657261746f725f312f626173652f436f6e762f436f6e7632445f5f383a301a1f67656e657261746f725f312f626173652f436f6e762f436f6e7632445f5f3822095472616e73706f73652a110a047065726d4000400340014002a00107"
      },
      {
        "index": 403,
        "opType": "Tanh",
        "inputs": [
          "generator_1/main/Conv_12/Conv2D:0"
        ],
        "outputs": [
          "generator_1/main/out_layer_raw_output___4:0"
        ],
        "attributes": {},
        "rawNodeProtobufHex": "0a2167656e657261746f725f312f6d61696e2f436f6e765f31322f436f6e7632443a30122b67656e657261746f725f312f6d61696e2f6f75745f6c617965725f7261775f6f75747075745f5f5f343a301a1a67656e657261746f725f312f6d61696e2f6f75745f6c61796572220454616e683a00"
      },
      {
        "index": 404,
        "opType": "Transpose",
        "inputs": [
          "generator_1/main/out_layer_raw_output___4:0"
        ],
        "outputs": [
          "generator_1/main/out_layer:0"
        ],
        "attributes": {
          "perm": [
            0,
            2,
            3,
            1
          ]
        },
        "rawNodeProtobufHex": "0a2b67656e657261746f725f312f6d61696e2f6f75745f6c617965725f7261775f6f75747075745f5f5f343a30121c67656e657261746f725f312f6d61696e2f6f75745f6c617965723a301a2467656e657261746f725f312f6d61696e2f436f6e765f31322f436f6e7632445f5f34353822095472616e73706f73652a110a047065726d4000400240034001a00107"
      }
    ]
  },
  "clientAsset": "index-8fb6f7e2.js",
  "originalClientSha256": "f0e3f5310aeaf1d0ccae6ec92a2ffcd607fbfadf03514ccde9bf1b72fdd318bd",
  "layoutOnlyPatchedClientSha256": "d8bd9f78d4c14bef6cc3e5b3c77c63da5faaaf79bb4267b032edd2019f7f5b56",
  "diagnosis": {
    "input": "The recovered prepare function grouped R, G and B into channel planes but declared [1, height, width, 3]; the pinned model expects interleaved NHWC RGB.",
    "output": "The recovered reader used (channel * height + y) * width + x against an output whose final model Transpose returns NHWC. Correct offset is (y * width + x) * 3 + channel.",
    "modelEvidence": "Input/output metadata plus leading NHWC padding, [0,3,1,2] internal transpose and [0,2,3,1] final transpose."
  },
  "correction": "Preserve interleaved RGB on input and read it directly on output. Normalize 0..255 to -1..1 and back, output opaque alpha, and respect the typed-array view offset.",
  "retained": [
    "Model file and weights",
    "Default long edge 1536 px",
    "HD long edge 2560 px",
    "Existing multiples-of-eight rounding",
    "Worker execution and message names",
    "Historic outputs retained as pre-fix evidence"
  ],
  "fixture": {
    "width": 2,
    "height": 2,
    "inputRgba": [
      255,
      0,
      0,
      0,
      0,
      255,
      0,
      255,
      0,
      0,
      255,
      17,
      255,
      255,
      0,
      180
    ],
    "expectedNhwc": [
      1,
      -1,
      -1,
      -1,
      1,
      -1,
      -1,
      -1,
      1,
      1,
      1,
      -1
    ],
    "legacyPrepared": [
      1,
      -1,
      -1,
      1,
      -1,
      1,
      -1,
      1,
      -1,
      -1,
      1,
      -1
    ],
    "expectedOutputRgba": [
      255,
      0,
      0,
      255,
      0,
      255,
      0,
      255,
      0,
      0,
      255,
      255,
      255,
      255,
      0,
      255
    ],
    "legacyDecoded": [
      255,
      255,
      255,
      255,
      0,
      0,
      255,
      255,
      0,
      0,
      255,
      255,
      0,
      0,
      0,
      255
    ],
    "correctedDecoded": [
      255,
      0,
      0,
      255,
      0,
      255,
      0,
      255,
      0,
      0,
      255,
      255,
      255,
      255,
      0,
      255
    ]
  },
  "browserValidation": "Not performed by this source-level test. Fresh browser inference outputs must be recorded separately after integration. Existing outputs must not be relabelled as corrected runs.",
  "inspectCommand": "node inspect-model-layout.mjs /path/to/animeganv3_hayao_36.onnx"
}
