Skip to content

Fix coordinate equality device mismatch#1175

Merged
frodre merged 4 commits into
mainfrom
workshop
Jun 9, 2026
Merged

Fix coordinate equality device mismatch#1175
frodre merged 4 commits into
mainfrom
workshop

Conversation

@frodre

@frodre frodre commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Running the latest main with our published HiRO ckpt revealed that CheckpointModelConfig with provided fine coordinates path crashed with mismatched devices for the LatLonCoordinates.__eq__ check, which is enforced during building (prior to device coercing in the DiffusionModel.__init__).

This is a specific case of a model checkpoint with an intermediate old style format that can no longer be created. However, I felt that the equality shouldn't be what fails since the equality is a value check.

Comment thread fme/downscaling/models.py
)
elif fine_coordinates_path is not None:
return load_coords_from_path(fine_coordinates_path)
return load_coords_from_path(fine_coordinates_path).to(get_device())

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make consistent with the other coordinate loading pathway.

@frodre frodre marked this pull request as ready for review June 9, 2026 18:08

@mcgibbon mcgibbon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@frodre frodre enabled auto-merge (squash) June 9, 2026 18:14
@frodre frodre merged commit 5507f09 into main Jun 9, 2026
7 checks passed
@frodre frodre deleted the workshop branch June 9, 2026 18:22
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.

2 participants