From 00665a101067df279aff9f8b38ae99bb0bd620d7 Mon Sep 17 00:00:00 2001 From: Juan Acevedo Date: Fri, 13 Dec 2024 00:51:00 +0000 Subject: [PATCH] update readme --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 8f21ff5..441e63d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ [![Unit Tests](https://github.com/google/maxtext/actions/workflows/UnitTests.yml/badge.svg)](https://github.com/google/maxdiffusion/actions/workflows/UnitTests.yml) # What's new? +- **`2024/12/12`**: Load multiple LoRAs for inference. - **`2024/10/22`**: LoRA support for Hyper SDXL. - **`2024/8/1`**: Orbax is the new default checkpointer. You can still use `pipeline.save_pretrained` after training to save in diffusers format. - **`2024/7/20`**: Dreambooth training for Stable Diffusion 1.x,2.x is now supported. @@ -33,6 +34,7 @@ MaxDiffusion supports * Stable Diffusion XL (training and inference). * Stable Diffusion Lightning (inference). * Hyper-SD XL LoRA loading (inference). +* Load Multiple LoRA (inference). * ControlNet inference (Stable Diffusion 1.4 & SDXL). * Dreambooth training support for Stable Diffusion 1.x,2.x. @@ -45,6 +47,7 @@ MaxDiffusion supports * [Dreambooth](#dreambooth) * [Inference](#inference) * [Hyper-SD XL LoRA](#hyper-sdxl-lora) + * [Load Multiple LoRA](#load-multiple-lora) * [SDXL Lightning](#sdxl-lightning) * [ControlNet](#controlnet) * [Comparison To Alternatives](#comparison-to-alternatives) @@ -139,6 +142,14 @@ To generate images, run the following command: python src/maxdiffusion/generate_sdxl.py src/maxdiffusion/configs/base_xl.yml run_name="test-lora" output_dir=/tmp/ jax_cache_dir=/tmp/cache_dir/ num_inference_steps=2 do_classifier_free_guidance=False prompt="a photograph of a cat wearing a hat riding a skateboard in a park." per_device_batch_size=1 pretrained_model_name_or_path="Lykon/AAM_XL_AnimeMix" from_pt=True revision=main diffusion_scheduler_config='{"_class_name" : "FlaxDDIMScheduler", "timestep_spacing" : "trailing"}' lora_config='{"lora_model_name_or_path" : ["ByteDance/Hyper-SD"], "weight_name" : ["Hyper-SDXL-2steps-lora.safetensors"], "adapter_name" : ["hyper-sdxl"], "scale": [0.7], "from_pt": ["true"]}' ``` + ## Load Multiple LoRA + + Supports loading multiple LoRAs for inference. Both from local or from HuggingFace hub. + + ```bash + python src/maxdiffusion/generate_sdxl.py src/maxdiffusion/configs/base_xl.yml run_name="test-lora" output_dir=/tmp/tmp/ jax_cache_dir=/tmp/cache_dir/ num_inference_steps=30 do_classifier_free_guidance=True prompt="ultra detailed diagram blueprint of a papercut Sitting MaineCoon cat, wide canvas, ampereart, electrical diagram, bl3uprint, papercut" per_device_batch_size=1 diffusion_scheduler_config='{"_class_name" : "FlaxDDIMScheduler", "timestep_spacing" : "trailing"}' lora_config='{"lora_model_name_or_path" : ["/home/jfacevedo/blueprintify-sd-xl-10.safetensors","TheLastBen/Papercut_SDXL"], "weight_name" : ["/home/jfacevedo/blueprintify-sd-xl-10.safetensors","papercut.safetensors"], "adapter_name" : ["blueprint","papercut"], "scale": [0.8, 0.7], "from_pt": ["true", "true"]}' + ``` + ## SDXL Lightning Single and Multi host inference is supported with sharding annotations: