Hostname validation error on attempt to load custom LoRA by specifying Hugging Face path

#20
by ikolomiets - opened

This error started a few days ago and prevents from loading custom LoRA from HF. Here's a stack trace from the logs:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 625, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2104, in process_api
    inputs = await self.preprocess_data(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1787, in preprocess_data
    inputs_cached = await processing_utils.async_move_files_to_cache(
  File "/usr/local/lib/python3.10/site-packages/gradio/processing_utils.py", line 648, in async_move_files_to_cache
    return await client_utils.async_traverse(
  File "/usr/local/lib/python3.10/site-packages/gradio_client/utils.py", line 1133, in async_traverse
    new_obj.append(await async_traverse(item, func, is_root))
  File "/usr/local/lib/python3.10/site-packages/gradio_client/utils.py", line 1128, in async_traverse
    new_obj[key] = await async_traverse(value, func, is_root)
  File "/usr/local/lib/python3.10/site-packages/gradio_client/utils.py", line 1124, in async_traverse
    return await func(json_obj)
  File "/usr/local/lib/python3.10/site-packages/gradio/processing_utils.py", line 621, in _move_to_cache
    temp_file_path = await block.async_move_resource_to_block_cache(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 305, in async_move_resource_to_block_cache
    temp_file_path = await processing_utils.async_ssrf_protected_download(
  File "/usr/local/lib/python3.10/site-packages/gradio/processing_utils.py", line 354, in async_ssrf_protected_download
    response = await sh.get(
  File "/usr/local/lib/python3.10/site-packages/safehttpx/__init__.py", line 128, in get
    verified_ip = await async_validate_url(hostname)
  File "/usr/local/lib/python3.10/site-packages/safehttpx/__init__.py", line 80, in async_validate_url
    raise ValueError(f"Hostname {hostname} failed validation")
ValueError: Hostname cas-bridge-direct.xethub.hf.co failed validation

Thanks for the report! I'd forgotten to deal with this.πŸ˜…
https://huggingface.co/blog/xet-on-the-hub

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

Sign up or log in to comment