File size: 5,029 Bytes
0b26330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3ad9ff0
0b26330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3ad9ff0
0b26330
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
```CODE: 
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image, export_to_video

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Lightricks/LTX-2", dtype=torch.bfloat16, device_map="cuda")
pipe.to("cuda")

prompt = "A man with short gray hair plays a red electric guitar."
image = load_image(
    "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png"
)

output = pipe(image=image, prompt=prompt).frames[0]
export_to_video(output, "output.mp4")
```

ERROR: 
Traceback (most recent call last):
  File "/tmp/.cache/uv/environments-v2/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/Lightricks/LTX-2/resolve/main/model_index.json

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

Traceback (most recent call last):
  File "/tmp/Lightricks_LTX-2_0HbplSO.py", line 28, in <module>
    pipe = DiffusionPipeline.from_pretrained("Lightricks/LTX-2", dtype=torch.bfloat16, device_map="cuda")
  File "/tmp/.cache/uv/environments-v2/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 829, in from_pretrained
    cached_folder = cls.download(
        pretrained_model_name_or_path,
    ...<14 lines>...
        **kwargs,
    )
  File "/tmp/.cache/uv/environments-v2/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1605, in download
    config_file = hf_hub_download(
        pretrained_model_name,
    ...<5 lines>...
        token=token,
    )
  File "/tmp/.cache/uv/environments-v2/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/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/e8822e4ae31fc8f1/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 413, in hf_raise_for_status
    raise _format(EntryNotFoundError, message, response) from e
huggingface_hub.errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=1-695e0879-7db119a859c9b6aa2fa3cb7f;14db6d5d-d057-4eee-9c30-87b86057a1ed)

Entry Not Found for url: https://huggingface.co/Lightricks/LTX-2/resolve/main/model_index.json.