akhaliq HF Staff commited on
Commit
e280219
·
verified ·
1 Parent(s): 84c2cf1

Document the canonical loader

Browse files
Files changed (1) hide show
  1. README.md +6 -4
README.md CHANGED
@@ -22,9 +22,11 @@ from a single photo or a whole video, sharp at object edges and steady from fram
22
  Uses the **DepthPro2-H** weights (872M parameters) with the focal length taken from the photo's
23
  EXIF when present.
24
 
25
- The app follows the model card's quick start: `DepthPro2.from_pretrained(...).to("cuda")`,
26
- `model.infer(...)` for images and `model.infer_video(...)` over frames decoded with PyAV.
27
- It is written for ZeroGPU (`@spaces.GPU`-decorated functions, weights moved to CUDA inside the
28
- call); on plain CPU hardware it still runs, just slowly.
 
 
29
 
30
  <div style="display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 2em"><a href="https://hf.co/chat?mode=ml-intern"><img src="https://hf.co/datasets/huggingface/badges/resolve/main/built-with-ml-intern-lg.svg" alt="Built with ML Intern" style="margin:0"></a><a href="https://hf.co/chat?mode=ml-intern&prompt=Add%20a%20live-camera%20tab%20to%20akhaliq%2FDepthPro2" style="display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border:1.5px solid #eee;border-radius:16px;background:#f9fbfc;color:#c2410c;font-weight:600;font-size:14px;text-decoration:none">Add a live-camera tab ›</a><a href="https://hf.co/chat?mode=ml-intern&prompt=Switch%20akhaliq%2FDepthPro2%20to%20DepthPro2-L%20weights%20for%20faster%20inference" style="display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border:1.5px solid #eee;border-radius:16px;background:#f9fbfc;color:#c2410c;font-weight:600;font-size:14px;text-decoration:none">Swap in the L weights ›</a></div>
 
22
  Uses the **DepthPro2-H** weights (872M parameters) with the focal length taken from the photo's
23
  EXIF when present.
24
 
25
+ The app follows the model card's quick start: weights created with
26
+ `create_model_and_transforms(..., precision=torch.bfloat16)`, `model.infer(...)` for images and
27
+ `model.infer_video(...)` over frames decoded with PyAV. The focal length comes from the photo's
28
+ EXIF when present, otherwise the bundled focal estimator estimates it. The app is written for
29
+ ZeroGPU (`@spaces.GPU`-decorated functions, weights moved to CUDA inside the call); on plain CPU
30
+ hardware it still runs, just slowly.
31
 
32
  <div style="display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 2em"><a href="https://hf.co/chat?mode=ml-intern"><img src="https://hf.co/datasets/huggingface/badges/resolve/main/built-with-ml-intern-lg.svg" alt="Built with ML Intern" style="margin:0"></a><a href="https://hf.co/chat?mode=ml-intern&prompt=Add%20a%20live-camera%20tab%20to%20akhaliq%2FDepthPro2" style="display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border:1.5px solid #eee;border-radius:16px;background:#f9fbfc;color:#c2410c;font-weight:600;font-size:14px;text-decoration:none">Add a live-camera tab ›</a><a href="https://hf.co/chat?mode=ml-intern&prompt=Switch%20akhaliq%2FDepthPro2%20to%20DepthPro2-L%20weights%20for%20faster%20inference" style="display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border:1.5px solid #eee;border-radius:16px;background:#f9fbfc;color:#c2410c;font-weight:600;font-size:14px;text-decoration:none">Swap in the L weights ›</a></div>