Skip to main content

Pirate Face Hub

Downloads Hugging Face models over BitTorrent from Pirate Face seeders. Your code stays the same.

Install

pip install pirateface

Or without installing:

uv run --with pirateface python your_script.py

Anything that downloads through huggingface_hub (transformers, diffusers, hf download) now pulls from the swarm. Every file is checked against Hugging Face's hash. If a model isn't on Pirate Face or a peer stalls, that file comes from Hugging Face as usual.

Needs Python 3.12 or 3.13. With uvx, pass -p 3.13.

Commands

pf download org/model      # download into the Hugging Face cache (--local-dir DIR for a folder)
pf seed org/model [FOLDER] # seed a model, submitting it first if Pirate Face doesn't list it
pf submit --repo org/model FOLDER  # package and submit a folder without the seed step (--dry-run to preview)
pf work                    # build torrents for queued model requests, streamed from Hugging Face
pf restore PATH            # upload .torrent files to fix a listing whose magnet stalls

More pf seed options:

pf seed --hf-cache          # every complete model in your Hugging Face cache, asking per model
pf seed --update-trackers   # add your seeding tracker to torrents you already seed
pf seed --update-per-file   # add per-file swarms for models you already seed in qBittorrent
pf seed --no-per-file org/model  # skip per-file swarms

pf work --max-size 100 takes only models up to 100 GiB. pf work --once takes one job and exits.

pf restore takes .torrent files or a client folder, such as qBittorrent's BT_backup or Transmission's torrents/.

pf submit --direct --repo your-org/model FOLDER publishes your own model that isn't on Hugging Face.

pf seed, submit, work and restore ask once for your key from pirateface.co/account. Run pf <command> --help for every flag.

Settings

Variable
PIRATEFACE_KEY Account key (otherwise asked once and saved)
QBT_URL, QBT_USER, QBT_PASS qBittorrent Web UI (default http://localhost:8080)
TR_HOST, TR_AUTH Transmission RPC (default localhost:9091), user:pass
HF_TOKEN For gated repos
PF_DISABLE Set to 1 to turn the download hook off

Development

uv run --group dev ruff check

Contributing

  • One change per PR, small enough to read in one sitting.
  • Please don't add tests for now. We're still settling how we test, so check your change by hand and say how in the PR.
  • uv run --group dev ruff check and ruff format --check should pass with nothing new.
  • When you replace code, delete the old code. No disabled flags or leftover branches.
  • Fix problems where they start rather than adding special cases around them.
  • If Pirate Face can't be reached, say so and carry on. Never crash, and never write outside the model folder.
  • Add your Pirate Face username to the PR so we can credit you.

Metadata

Release files for pirateface 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pirateface 0.2.10
File Size Uploaded Provenance Actions
pirateface-0.2.10.tar.gz 53.3 kB Without provenance Details for pirateface-0.2.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pirateface 0.2.10
File Interpreter ABI Platform Actions
pirateface-0.2.10-py3-none-any.whl Python 3 none any Details for pirateface-0.2.10-py3-none-any.whl

Total release size: 109.1 kB

Release files / pirateface-0.2.10.tar.gz

Download URL pirateface-0.2.10.tar.gz
Size 53.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a9d376c4c91c829c8ee1a5a96c6f713b8d229d3304585dd4374fffb9b25d33d4
BLAKE2b-256 checksum
How to use checksums
d8426c9cf82519c0376c590a60762aa09a1c0f64b0d658b41d6e47971b821241
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pirateface-0.2.10-py3-none-any.whl

Download URL pirateface-0.2.10-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12aee2f21a120ce1b7212fce2d3bb9558f51b8234aa549cf5c9d78d690a80b57
BLAKE2b-256 checksum
How to use checksums
16e594682f3a82bbe5778d2c331668109d36d8888023aedd9a826f0c0059cca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pirateface 0.2.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page