-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Kontext worked yesterday, but today there is an error running the included example:
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer
Reproduction
import torch
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image
pipe = FluxKontextPipeline.from_pretrained(
"black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16
)
pipe.to("cuda")
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/yarn-art-pikachu.png").convert("RGB")
prompt = "Make Pikachu hold a sign that says 'Black Forest Labs is awesome', yarn art style, detailed, vibrant colors"
image = pipe(
image=image,
prompt=prompt,
guidance_scale=2.5,
generator=torch.Generator().manual_seed(42),
).images[0]
image.save("flux-kontext.png")Logs
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 68.34it/s]
Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]
Loading pipeline components...: 71%|█████████████████████████████████████▏ | 5/7 [00:01<00:00, 3.09it/s]
Error: Python: Traceback (most recent call last):
File ".\python\Lib\site-packages\transformers\modeling_utils.py", line 311, in _wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File ".\python\Lib\site-packages\transformers\modeling_utils.py", line 4833, in from_pretrained
) = cls._load_pretrained_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".\python\Lib\site-packages\transformers\modeling_utils.py", line 5296, in _load_pretrained_model
_error_msgs, disk_offload_index, cpu_offload_index = load_shard_file(args)
^^^^^^^^^^^^^^^^^^^^^
File ".\python\Lib\site-packages\transformers\modeling_utils.py", line 920, in load_shard_file
state_dict = load_state_dict(
^^^^^^^^^^^^^^^^
File ".\python\Lib\site-packages\transformers\modeling_utils.py", line 532, in load_state_dict
with safe_open(checkpoint_file, framework="pt") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBufferSystem Info
The latest alpha.
Who can help?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working