cannot run the demo
i clone the repository and download model files manualy. i try to run the demo :
""""
import torch
from diffusers import FluxPipeline
#pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe = FluxPipeline.from_pretrained("/home/a/repo/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
prompt = "A cat holding a sign that says hello world"
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=3.5,
num_inference_steps=50,
max_sequence_length=512,
generator=torch.Generator("cpu").manual_seed(0)
).images[0]
image.save("flux-dev.png")
"""
Then i got:
Traceback (most recent call last):
File "/home/a/code/scripts/flux/test_dev.py", line 9, in
pipe = FluxPipeline.from_pretrained("/home/a/repo/FLUX.1-dev", torch_dtype=torch.bfloat16)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/a/.conda/envs/flux/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/a/.conda/envs/flux/lib/python3.11/site-packages/diffusers/pipelines/pipeline_utils.py", line 948, in from_pretrained
model = pipeline_class(**init_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/a/.conda/envs/flux/lib/python3.11/site-packages/diffusers/pipelines/flux/pipeline_flux.py", line 188, in init
self.register_modules(
File "/home/a/.conda/envs/flux/lib/python3.11/site-packages/diffusers/pipelines/pipeline_utils.py", line 165, in register_modules
library, class_name = _fetch_class_library_tuple(module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/a/.conda/envs/flux/lib/python3.11/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 735, in _fetch_class_library_tuple
library = not_compiled_module.module.split(".")[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'module'. Did you mean: 'mod'?
version imformation:
diffusers==0.31.0
torch=2.5.0
does anyone know what is wrong?