Upload black-forest-labs_FLUX.2-klein-4B_0.txt with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536373839```CODE: import torchfrom diffusers import DiffusionPipelinefrom diffusers.utils import load_image
# switch to "mps" for apple devicespipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-4B", 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")
image = pipe(image=input_image, prompt=prompt).images[0]```
ERROR: Traceback (most recent call last): File "/tmp/black-forest-labs_FLUX.2-klein-4B_00Jz9eb.py", line 28, in <module> pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-4B", dtype=torch.bfloat16, device_map="cuda") File "/tmp/.cache/uv/environments-v2/53790ea318e61f21/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/53790ea318e61f21/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/53790ea318e61f21/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/53790ea318e61f21/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1663, in download pipeline_class = _get_pipeline_class( cls, ...<7 lines>... revision=custom_revision, ) File "/tmp/.cache/uv/environments-v2/53790ea318e61f21/lib/python3.13/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 507, in _get_pipeline_class pipeline_cls = getattr(diffusers_module, class_name) File "/tmp/.cache/uv/environments-v2/53790ea318e61f21/lib/python3.13/site-packages/diffusers/utils/import_utils.py", line 1009, in __getattr__ raise AttributeError(f"module {self.__name__} has no attribute {name}")AttributeError: module diffusers has no attribute Flux2KleinPipeline. Did you mean: 'Flux2Pipeline'?black-forest-labs_FLUX.2-klein-4B_0.txtAdded+39