Skip to content

Add GigaPath-Flash and repair HIPT downloads - #17

Merged
CraigMyles merged 2 commits into
mainfrom
feature/gigapath-flash
Jul 23, 2026
Merged

Add GigaPath-Flash and repair HIPT downloads#17
CraigMyles merged 2 commits into
mainfrom
feature/gigapath-flash

Conversation

@CraigMyles

@CraigMyles CraigMyles commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add gigapath_flash, the pinned 384-dimensional tile encoder, and
    gigapath_flash_slide, its matched 384-dimensional LongNet slide encoder.
  • Record the exact weight revisions and SHA-256 digests, preprocessing, constructor,
    and pinned upstream loader commit in output fingerprints.
  • Make both GigaPath variants default to the released whole-slide contract:
    non-overlapping 256-pixel tiles on a 256-pixel lattice, with each tile centre-cropped
    to the encoder's 224-pixel input. Pass stored level-0 coordinates unchanged and set
    LongNet's runtime positional divisor to each tile's level-0 extent, normalizing
    raw2features' coordinate units into the tile-index frame of upstream's default
    256-pixel tiling.
  • Existing original-GigaPath grids remain readable. The corrected default uses a
    distinct 256-pixel geometry key rather than aliasing an older 224-pixel grid.
  • Repoint HIPT to Mahmood Lab's official commit-pinned Git LFS checkpoint. The checkpoint
    bytes and SHA-256 are unchanged; its licence is now recorded as Apache-2.0 with the
    Commons Clause.
  • Update the model tables, installation notes, tests, and v0.2.0 changelog.

Validation

  • ruff check src tests
  • pytest -m "not slow and not network" -q: 738 passed, 10 skipped, 108 deselected
  • Live revision and checksum-metadata checks for both GigaPath-Flash weights, plus the
    official HIPT Git LFS pointer: 4 passed
  • Built the wheel and verified the new slide-encoder entry point is packaged
  • GPU-validated on the DGX Spark's NVIDIA GB10 with PyTorch 2.12.0+cu130 and
    flash-attn 2.8.3.post1:
    • GigaPath-Flash tile: finite 384-dimensional outputs from the pinned weights
    • GigaPath-Flash slide: finite 384-dimensional output from the pinned LongNet weights
    • GigaPath-Flash and original GigaPath slide encoders: equivalent 20×-frame
      (runtime divisor 256) and 40×-frame (runtime divisor 512) coordinates produced
      identical positional indices and byte-identical real-weight outputs
    • Matched path: 16 transformed tiles produced (16, 384) features and a finite
      (384,) slide vector
    • HIPT: official checkpoint downloaded, SHA-verified before loading, and produced
      finite 384-dimensional outputs
    • Original GigaPath: revalidated with finite 1536-dimensional tile and
      768-dimensional slide outputs

This contributes to v0.2.0. It does not tag or publish the release.

@CraigMyles
CraigMyles marked this pull request as ready for review July 23, 2026 13:36
@CraigMyles
CraigMyles merged commit e9c1e99 into main Jul 23, 2026
8 checks passed
@CraigMyles
CraigMyles deleted the feature/gigapath-flash branch July 23, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant