Replies: 1 comment
-
To use TorchMetrics’ LPIPS offline with a local model path, you can create the LPIPS similarity network by passing the from torchmetrics.image.lpips import _LPIPS, PerceptualPathLength
# Create LPIPS similarity network with local weights file
local_net = _LPIPS(net="alex", model_path="local/path/to/lpips_weights.pth")
# Use the local LPIPS network in PerceptualPathLength metric
ppl_metric = PerceptualPathLength(sim_net=local_net)
# Now you can use ppl_metric in your workflow without internet access
# ... With this setup, you can freely specify any local path to your pre-downloaded model weights, making it easy to run LPIPS-based metrics offline on Slurm or other clusters. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, since I am using this on a slurm cluster and once the job is submitted to slurm, it has not access to the internet. So I would like to know I can download the models for lpips in advance and set the model path of it? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions