Returns error on generation

#2
by jujutechnology - opened

I tried to run the demo here and it returns an error. This is if the lora is blank or contains the example file.
错误发生: 视频生成失败(代码 1):
Trying to import sageattention
Successfully imported sageattention
WARNING:bitsandbytes.cextension:The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
INFO:main:Using device: cpu, DiT precision: torch.bfloat16, weight precision: torch.float8_e4m3fn
INFO:main:Encoding prompt: "Unreal 5 render of a handsome man img. warm atmosphere, at home, bedroom."
INFO:main:loading text encoder: ckpts/text_encoder
INFO:hunyuan_model.text_encoder:Loading text encoder model (llm) from: ckpts/text_encoder
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 406, in hf_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/ckpts/text_encoder/resolve/main/config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/transformers/utils/hub.py", line 403, in cached_file
resolved_file = hf_hub_download(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 862, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 969, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1484, in _raise_on_head_call_error
raise head_call_error
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1376, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1296, in get_hf_file_metadata
r = _request_wrapper(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 277, in _request_wrapper
response = _request_wrapper(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 301, in _request_wrapper
hf_raise_for_status(response)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 454, in hf_raise_for_status
raise _format(RepositoryNotFoundError, message, response) from e
huggingface_hub.errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-67b6884d-5d507c80404852147732c982;0183fed7-b17b-4930-9eea-0fbd185b0a3b)

Repository Not Found for url: https://huggingface.co/ckpts/text_encoder/resolve/main/config.json.
Please make sure you specified the correct repo_id and repo_type.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/user/app/hv_generate_video.py", line 563, in
main()
File "/home/user/app/hv_generate_video.py", line 404, in main
prompt_embeds, prompt_mask, prompt_embeds_2, prompt_mask_2 = encode_input_prompt(
File "/home/user/app/hv_generate_video.py", line 190, in encode_input_prompt
text_encoder = TextEncoder(
File "/home/user/app/hunyuan_model/text_encoder.py", line 183, in init
self.model, self.model_path = load_text_encoder(
File "/home/user/app/hunyuan_model/text_encoder.py", line 66, in load_text_encoder
text_encoder = AutoModel.from_pretrained(text_encoder_path, low_cpu_mem_usage=True, torch_dtype=dtype)
File "/usr/local/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 487, in from_pretrained
resolved_config_file = cached_file(
File "/usr/local/lib/python3.10/site-packages/transformers/utils/hub.py", line 426, in cached_file
raise EnvironmentError(
OSError: ckpts/text_encoder is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with huggingface-cli login or by passing token=<your_token>

完整追踪:
Traceback (most recent call last):
File "/home/user/app/app.py", line 135, in generate_video
result = subprocess.run(
File "/usr/local/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'hv_generate_video.py', '--fp8', '--video_size', '544', '960', '--video_length', '60', '--infer_steps', '30', '--prompt', '"Unreal 5 render of a handsome man img. warm atmosphere, at home, bedroom."', '--save_path', 'outputs', '--output_type', 'both', '--dit', 'ckpts/hunyuan-video-t2v-720p/transformers/mp_rank_00_model_states.pt', '--attn_mode', 'sdpa', '--vae', 'ckpts/hunyuan-video-t2v-720p/vae/pytorch_model.pt', '--vae_chunk_size', '32', '--vae_spatial_tile_sample_min_size', '128', '--text_encoder1', 'ckpts/text_encoder', '--text_encoder2', 'ckpts/text_encoder_2', '--seed', '1234', '--lora_multiplier', '1']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/user/app/app.py", line 146, in generate_video
raise RuntimeError(error_msg)
RuntimeError: 视频生成失败(代码 1):
Trying to import sageattention
Successfully imported sageattention
WARNING:bitsandbytes.cextension:The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
INFO:main:Using device: cpu, DiT precision: torch.bfloat16, weight precision: torch.float8_e4m3fn
INFO:main:Encoding prompt: "Unreal 5 render of a handsome man img. warm atmosphere, at home, bedroom."
INFO:main:loading text encoder: ckpts/text_encoder
INFO:hunyuan_model.text_encoder:Loading text encoder model (llm) from: ckpts/text_encoder
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 406, in hf_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/ckpts/text_encoder/resolve/main/config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/transformers/utils/hub.py", line 403, in cached_file
resolved_file = hf_hub_download(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 862, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 969, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1484, in _raise_on_head_call_error
raise head_call_error
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1376, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1296, in get_hf_file_metadata
r = _request_wrapper(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 277, in _request_wrapper
response = _request_wrapper(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 301, in _request_wrapper
hf_raise_for_status(response)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 454, in hf_raise_for_status
raise _format(RepositoryNotFoundError, message, response) from e
huggingface_hub.errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-67b6884d-5d507c80404852147732c982;0183fed7-b17b-4930-9eea-0fbd185b0a3b)

Repository Not Found for url: https://huggingface.co/ckpts/text_encoder/resolve/main/config.json.
Please make sure you specified the correct repo_id and repo_type.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/user/app/hv_generate_video.py", line 563, in
main()
File "/home/user/app/hv_generate_video.py", line 404, in main
prompt_embeds, prompt_mask, prompt_embeds_2, prompt_mask_2 = encode_input_prompt(
File "/home/user/app/hv_generate_video.py", line 190, in encode_input_prompt
text_encoder = TextEncoder(
File "/home/user/app/hunyuan_model/text_encoder.py", line 183, in init
self.model, self.model_path = load_text_encoder(
File "/home/user/app/hunyuan_model/text_encoder.py", line 66, in load_text_encoder
text_encoder = AutoModel.from_pretrained(text_encoder_path, low_cpu_mem_usage=True, torch_dtype=dtype)
File "/usr/local/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 487, in from_pretrained
resolved_config_file = cached_file(
File "/usr/local/lib/python3.10/site-packages/transformers/utils/hub.py", line 426, in cached_file
raise EnvironmentError(
OSError: ckpts/text_encoder is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with huggingface-cli login or by passing token=<your_token>

Sign up or log in to comment