|
17 | 17 | [](https://github.com/google/maxdiffusion/actions/workflows/UnitTests.yml) |
18 | 18 |
|
19 | 19 | # What's new? |
20 | | -- **`2025/02/12`**: Flux LoRA for inference. |
21 | | -- **`2025/02/08`**: Flux schnell & dev inference. |
| 20 | +- **`2025/02/08**: Flux schnell & dev inference. |
22 | 21 | - **`2024/12/12`**: Load multiple LoRAs for inference. |
23 | 22 | - **`2024/10/22`**: LoRA support for Hyper SDXL. |
24 | 23 | - **`2024/8/1`**: Orbax is the new default checkpointer. You can still use `pipeline.save_pretrained` after training to save in diffusers format. |
@@ -48,8 +47,7 @@ MaxDiffusion supports |
48 | 47 | * [Training](#training) |
49 | 48 | * [Dreambooth](#dreambooth) |
50 | 49 | * [Inference](#inference) |
51 | | - * [Flux](#flux) |
52 | | - * [Flux LoRA](#flux-lora) |
| 50 | + * [Flux](#flux) |
53 | 51 | * [Hyper-SD XL LoRA](#hyper-sdxl-lora) |
54 | 52 | * [Load Multiple LoRA](#load-multiple-lora) |
55 | 53 | * [SDXL Lightning](#sdxl-lightning) |
@@ -171,24 +169,6 @@ To generate images, run the following command: |
171 | 169 | python src/maxdiffusion/generate_flux.py src/maxdiffusion/configs/base_flux_schnell.yml jax_cache_dir=/tmp/cache_dir run_name=flux_test output_dir=/tmp/ prompt="photograph of an electronics chip in the shape of a race car with trillium written on its side" per_device_batch_size=1 ici_data_parallelism=1 ici_fsdp_parallelism=-1 offload_encoders=False |
172 | 170 | ``` |
173 | 171 |
|
174 | | - ## Flux LoRA |
175 | | - |
176 | | - Disclaimer: not all LoRA formats have been tested. If there is a specific LoRA that doesn't load, please let us know. |
177 | | -
|
178 | | - Tested with [Amateur Photography](https://civitai.com/models/652699/amateur-photography-flux-dev) and [XLabs-AI](https://huggingface.co/XLabs-AI/flux-lora-collection/tree/main) LoRA collection. |
179 | | -
|
180 | | - First download the LoRA file to a local directory, for example, `/home/jfacevedo/anime_lora.safetensors`. Then run as follows: |
181 | | -
|
182 | | - ```bash |
183 | | - python src/maxdiffusion/generate_flux.py src/maxdiffusion/configs/base_flux_dev.yml jax_cache_dir=/tmp/cache_dir run_name=flux_test output_dir=/tmp/ prompt='A cute corgi lives in a house made out of sushi, anime' num_inference_steps=28 ici_data_parallelism=1 ici_fsdp_parallelism=-1 split_head_dim=True lora_config='{"lora_model_name_or_path" : ["/home/jfacevedo/anime_lora.safetensors"], "weight_name" : ["anime_lora.safetensors"], "adapter_name" : ["anime"], "scale": [0.8], "from_pt": ["true"]}' |
184 | | - ``` |
185 | | -
|
186 | | - Loading multiple LoRAs is supported as follows: |
187 | | -
|
188 | | - ```bash |
189 | | - python src/maxdiffusion/generate_flux.py src/maxdiffusion/configs/base_flux_dev.yml jax_cache_dir=/tmp/cache_dir run_name=flux_test output_dir=/tmp/ prompt='A cute corgi lives in a house made out of sushi, anime' num_inference_steps=28 ici_data_parallelism=1 ici_fsdp_parallelism=-1 split_head_dim=True lora_config='{"lora_model_name_or_path" : ["/home/jfacevedo/anime_lora.safetensors", "/home/jfacevedo/amateurphoto-v6-forcu.safetensors"], "weight_name" : ["anime_lora.safetensors","amateurphoto-v6-forcu.safetensors"], "adapter_name" : ["anime","realistic"], "scale": [0.6, 0.6], "from_pt": ["true","true"]}' |
190 | | - ``` |
191 | | -
|
192 | 172 | ## Hyper SDXL LoRA |
193 | 173 |
|
194 | 174 | Supports Hyper-SDXL models from [ByteDance](https://huggingface.co/ByteDance/Hyper-SD) |
|
0 commit comments