P-Flux-2-Klein-4B-DWD / scripts /prepare_data.py
johnrachwanpruna's picture
P-Flux-2-Klein-4B-DWD
24baf68
Raw History Blame Contribute Delete
708 Bytes
#!/usr/bin/env python
"""Build the training shards from images + captions. See docs/data_format.md.
python scripts/prepare_data.py --images ./my_images --out ./data
python scripts/prepare_data.py --captions-file pairs.jsonl --out ./data
python scripts/prepare_data.py --hf-dataset <user>/<dataset> --image-column image --caption-column caption --out ./data
"""
import os
import sys
try:
from dwd_klein.prepare import main
except ImportError: # running from a source checkout without installing the package
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "src"))
from dwd_klein.prepare import main
if __name__ == "__main__":
sys.exit(main())