Repository navigation
fix(cli): run apply-inv-tf on the config's device - #595
Merged
Merged
Conversation
apply_inverse_transfer_function_single_position never passed settings.device to the phase and fluorescence models, so apply-inv-tf and reconstruct ran them on the CPU whatever the config said, Richardson-Lucy included. Pass it through; the birefringence models take no device and stay on the CPU.
talonchandler
approved these changes
Nov 10, 2026
srivarra
added a commit
to Biohub/biahub
that referenced
this pull request
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Needed for Biohub/biahub#462, which runs Richardson-Lucy deconvolution in biahub's mantis-v2 reconstruct step.
Summary
apply-inv-tfandreconstructignore the config'sdevice.apply_inverse_transfer_function_single_positioncalls the phase and fluorescence models without it, so they run on the CPU whatever the config says. A Richardson-Lucy config withdevice: cudaallocated no GPU memory on an A40.This passes
settings.deviceto the phase and fluorescence models. The birefringence models take no device and still run on the CPU.Testing
gputesttest_apply_inv_tf_runs_on_the_config_device, for phase and for fluorescence with RL. Withdevice: cudathe reconstruction allocates GPU memory and matches the CPU result.Checklist