Upload black-forest-labs_FLUX.1-Kontext-dev_1.txt with huggingface_hub
Browse files1234565789103 unmodified lines1415161516171819202122232425262728293031323334353637171819202114 unmodified lines363738585960616263646566673940414243444546474849505152535455```CODE: import torchfrom diffusers import DiffusionPipelinefrom diffusers.utils import load_image
# switch to "mps" for apple devicespipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev")pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda")
prompt = "Turn this cat into a dog"input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")3 unmodified lines
ERROR: Traceback (most recent call last): File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/tokenization_utils_base.py", line 2343, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/models/t5/tokenization_t5_fast.py", line 119, in __init__ super().__init__( ~~~~~~~~~~~~~~~~^ vocab_file=vocab_file, ^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... **kwargs, ^^^^^^^^^ ) ^ File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/tokenization_utils_fast.py", line 108, in __init__ raise ValueError( ...<2 lines>... )ValueError: Cannot instantiate this tokenizer from a slow version. If it's based on sentencepiece, make sure you have sentencepiece installed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/tmp/black-forest-labs_FLUX.1-Kontext-dev_1JO1im2.py", line 19, in <module> pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev") File "/tmp/black-forest-labs_FLUX.1-Kontext-dev_1rIMizY.py", line 26, in <module> pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda") File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/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/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1025, in from_pretrained14 unmodified lines ^^^^^^^^^ ) ^ File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/tokenization_utils_base.py", line 2344, in _from_pretrained except import_protobuf_decode_error(): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/tokenization_utils_base.py", line 87, in import_protobuf_decode_error raise ImportError(PROTOBUF_IMPORT_ERROR.format(error_message))ImportError: requires the protobuf library but it was not found in your environment. Check out the instructions on theinstallation page of its repo: https://github.com/protocolbuffers/protobuf/tree/master/python#installation and follow the onesthat match your environment. Please note that you may need to restart your runtime after installation.
File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/tokenization_utils_base.py", line 2343, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/models/t5/tokenization_t5_fast.py", line 119, in __init__ super().__init__( ~~~~~~~~~~~~~~~~^ vocab_file=vocab_file, ^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... **kwargs, ^^^^^^^^^ ) ^ File "/tmp/.cache/uv/environments-v2/ca96a1cdc2ecd6c7/lib/python3.13/site-packages/transformers/tokenization_utils_fast.py", line 108, in __init__ raise ValueError( ...<2 lines>... )ValueError: Cannot instantiate this tokenizer from a slow version. If it's based on sentencepiece, make sure you have sentencepiece installed.black-forest-labs_FLUX.1-Kontext-dev_1.txt+22-34