Skip to content

Conversation

@sayakpaul
Copy link
Member

@sayakpaul sayakpaul commented Jan 6, 2025

What does this PR do?

  • Introduce a flag only_target_transformer_blocks in the train_control_flux.py script. This only trains the transformer blocks along with the x_embedder layer. Results show that it works.
  • Introduce a flag log_dataset_samples which lets users log samples to wandb (properly guarded). One can check this wandb run page to see that it works.
  • Modifies the dataloader such that when a dataset caption column has a list of different captions we only take the largest one. This lets us train on datasets like this: https://huggingface.co/datasets/TIGER-Lab/OmniEdit-Filtered-1.2M. We could randomly sample, too but for now, this is okay IMO.
  • Some additional changes to the README, fixing some argument names.

assert torch.all(flux_transformer.x_embedder.weight[:, initial_input_channels:].data == 0)
flux_transformer.register_to_config(in_channels=initial_input_channels * 2, out_channels=initial_input_channels)

if args.only_target_transformer_blocks:
Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't apply to the LoRA script.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@sayakpaul sayakpaul requested a review from a-r-r-o-w January 6, 2025 02:29
Copy link
Contributor

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

Thanks!

@sayakpaul sayakpaul merged commit b94cfd7 into main Jan 7, 2025
12 checks passed
@sayakpaul sayakpaul deleted the updates-flux-control branch January 7, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants