Error

#1
by DeathDaDev - opened

The code has an error when running

predictor = torch.hub.load("hugoycj/StableNormal", "StableNormal_turbo", trust_repo=True, yoso_version='yoso-normal-v1-8-1')

Error:

huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'Stable-X\yoso-normal-v1-8-1'.

@DeathDaDev Hi, we found a related issue https://github.com/huggingface/diffusers/issues/736. It seems the error is caused by the version of huggingface_hub or diffusers. Would you mind to try diffusers==0.28.0 and huggingface-hub==0.23.0

There is also this related issue, however it was unresolved since last year: https://github.com/Stable-X/StableNormal/issues/20
I changed diffusers and huggingface-hub to the versions you said, however the stablenormal project says that it needs huggingface-hub>=0.23.2. I did that and still got the same error

ImportError: huggingface-hub>=0.23.2,<1.0 is required for a normal functioning of this module, but found huggingface-hub==0.23.0.

@Stable-X Sorry, but how do I fix this?

This isn't related to the issue linked.
In your code, you do yoso_weight_path = os.path.join(local_cache_dir if local_cache_dir else "Stable-X", yoso_version)
On windows, this will put an \ in the path, which lead to the invalid char.
You should instead use posixpath.join which will put the expected / on both windows/linux

In the mean time @DeathDaDev , you can change the hubconf.py in local in your cache to avoid the issue (but this is kind of a hack :) )

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment