Closed iffthomas closed 1 month ago
Hi,
If you run locally, you can find out where the models are downloaded to using torch.hub.get_dir()
, see here. You can upload that folder to the server and set this location when you init the perceptual loss using the cache_dir
argument, which will call torch.hub.set_dir()
for you. If it finds the models in the hub it shouldn't try to download them from the web.
Hi Monai team,
Currently I'm trying out Image Synthesis inspired by a Tutorial: (https://github.com/Project-MONAI/GenerativeModels/tree/main/tutorials/generative/2d_vqgan)
As I've only got a laptop I mainly use clusters to have access to a GPU. This poses a slight problem as I don't have permission to connect to the web and can't load models that are in torch.hub. This a requirement for some tutorials/models that need pretrained weights such as PerceptualLoss(spatial_dims=2, pretrained = False, network_type=None)which inherently comes from other github repositories. I've wanted to ask if there exists a possibility to have a workaround for pretrained weights. Setting pretrained = False still tries to connect to the web and hence it fails to run this notbook.