Upload lightx2v_Qwen-Image-Lightning_0.txt with huggingface_hub
Browse files
lightx2v_Qwen-Image-Lightning_0.txt
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
```CODE:
|
|
|
|
| 2 |
from diffusers import DiffusionPipeline
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
|
| 6 |
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
|
| 7 |
image = pipe(prompt).images[0]
|
|
@@ -9,75 +12,33 @@ image = pipe(prompt).images[0]
|
|
| 9 |
|
| 10 |
ERROR:
|
| 11 |
Traceback (most recent call last):
|
| 12 |
-
File "/tmp
|
| 13 |
-
|
| 14 |
-
~~~~~~~~~~~~~~~~~~~~~~~~~^^
|
| 15 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
|
| 16 |
-
raise HTTPError(http_error_msg, response=self)
|
| 17 |
-
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/model_index.json
|
| 18 |
-
|
| 19 |
-
The above exception was the direct cause of the following exception:
|
| 20 |
-
|
| 21 |
-
Traceback (most recent call last):
|
| 22 |
-
File "/tmp/lightx2v_Qwen-Image-Lightning_0JxzXo2.py", line 18, in <module>
|
| 23 |
-
pipe = DiffusionPipeline.from_pretrained("lightx2v/Qwen-Image-Lightning")
|
| 24 |
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 25 |
return fn(*args, **kwargs)
|
| 26 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
...<
|
| 30 |
-
|
| 31 |
)
|
|
|
|
|
|
|
| 32 |
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 33 |
return fn(*args, **kwargs)
|
| 34 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1007, in hf_hub_download
|
| 43 |
-
return _hf_hub_download_to_cache_dir(
|
| 44 |
-
# Destination
|
| 45 |
-
...<14 lines>...
|
| 46 |
-
force_download=force_download,
|
| 47 |
-
)
|
| 48 |
-
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
|
| 49 |
-
(url_to_download, etag, commit_hash, expected_size, xet_file_data, head_call_error) = _get_metadata_or_catch_error(
|
| 50 |
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
| 51 |
-
repo_id=repo_id,
|
| 52 |
-
^^^^^^^^^^^^^^^^
|
| 53 |
-
...<10 lines>...
|
| 54 |
-
relative_filename=relative_filename,
|
| 55 |
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 56 |
)
|
| 57 |
^
|
| 58 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1460, in get_hf_file_metadata
|
| 65 |
-
r = _request_wrapper(
|
| 66 |
-
method="HEAD",
|
| 67 |
-
...<5 lines>...
|
| 68 |
-
timeout=timeout,
|
| 69 |
-
)
|
| 70 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 283, in _request_wrapper
|
| 71 |
-
response = _request_wrapper(
|
| 72 |
-
method=method,
|
| 73 |
-
...<2 lines>...
|
| 74 |
-
**params,
|
| 75 |
-
)
|
| 76 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 307, in _request_wrapper
|
| 77 |
-
hf_raise_for_status(response)
|
| 78 |
-
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
|
| 79 |
-
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 413, in hf_raise_for_status
|
| 80 |
-
raise _format(EntryNotFoundError, message, response) from e
|
| 81 |
-
huggingface_hub.errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=1-69085655-1ae103fd11d43ae619ca30ab;304640fb-c1b5-42cc-8aa2-9dec49df7ab6)
|
| 82 |
-
|
| 83 |
-
Entry Not Found for url: https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/model_index.json.
|
|
|
|
| 1 |
```CODE:
|
| 2 |
+
import torch
|
| 3 |
from diffusers import DiffusionPipeline
|
| 4 |
|
| 5 |
+
# switch to "mps" for apple devices
|
| 6 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda")
|
| 7 |
+
pipe.load_lora_weights("lightx2v/Qwen-Image-Lightning")
|
| 8 |
|
| 9 |
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
|
| 10 |
image = pipe(prompt).images[0]
|
|
|
|
| 12 |
|
| 13 |
ERROR:
|
| 14 |
Traceback (most recent call last):
|
| 15 |
+
File "/tmp/lightx2v_Qwen-Image-Lightning_0Kb5CgE.py", line 25, in <module>
|
| 16 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 18 |
return fn(*args, **kwargs)
|
| 19 |
+
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1025, in from_pretrained
|
| 20 |
+
loaded_sub_model = load_sub_model(
|
| 21 |
+
library_name=library_name,
|
| 22 |
+
...<21 lines>...
|
| 23 |
+
quantization_config=quantization_config,
|
| 24 |
)
|
| 25 |
+
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 860, in load_sub_model
|
| 26 |
+
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
|
| 27 |
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 28 |
return fn(*args, **kwargs)
|
| 29 |
+
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/models/modeling_utils.py", line 1288, in from_pretrained
|
| 30 |
+
) = cls._load_pretrained_model(
|
| 31 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
| 32 |
+
model,
|
| 33 |
+
^^^^^^
|
| 34 |
+
...<13 lines>...
|
| 35 |
+
is_parallel_loading_enabled=is_parallel_loading_enabled,
|
| 36 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
)
|
| 38 |
^
|
| 39 |
+
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/models/modeling_utils.py", line 1537, in _load_pretrained_model
|
| 40 |
+
_caching_allocator_warmup(model, expanded_device_map, dtype, hf_quantizer)
|
| 41 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 42 |
+
File "/tmp/.cache/uv/environments-v2/0af75e0924c95b1f/lib/python3.13/site-packages/diffusers/models/model_loading_utils.py", line 754, in _caching_allocator_warmup
|
| 43 |
+
_ = torch.empty(warmup_elems, dtype=dtype, device=device, requires_grad=False)
|
| 44 |
+
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|