geetu040 commited on
Commit
34b4301
·
verified ·
1 Parent(s): de816c8

Update Model Card: Use `DepthProImageProcessor` instead of `DepthProImageProcessorFast`

Browse files

With `transformers v5`, the `Fast` image processor variants are no longer exposed through separate prefixes. As a result, `DepthProImageProcessorFast` is now used by default when calling `DepthProImageProcessor`.

This PR updates the documentation to reflect the new behavior.

Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -66,14 +66,14 @@ Use the code below to get started with the model.
66
  import requests
67
  from PIL import Image
68
  import torch
69
- from transformers import DepthProImageProcessorFast, DepthProForDepthEstimation
70
 
71
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
72
 
73
  url = 'https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg'
74
  image = Image.open(requests.get(url, stream=True).raw)
75
 
76
- image_processor = DepthProImageProcessorFast.from_pretrained("apple/DepthPro-hf")
77
  model = DepthProForDepthEstimation.from_pretrained("apple/DepthPro-hf").to(device)
78
 
79
  inputs = image_processor(images=image, return_tensors="pt").to(device)
 
66
  import requests
67
  from PIL import Image
68
  import torch
69
+ from transformers import DepthProImageProcessor, DepthProForDepthEstimation
70
 
71
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
72
 
73
  url = 'https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg'
74
  image = Image.open(requests.get(url, stream=True).raw)
75
 
76
+ image_processor = DepthProImageProcessor.from_pretrained("apple/DepthPro-hf")
77
  model = DepthProForDepthEstimation.from_pretrained("apple/DepthPro-hf").to(device)
78
 
79
  inputs = image_processor(images=image, return_tensors="pt").to(device)