Run this model with HF Jobs
Run PrunaAI/P-Flux-2-Klein-4B-DWD on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/PrunaAI/P-Flux-2-Klein-4B-DWD. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/PrunaAI/P-Flux-2-Klein-4B-DWD on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use PrunaAI/P-Flux-2-Klein-4B-DWD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pruna AI
How to use PrunaAI/P-Flux-2-Klein-4B-DWD with Pruna AI:
from pruna import PrunaModel model = PrunaModel.from_pretrained("PrunaAI/P-Flux-2-Klein-4B-DWD") - Notebooks
- Google Colab
- Kaggle
Download scripts/prepare_data.py from PrunaAI/P-Flux-2-Klein-4B-DWD: direct link, hf CLI and curl.
- Browser
- Download file 708 Bytes
-
https://huggingface.co/PrunaAI/P-Flux-2-Klein-4B-DWD/resolve/main/scripts/prepare_data.py
- Command line
-
hf download hf://PrunaAI/P-Flux-2-Klein-4B-DWD/scripts/prepare_data.py
-
curl -L -o prepare_data.py https://huggingface.co/PrunaAI/P-Flux-2-Klein-4B-DWD/resolve/main/scripts/prepare_data.py
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()) | |