filipstrand/mflux

How use other flux base model ?

Opened this issue ยท 1 comments

I tried using mflux LoRA on my M3 MacBook, and everything worked smoothly. It's an impressive piece of work !!!๐Ÿ‘
It's so satisfying to see the MacBook's GPU working at full capacity in asitop.

But can i use mflux to run flux base model like https://huggingface.co/Shakker-Labs/AWPortrait-FL ?

i dowload the all the AWPortrait-FL files in

.
โ”œโ”€โ”€ text_encoder
โ”‚   โ””โ”€โ”€ model.safetensors
โ”œโ”€โ”€ text_encoder_2
โ”‚   โ”œโ”€โ”€ model-00001-of-00002.safetensors
โ”‚   โ””โ”€โ”€ model-00002-of-00002.safetensors
โ”œโ”€โ”€ tokenizer
โ”‚   โ”œโ”€โ”€ merges.txt
โ”‚   โ”œโ”€โ”€ special_tokens_map.json
โ”‚   โ”œโ”€โ”€ tokenizer_config.json
โ”‚   โ””โ”€โ”€ vocab.json
โ”œโ”€โ”€ tokenizer_2
โ”‚   โ”œโ”€โ”€ special_tokens_map.json
โ”‚   โ”œโ”€โ”€ spiece.model
โ”‚   โ”œโ”€โ”€ tokenizer.json
โ”‚   โ””โ”€โ”€ tokenizer_config.json
โ”œโ”€โ”€ transformer
โ”‚   โ”œโ”€โ”€ diffusion_pytorch_model-00001-of-00003.safetensors
โ”‚   โ”œโ”€โ”€ diffusion_pytorch_model-00002-of-00003.safetensors
โ”‚   โ””โ”€โ”€ diffusion_pytorch_model-00003-of-00003.safetensors
โ””โ”€โ”€ vae
    โ””โ”€โ”€ diffusion_pytorch_model.safetensors

and i try

python main.py \
   --prompt " long prompt " \
   --model dev \
   --path "<Path-to-AWPortrait-FL-dir>" \
    --steps 2 \
   --seed 42 \
   -q 8
mlx/utils.py", line 182, in tree_unflatten  int(tree[0][0].split(".", maxsplit=1)[0])
IndexError: list index out of range

@douenergy Thank you very much! Haha yes, it is indeed satisfying, you rarely hear the fans on modern MacBooks these days unless under heavy workloads like these :)

Regarding the issue, I will have to look into this in more detail. From the structure it looks to be compatible, but something is obviously not matching.

Generally, if it works with Diffusers, the idea is that it should work with MFLUX, so this is a good example to learn from.