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
### Transformer Pytorch Weight Downloading and Jax Weight Loading Instructions:
2
-
1. Weight Downloading and Conversion
3
-
- If first time running (no local safetensors): \
4
-
In the src/maxdiffusion/models/ltx_video/utils folder, run python convert_torch_weights_to_jax.py --download_ckpt_path [location to download safetensors] --output_dir [location to save jax ckpt] --transformer_config_path ../xora_v1.2-13B-balanced-128.json.
5
-
- If already have local pytorch checkpoint: \
6
-
Replace the --download_ckpt_path with --local_ckpt_path and add corresponding location
7
-
2. Restoring Jax Weights into transformer:
8
-
- Replace the "ckpt_path" in src/maxdiffusion/models/ltx_video/xora_v1.2-13B-balanced-128.json with jax ckpt path.
9
-
- Run python src/maxdiffusion/generate_ltx_video.py src/maxdiffusion/configs/ltx_video.yml in the outer repo folder.
10
-
2
+
In the folder src/maxdiffusion/models/ltx_video/utils, run:
3
+
python convert_torch_weights_to_jax.py --ckpt_path [LOCAL DIRECTORY FOR WEIGHTS] --transformer_config_path ../xora_v1.2-13B-balanced-128.json
parser=argparse.ArgumentParser(description="Convert Torch checkpoints to Jax format.")
305
303
parser.add_argument(
306
-
"--local_ckpt_path",
304
+
"--ckpt_path",
307
305
type=str,
308
306
required=False,
309
307
help="Local path of the checkpoint to convert. If not provided, will download from huggingface for example '/mnt/ckpt/00536000' or '/opt/dmd-torch-model/ema.pt'",
310
308
)
311
309
312
-
parser.add_argument(
313
-
"--download_ckpt_path",
314
-
type=str,
315
-
required=False,
316
-
help="Location to download safetensors from huggingface",
317
-
)
318
-
319
-
parser.add_argument(
320
-
"--output_dir",
321
-
type=str,
322
-
required=True,
323
-
help="Path to save the checkpoint to. for example 'gs://lt-research-mm-europe-west4/jax_trainings/converted-from-torch'",
0 commit comments