# FluxPipeline type error

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffluxpipeline-type-error%2F109904%3E%5C
**Category:** 🧨 Diffusers\
**Created:** [October 3, 2024, 2:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffluxpipeline-type-error%2F109904 "2024-10-03T02:19:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamsatoms038](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@adamsatoms038](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fadamsatoms038)%5C
**Post date:** [October 3, 2024, 2:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffluxpipeline-type-error%2F109904%2F1 "2024-10-03T02:19:26Z")

</div>

```auto
import torch
from diffusers import FluxPipeline

model_id = "black-forest-labs/FLUX.1-schnell" #you can also use `black-forest-labs/FLUX.1-dev`

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16)
pipe.enable_sequential_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power

prompt = "A cat holding a sign that says hello world"
seed = 42
image = pipe(
    prompt,
    output_type="pil",
    num_inference_steps=4, #use a larger number if you are using [dev]
    generator=torch.Generator("cuda").manual_seed(seed)
).images[0]
image.save("flux-schnell.png")

```

Ive installed diffusers using pip install --upgrade diffusers[torch], but Im getting type errors in two places. On “from diffusers import FluxPipeline” Im getting

```auto
"FluxPipeline" is not exported from module "diffusers"
  Import from "diffusers.pipelines.flux.pipeline_flux"

```

and on image = pipe() Im getting

```auto
Object of type "DiffusionPipeline" is not callable
  Attribute " __call__" is unknown

```

However, I can run the code and generate images just fine. I can suppress the warnings with “# type: ignore” but I havent seen anyone else mention these errors so Im wondering if something is wrong. I tried uninstalling diffusers library, purging cache in pip and reinstalling, but still seeing the same errors.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 3, 2024, 2:39am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffluxpipeline-type-error%2F109904%2F2 "2024-10-03T02:39:41Z")

</div>

I use the diffusers library frequently and have never encountered that error.

However, I do have an idea of what one of the errors might be: when Flux was first supported, FluxPipeline was in the location indicated by the error message.  
But it must have been a long time ago, and I don’t see why the error message would appear now…  
As for the DiffusionPipeline, it’s probably just a bug altogether.

Either way, they are both bugs.  
If the library really should have generated an error message, let alone a warning, it would not have been able to generate the image.

I’m sure it will be fixed soon, so it’s best not to worry about it.  
@sayakpaul it’s not a major bug, but the pip version of diffusers is buggy. Perhaps there was some mistake in the Pipeline list update the other day?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [October 3, 2024, 2:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffluxpipeline-type-error%2F109904%2F3 "2024-10-03T14:39:51Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
