huggingface / huggingface/controlnet_aux
UserWarning: Mapping deprecated model name....
- Dominant language
- Python
- Stars
- 497
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
following the [usage page](https://github.com/patrickvonplaten/controlnet_aux#usage) and info, I just want to run the midas depth preprocessor. when running I get this following error:
```
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
C:\Software\txt2img\ControlNet\venv\lib\site-packages\timm\models\_factory.py:114: UserWarning: Mapping deprecated model name vit_base_resnet50_384 to current vit_base_r50_s16_384.orig_in21k_ft_in1k.
model = create_fn(
```
I understand the Triton error is there because I am running this via Windows and Triton is a linux only package. so it can be ignored as I understand it. I included it for the sake of repeatability. but for the warning:
```
C:\Software\txt2img\ControlNet\venv\lib\site-packages\timm\models\_factory.py:114: UserWarning: Mapping deprecated model name vit_base_resnet50_384 to current vit_base_r50_s16_384.orig_in21k_ft_in1k.
model = create_fn(
```
is there anything I can do to remove the message? here is my current code:
```
from PIL import Image
import requests
from io import BytesIO
from controlnet_aux import MidasDetector
# load image
url = "https://huggingface.co/lllyasviel/sd-controlnet-depth/resolve/main/images/stormtrooper.png"
response = requests.get(url)
img = Image.open(BytesIO(response.content)).convert("RGB").resize((512, 512))
# load model
midas = MidasDetector.from_pretrained("lllyasviel/Annotators")
# instantiate
# ...is this required?
# process
processed_image_midas = midas(img)
# save
processed_image_midas.save('processed_image_midas.png')
```
the above code still outputs the expected midas image results. I was just hoping to ensure I had everything correct.
thank you for your time!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.