Skip to content
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

Feat ref cross attn unet [2306.08276] #530

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

pnsuau
Copy link
Contributor

@pnsuau pnsuau commented Aug 25, 2023

This PR adds a new option for unet mha diffusion generator. This generator is based on https://arxiv.org/abs/2306.08276 work.

Usage :

python3 train.py  --G_netG unet_mha_ref_attn --data_dataset_mode self_supervised_labeled_mask_online_ref --model_type palette --alg_palette_conditioning " "  --alg_palette_cond_image_creation y_t

Notes:

  • Reference generator for diffusion requires a dataset with reference images
  • Reference generator cannot (yet) be combined with other types of conditioning, e.g. --alg_palette_conditioning or --alg_palette_cond_image_creation y_t

Typical results on VITON:

viton_ref1
viton_ref2

@pnsuau pnsuau self-assigned this Aug 25, 2023
@pnsuau pnsuau force-pushed the feat_ref_cross_attn_unet branch 3 times, most recently from 0d0f202 to d9dc904 Compare September 4, 2023 15:32
@pnsuau pnsuau force-pushed the feat_ref_cross_attn_unet branch 2 times, most recently from fcb85a8 to ee57b74 Compare September 12, 2023 12:56
@pnsuau pnsuau requested a review from beniz September 12, 2023 15:00
@pnsuau pnsuau force-pushed the feat_ref_cross_attn_unet branch 2 times, most recently from 72df92a to 1c87db7 Compare September 13, 2023 14:56
@pnsuau pnsuau requested review from royale and Bycob September 13, 2023 15:21
Copy link
Collaborator

@Bycob Bycob left a comment

Choose a reason for hiding this comment

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

"ref" stands for "reference image" right? Maybe add comments to point that out? And explain what a reference image is

models/modules/palette_denoise_fn.py Outdated Show resolved Hide resolved
@beniz beniz assigned beniz and unassigned pnsuau Sep 27, 2023
@beniz beniz force-pushed the feat_ref_cross_attn_unet branch 4 times, most recently from 9b78e9d to dbc3d34 Compare September 28, 2023 16:03
@beniz beniz force-pushed the feat_ref_cross_attn_unet branch 4 times, most recently from 4a76d99 to 58d6be9 Compare October 5, 2023 13:01
@beniz beniz merged commit ffead4e into jolibrain:master Oct 5, 2023
2 checks passed
@dingkwang
Copy link

Hi I am new to this project. I processed the VTON dataset following this guide. https://www.joligen.com/doc/tutorial_viton.html but it doesn't produce the reference image and the condition.txt. I think I just need to create them manually from the original viton dataset.

@beniz
Copy link
Contributor

beniz commented Oct 26, 2023

@dingkwang
Copy link

dingkwang commented Nov 12, 2023

For the --data_dataset_mode, you should use self_supervised_labeled_mask_ref, instead of self_supervised_labeled_mask_online_ref

@beniz
Copy link
Contributor

beniz commented Nov 13, 2023

you should use self_supervised_labeled_mask_ref, instead of self_supervised_labeled_mask_online_ref

The online dataloader samples crops around the bboxes, which is useful on some datasets, including VITON, see #568 (comment) and #576 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants