pytorch-image-translation-models
A PyTorch library for multi-modal image translation with diffusion bridges, GANs, and transformer backbones.
Installation
Install from PyPI
pip install pytorch-image-translation-models
Install from source
pip install -e .
With optional dependencies:
# With training extras (accelerate, peft, datasets, tensorboard)
pip install -e ".[training]"
# With metrics extras (torchmetrics, lpips, torch-fidelity, scipy)
pip install -e ".[metrics]"
# Everything
pip install -e ".[all]"
Note: PyTorch is listed as a dependency but you may want to install a specific CUDA build first. See PyTorch — Get Started for details.
Quick Start
Examples default to device="cuda". If your environment is CPU-only, replace "cuda" with "cpu".
from PIL import Image
# Baseline method (UNSB)
from src.pipelines.unsb import UNSBPipeline
unsb = UNSBPipeline.from_pretrained(
"path/to/UNSB-ckpt/horse2zebra", # https://huggingface.co/BiliSakura/UNSB-ckpt
subfolder="generator",
scheduler_num_timesteps=5,
scheduler_tau=0.01,
)
unsb.to("cuda")
unsb_out = unsb(source_image=source, output_type="pil")
unsb_out.images[0].save("unsb_output.png")
# Community method (DiffuseIT) - text/image-guided diffusion translation
from examples.community.diffuseit import load_diffuseit_community_pipeline
pipe = load_diffuseit_community_pipeline(
"/path/to/BiliSakura/DiffuseIT-ckpt/imagenet256-uncond",
)
pipe.to("cuda")
out = pipe(
source_image=source,
prompt="Black Leopard",
source="Lion",
use_range_restart=True,
use_noise_aug_all=True,
output_type="pil",
)
out.images[0].save("diffuseit_output.png")
# Community method (E3Diff)
from examples.community.e3diff import E3DiffPipeline
e3diff = E3DiffPipeline.from_pretrained("path/to/E3Diff-ckpt/SEN12")
e3diff.to("cuda")
community_out = e3diff(source_image=source, num_inference_steps=50, output_type="pil")
community_out.images[0].save("e3diff_output.png")
Documentation
All information regarding per-method checkpoint folder conventions required by from_pretrained(...), as well as comprehensive package documentation, is integrated below.
| Doc | Description |
|---|---|
| Checkpoint layouts | Provides detailed checkpoint folder structures, naming conventions, and requirements for each pipeline and the from_pretrained(...) API. |
| Features | Documents supported models, schedulers, pipelines, data types, training methods, and evaluation metrics. |
| Metrics README | One-stop usage for paired/unpaired metrics and custom HuggingFace/local checkpoints. |
| Datasets | Common image-to-image translation datasets (pix2pix, CycleGAN) with paper and download links. |
| Examples | Extended usage patterns and code snippets for pipelines such as I2SB, DDBM, UNSB, and Local Diffusion. |
| Storage Buckets | Sync training checkpoints and TensorBoard logs to Hugging Face Storage Buckets (CUT, pix2pix tutorials). |
| Package structure | Overview of the codebase organization, modules, and directories. |
| Credits | Citations for reference papers and third-party contributions. |
Credits
This repository/package is primarily built upon 4th-MAVIC-T by the EarthBridge Team:
- Zheyuan Chen — bilisakura@zju.edu.cn
- Yuanshen Guan — guanys@mail.ustc.edu.cn
License
MIT
Metadata
Release files for pytorch-image-translation-models 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytorch_image_translation_models-0.6.0.tar.gz | 401.6 kB | With provenance | Details for pytorch_image_translation_models-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytorch_image_translation_models-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for pytorch_image_translation_models-0.6.0-py3-none-any.whl |
Total release size: 971.0 kB
Release files / pytorch_image_translation_models-0.6.0.tar.gz
| Download URL | pytorch_image_translation_models-0.6.0.tar.gz |
|---|---|
| Size | 401.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42548f21a80755c39a2c02e83e12b2322a2ca25ec608ea60cd2c1d230aaa10c5
|
|
BLAKE2b-256 checksum How to use checksums |
25a52e364566c70987ae55b77af882e1cce937430c4da4202df4eade3169316d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency logRelease files / pytorch_image_translation_models-0.6.0-py3-none-any.whl
| Download URL | pytorch_image_translation_models-0.6.0-py3-none-any.whl |
|---|---|
| Size | 569.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53770ff01c09b01e8df44943e21eb08ce00da5fb9be7f1619f009580743357f0
|
|
BLAKE2b-256 checksum How to use checksums |
45634d694c7033b42200e3059e3bb52028c0b0419163fb0fae64f02285239f68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency logSecurity for pytorch-image-translation-models 0.6.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pytorch_image_translation_models-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency logA 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.