Open lutusp opened 1 month ago
@lutusp Are you trying to load just the transformer model or do you have the weights for the entire checkpoint saved in a single file checkpoint?
I guess my explanation wasn't clear enough. My point wasn't that the function created an unexpected outcome, it is that the function doesn't exist. There is no function with that name in diffusers.FluxPipeline.
But apart from that, it was this file: "flux1-dev.safetensors", from here: https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/main .
I have a same question, i want to know how to load local model?
@lutusp Support for single file for Flux at the pipeline level hasn't been added yet because checkpoints that contain all the model components in a single file were only recently released. The checkpoint you shared contains just the transformer weights.
Support for single file loading just the Transformer exists currently.
transformer = FluxTransformer2DModel.from_single_file(
"https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/flux1-dev.safetensors",
torch_dtype=torch.bfloat16
).to("cuda")
pipe = FluxPipeline.from_pretrained(
"black-forest-labs/FLUX.1-dev",
transformer=transformer,
torch_dtype=torch.bfloat16
)
for the FluxTransformer2DModel.from_single_file(), when i change the path to local, it doesnt work:
OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.
for the FluxTransformer2DModel.from_single_file(), when i change the path to local, it doesnt work:
OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.
I'm also wondering how to handle above errors.
I tried to load flux model downloaded from civitai but the model didn't work showing OSError message.
Describe the bug
At the moment one cannot use a local Flux1-dev or -schnell file for lack of an essential function "from_single_file()" in the diffusers.FluxPipeline library. The provided flag "local_files_only" for some reason doesn't solve this problem.
Reproduction
Logs
No response
System Info
$ diffusers-cli env
Who can help?
No response