Upload lightx2v_Qwen-Image-Lightning_0.txt with huggingface_hub
Browse files1234564789101 unmodified line1213141213141516171819202122231516171826272829301920212223242526272834353637383940414243444546474849505152535455293031323334353637385859606162636465666768697071727374757677787980818283394041424344```CODE: import torchfrom diffusers import DiffusionPipeline
# switch to "mps" for apple devicespipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda")pipe = DiffusionPipeline.from_pretrained("lightx2v/Qwen-Image-Lightning")pipe.load_lora_weights("lightx2v/Qwen-Image-Lightning")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"image = pipe(prompt).images[0]1 unmodified line
ERROR: Traceback (most recent call last): File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 402, in hf_raise_for_status response.raise_for_status() ~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status raise HTTPError(http_error_msg, response=self)requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/model_index.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/tmp/lightx2v_Qwen-Image-Lightning_0JxzXo2.py", line 18, in <module> pipe = DiffusionPipeline.from_pretrained("lightx2v/Qwen-Image-Lightning") File "/tmp/lightx2v_Qwen-Image-Lightning_0Kb5CgE.py", line 25, in <module> pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda") File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 833, in from_pretrained cached_folder = cls.download( pretrained_model_name_or_path, ...<14 lines>... **kwargs, File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1025, in from_pretrained loaded_sub_model = load_sub_model( library_name=library_name, ...<21 lines>... quantization_config=quantization_config, ) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 860, in load_sub_model loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1490, in download config_file = hf_hub_download( pretrained_model_name, ...<5 lines>... token=token, ) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1007, in hf_hub_download return _hf_hub_download_to_cache_dir( # Destination ...<14 lines>... force_download=force_download, ) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1070, in _hf_hub_download_to_cache_dir (url_to_download, etag, commit_hash, expected_size, xet_file_data, head_call_error) = _get_metadata_or_catch_error( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ repo_id=repo_id, ^^^^^^^^^^^^^^^^ ...<10 lines>... relative_filename=relative_filename, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/models/modeling_utils.py", line 1288, in from_pretrained ) = cls._load_pretrained_model( ~~~~~~~~~~~~~~~~~~~~~~~~~~^ model, ^^^^^^ ...<13 lines>... is_parallel_loading_enabled=is_parallel_loading_enabled, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1543, in _get_metadata_or_catch_error metadata = get_hf_file_metadata( url=url, proxies=proxies, timeout=etag_timeout, headers=headers, token=token, endpoint=endpoint ) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1460, in get_hf_file_metadata r = _request_wrapper( method="HEAD", ...<5 lines>... timeout=timeout, ) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 283, in _request_wrapper response = _request_wrapper( method=method, ...<2 lines>... **params, ) File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 307, in _request_wrapper hf_raise_for_status(response) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 413, in hf_raise_for_status raise _format(EntryNotFoundError, message, response) from ehuggingface_hub.errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=1-69085655-1ae103fd11d43ae619ca30ab;304640fb-c1b5-42cc-8aa2-9dec49df7ab6)
Entry Not Found for url: https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/model_index.json. File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/models/modeling_utils.py", line 1537, in _load_pretrained_model _caching_allocator_warmup(model, expanded_device_map, dtype, hf_quantizer) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/models/model_loading_utils.py", line 754, in _caching_allocator_warmup _ = torch.empty(warmup_elems, dtype=dtype, device=device, requires_grad=False)torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 38.05 GiB. GPU 0 has a total capacity of 22.03 GiB of which 21.34 GiB is free. Including non-PyTorch memory, this process has 700.00 MiB memory in use. Of the allocated memory 494.18 MiB is allocated by PyTorch, and 19.82 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)lightx2v_Qwen-Image-Lightning_0.txt+27-66