Metadata-Version: 2.4
Name: deforum-flux
Version: 0.1.3
Summary: Flux backend for Deforum
Author-email: Deforum Inc <hello@deforum.io>
License-Expression: MIT
Project-URL: Homepage, https://github.com/deforum/flux
Project-URL: Repository, https://github.com/deforum/flux
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch
Requires-Dist: torchvision
Requires-Dist: torchaudio
Requires-Dist: accelerate
Requires-Dist: einops
Requires-Dist: fire
Requires-Dist: huggingface-hub
Requires-Dist: safetensors
Requires-Dist: sentencepiece
Requires-Dist: transformers
Requires-Dist: tokenizers
Requires-Dist: protobuf
Requires-Dist: requests
Requires-Dist: ruff
Requires-Dist: opencv-python
Provides-Extra: tensorrt
Requires-Dist: tensorrt-cu12; extra == "tensorrt"
Requires-Dist: colored; extra == "tensorrt"
Requires-Dist: onnx; extra == "tensorrt"
Requires-Dist: onnxruntime; extra == "tensorrt"
Requires-Dist: onnxruntime-gpu; extra == "tensorrt"
Requires-Dist: onnx-graphsurgeon; extra == "tensorrt"
Requires-Dist: polygraphy; extra == "tensorrt"
Dynamic: license-file

# Deforum Flux Backend

Flux backend for Deforum using Black Forest Labs Flux. This package includes code from [Black Forest Labs Flux](https://github.com/black-forest-labs/flux) to enable PyPI installation.

## Installation

Install PyTorch with CUDA 12.8 support first:

```bash
# Install PyTorch with CUDA 12.8 (required for RTX 50 series)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

# Then install deforum-flux
pip install deforum-flux

# Optional: For TensorRT acceleration
pip install deforum-flux[tensorrt]
```

**Note:** RTX 50 series cards require CUDA 12.8.

## Development Installation

```bash
# Clone the repository
git clone https://github.com/deforum/flux.git
cd flux

# Install PyTorch with CUDA 12.8
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

# Install in development mode
pip install -e .

# Optional: Install with TensorRT support
pip install -e .[tensorrt]
```

## Publish
```bash
python -m build
python -m twine upload dist/*
```

## License

This package includes code from multiple sources:

- **Deforum Flux Backend** (wrapper code): MIT License
- **Black Forest Labs Flux** (core implementation): Apache 2.0 License
- **FLUX.1-schnell model**: Apache 2.0 License (commercial use allowed)
- **FLUX.1-dev model**: Non-commercial license (no commercial use)

⚠️ **Important**: If you use the FLUX.1-dev model, you are bound by its non-commercial license terms. See `src/flux/LICENSE-FLUX1-dev.md` for details.

For commercial applications, use only the FLUX.1-schnell model.
