Skip to content

[Fux] load AutoencoderKL from diffusers #1085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions torchtitan/experiments/flux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Overview

## Install dependencies

```bash
pip install -U -r requirements.txt
```

## Usage
First, download the autoencoder model from HuggingFace with your own access token:
```bash
Expand Down
34 changes: 0 additions & 34 deletions torchtitan/experiments/flux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from torchtitan.components.optimizer import build_optimizers
from torchtitan.experiments.flux.dataset.flux_dataset import build_flux_dataloader
from torchtitan.experiments.flux.loss import build_mse_loss
from torchtitan.experiments.flux.model.autoencoder import AutoEncoderParams
from torchtitan.experiments.flux.parallelize_flux import parallelize_flux
from torchtitan.protocols.train_spec import register_train_spec, TrainSpec

Expand Down Expand Up @@ -39,17 +38,6 @@
theta=10_000,
qkv_bias=True,
guidance_embed=True,
autoencoder_params=AutoEncoderParams(
resolution=256,
in_channels=3,
ch=128,
out_ch=3,
ch_mult=(1, 2, 4, 4),
num_res_blocks=2,
z_channels=16,
scale_factor=0.3611,
shift_factor=0.1159,
),
),
"flux-schnell": FluxModelArgs(
in_channels=64,
Expand All @@ -65,17 +53,6 @@
theta=10_000,
qkv_bias=True,
guidance_embed=False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also remove line from torchtitan.experiments.flux.model.autoencoder import AutoEncoderParams
` in the beginning of this file.

autoencoder_params=AutoEncoderParams(
resolution=256,
in_channels=3,
ch=128,
out_ch=3,
ch_mult=(1, 2, 4, 4),
num_res_blocks=2,
z_channels=16,
scale_factor=0.3611,
shift_factor=0.1159,
),
),
"flux-debug": FluxModelArgs(
in_channels=64,
Expand All @@ -91,17 +68,6 @@
theta=10_000,
qkv_bias=True,
guidance_embed=True,
autoencoder_params=AutoEncoderParams(
resolution=256,
in_channels=3,
ch=128,
out_ch=3,
ch_mult=(1, 2, 4, 4),
num_res_blocks=2,
z_channels=16,
scale_factor=0.3611,
shift_factor=0.1159,
),
),
}

Expand Down
Loading