Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HFValidationError #6

Open
gebaltso opened this issue Nov 8, 2024 · 1 comment
Open

HFValidationError #6

gebaltso opened this issue Nov 8, 2024 · 1 comment

Comments

@gebaltso
Copy link

gebaltso commented Nov 8, 2024

Hello! I downloaded v2-1_512-ema-pruned.ckpt and changed the Line106 of train.py with the corresponding path. However I get

Traceback (most recent call last):
  File "train.py", line 767, in <module>
    main(args)
  File "train.py", line 423, in main
    tokenizer = AutoTokenizer.from_pretrained(
  File ".../conda_envs/IDEGAN/lib/python3.8/site-packages/transformers/models/auto/tokenization_auto.py", line 686, in from_pretrained
    tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
  File ".../conda_envs/IDEGAN/lib/python3.8/site-packages/transformers/models/auto/tokenization_auto.py", line 519, in get_tokenizer_config
    resolved_config_file = cached_file(
  File ".../conda_envs/IDEGAN/lib/python3.8/site-packages/transformers/utils/hub.py", line 429, in cached_file
    resolved_file = hf_hub_download(
  File ".../conda_envs/IDEGAN/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 111, in _inner_fn
    validate_repo_id(arg_value)
  File ".../conda_envs/IDEGAN/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 159, in validate_repo_id
    raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/mnt/cephfs/home/gebaltso/home/gebaltso/SD2ch/2'. Use `repo_type` argument if needed.

Any idea what I can do?

@qinghew
Copy link
Owner

qinghew commented Nov 8, 2024

Stable diffusion provides a folder-version way and a ckpt-version way for loading their model.

for example, the folder-version way:
vae = AutoencoderKL.from_pretrained("stabilityai/stable-diffusion-2-1-base", subfolder="vae")
tokenizer = CLIPTokenizer.from_pretrained("openai/clip-xxx")
text_encoder = CLIPTextModel.from_pretrained("openai/clip-xxx")
unet = UNet2DConditionModel.from_pretrained("stabilityai/stable-diffusion-2-1-base", subfolder="unet")

the ckpt-version way:
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1-base")

our codes are based on the folder-version way. you could try to change to the ckpt-version way or download the folders in https://huggingface.co/stabilityai/stable-diffusion-2-1-base/tree/main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants