From ee7c20a03fc98f72183cf4571ad6f5a9a6f07031 Mon Sep 17 00:00:00 2001 From: Jianyuan Wang <37647961+jytime@users.noreply.github.com> Date: Wed, 19 Mar 2025 01:35:29 +0000 Subject: [PATCH] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 087deef..e302212 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,10 @@ model = VGGT.from_pretrained("facebook/VGGT-1B").to(device) image_names = ["path/to/imageA.png", "path/to/imageB.png", "path/to/imageC.png"] images = load_and_preprocess_images(image_names).to(device) -with torch.no_grad() and torch.cuda.amp.autocast(dtype=dtype): - # Predict attributes including cameras, depth maps, and point maps. - predictions = model(images) +with torch.no_grad(): + with torch.cuda.amp.autocast(dtype=dtype): + # Predict attributes including cameras, depth maps, and point maps. + predictions = model(images) ``` The model weights will be automatically downloaded from Hugging Face. If you encounter issues such as slow loading, you can manually download them [here](https://huggingface.co/facebook/VGGT-1B/blob/main/model.pt) and load, or: