Skip to main content

A PyTorch library for multi-modal image translation with diffusion bridges, GANs, and transformer backbones.

Project description

pytorch-image-translation-models

License: MIT PyPI version

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

import src

gen = src.UNetGenerator(in_channels=3, out_channels=3)
disc = src.PatchGANDiscriminator(in_channels=6)

from src.training import Pix2PixTrainer, TrainingConfig
config = TrainingConfig(epochs=100, device="cuda")
trainer = Pix2PixTrainer(gen, disc, config)
trainer.fit(dataloader)  # expects {"source": tensor, "target": tensor}

translator = src.ImageTranslator(gen, device="cuda")
result = translator.predict(pil_image)

Documentation

Doc Description
Features Models, schedulers, pipelines, data, losses, training, metrics
Examples Extended usage for I2SB, DDBM, UNSB, Local Diffusion, etc.
Package structure Source layout and module overview
Credits Reference papers and citations

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytorch_image_translation_models-0.2.4.tar.gz (152.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file pytorch_image_translation_models-0.2.4.tar.gz.

File metadata

File hashes

Hashes for pytorch_image_translation_models-0.2.4.tar.gz
Algorithm Hash digest
SHA256 8f69e8fcdaab7e182853c44c69b5141fac292f60a7d554cac7a9c42b506013e9
MD5 8bf3fc765b5e04e6ae90e1412cfaf40e
BLAKE2b-256 5f9a2bacb376d56ba67ae7c992a95f44f588e93770c98c25a38318046efff1c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytorch_image_translation_models-0.2.4.tar.gz:

Publisher: publish.yml on Bili-Sakura/pytorch-image-translation-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytorch_image_translation_models-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pytorch_image_translation_models-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 32c7b0353820f7520a70c68bee02b0a3f213f7f75a1ca5bc8489448e8462257b
MD5 683eda3d97b039cd18cf384c569da60f
BLAKE2b-256 9f26f31f49c91eebd9c2a2f5aaa4ae640906030281e8d161193063039732dd28

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytorch_image_translation_models-0.2.4-py3-none-any.whl:

Publisher: publish.yml on Bili-Sakura/pytorch-image-translation-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page