You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add conditioning image path as conditioning_media_paths in the form of ["IMAGE_PATH"] along with other generation parameters in the ltx_video.yml file. Then follow same instruction as above.
195
+
In the folder src/maxdiffusion/models/ltx_video/utils, run:
196
+
197
+
```bash
198
+
python convert_torch_weights_to_jax.py --ckpt_path [LOCAL DIRECTORY FOR WEIGHTS] --transformer_config_path ../ltxv-13B.json
Add conditioning image path as conditioning_media_paths in the form of ["IMAGE_PATH"] along with other generation parameters in the ltx_video.yml file. Then follow same instruction as above.
208
+
209
+
## Wan2.1
210
+
211
+
212
+
189
213
## Flux
190
214
191
215
First make sure you have permissions to access the Flux repos in Huggingface.
@@ -219,41 +243,41 @@ To generate images, run the following command:
219
243
```bash
220
244
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
221
245
```
222
-
## Fused Attention for GPU:
223
-
Fused Attention for GPU is supported via TransformerEngine. Installation instructions:
246
+
## Fused Attention for GPU:
247
+
Fused Attention for GPU is supported via TransformerEngine. Installation instructions:
224
248
225
-
```bash
226
-
cd maxdiffusion
227
-
pip install -U "jax[cuda12]"
228
-
pip install -r requirements.txt
229
-
pip install --upgrade torch torchvision
230
-
pip install "transformer_engine[jax]
231
-
pip install .
232
-
```
249
+
```bash
250
+
cd maxdiffusion
251
+
pip install -U "jax[cuda12]"
252
+
pip install -r requirements.txt
253
+
pip install --upgrade torch torchvision
254
+
pip install "transformer_engine[jax]
255
+
pip install .
256
+
```
233
257
234
-
Now run the command:
258
+
Now run the command:
235
259
236
-
```bash
237
-
NVTE_FUSED_ATTN=1 HF_HUB_ENABLE_HF_TRANSFER=1 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 split_head_dim=True per_device_batch_size=1 attention="cudnn_flash_te" hardware=gpu
238
-
```
260
+
```bash
261
+
NVTE_FUSED_ATTN=1 HF_HUB_ENABLE_HF_TRANSFER=1 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 split_head_dim=True per_device_batch_size=1 attention="cudnn_flash_te" hardware=gpu
262
+
```
239
263
240
-
## Flux LoRA
264
+
## Flux LoRA
241
265
242
-
Disclaimer: not all LoRA formats have been tested. If there is a specific LoRA that doesn't load, please let us know.
266
+
Disclaimer: not all LoRA formats have been tested. If there is a specific LoRA that doesn't load, please let us know.
243
267
244
-
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.
268
+
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.
245
269
246
-
First download the LoRA file to a local directory, for example, `/home/jfacevedo/anime_lora.safetensors`. Then run as follows:
270
+
First download the LoRA file to a local directory, for example, `/home/jfacevedo/anime_lora.safetensors`. Then run as follows:
247
271
248
-
```bash
249
-
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"]}'
250
-
```
272
+
```bash
273
+
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"]}'
274
+
```
251
275
252
-
Loading multiple LoRAs is supported as follows:
276
+
Loading multiple LoRAs is supported as follows:
253
277
254
-
```bash
255
-
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"]}'
256
-
```
278
+
```bash
279
+
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"]}'
280
+
```
257
281
258
282
## Hyper SDXL LoRA
259
283
@@ -265,36 +289,35 @@ To generate images, run the following command:
265
289
266
290
## Load Multiple LoRA
267
291
268
-
Supports loading multiple LoRAs for inference. Both from local or from HuggingFace hub.
292
+
Supports loading multiple LoRAs for inference. Both from local or from HuggingFace hub.
0 commit comments