-
Notifications
You must be signed in to change notification settings - Fork 34
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
G_prompt for cut_turbo for dataset with single prompt #662
Open
wr0124
wants to merge
7
commits into
jolibrain:master
Choose a base branch
from
wr0124:G_prompt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+178
−25
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1315279
feat(ml): add G_prompt if the dataset has no prompt, and fix multi
wr0124 c210099
feat(ml): add documentation
wr0124 f2604e6
feat(ml):use option save_config and prioritize prompt option
wr0124 42f3600
feat(ml): format
wr0124 99c673d
feat(ml):verify multi batch prompt match x
wr0124 2d9c20e
feat(ml):change G_lr to 0.0001
wr0124 cdd6af2
feat(ml): align input for turbo
wr0124 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{ | ||
"D": { | ||
"dropout": false, | ||
"n_layers": 3, | ||
"ndf": 64, | ||
"netDs": ["projected_d", "basic"], | ||
"norm": "instance", | ||
"proj_interp": -1, | ||
"proj_network_type": "efficientnet", | ||
}, | ||
"G": { | ||
"attn_nb_mask_attn": 10, | ||
"attn_nb_mask_input": 1, | ||
"dropout": false, | ||
"nblocks": 9, | ||
"netG": "img2img_turbo", | ||
"ngf": 64, | ||
"norm": "instance", | ||
"padding_type": "reflect", | ||
}, | ||
"alg": { | ||
"gan": {"lambda": 1.0}, | ||
"cut": { | ||
"HDCE_gamma": 1.0, | ||
"HDCE_gamma_min": 1.0, | ||
"MSE_idt": false, | ||
"flip_equivariance": false, | ||
"lambda_MSE_idt": 1.0, | ||
"lambda_NCE": 1.0, | ||
"lambda_SRC": 0.0, | ||
"nce_T": 0.07, | ||
"nce_idt": true, | ||
"nce_includes_all_negatives_from_minibatch": false, | ||
"nce_layers": "0,4,8,12,16", | ||
"nce_loss": "monce", | ||
"netF": "mlp_sample", | ||
"netF_dropout": false, | ||
"netF_nc": 256, | ||
"netF_norm": "instance", | ||
"num_patches": 256, | ||
}, | ||
}, | ||
"data": { | ||
"crop_size": 256, | ||
"dataset_mode": "unaligned", | ||
"direction": "AtoB", | ||
"load_size": 256, | ||
"max_dataset_size": 1000000000, | ||
"num_threads": 4, | ||
"preprocess": "resize_and_crop", | ||
}, | ||
"output": { | ||
"display": { | ||
"freq": 400, | ||
"id": 1, | ||
"ncols": 0, | ||
"type": ["visdom"], | ||
"visdom_port": 8097, | ||
"visdom_server": "http://localhost", | ||
"winsize": 256, | ||
}, | ||
"no_html": false, | ||
"print_freq": 100, | ||
"update_html_freq": 1000, | ||
"verbose": false, | ||
}, | ||
"model": { | ||
"init_gain": 0.02, | ||
"init_type": "normal", | ||
"input_nc": 3, | ||
"multimodal": false, | ||
"output_nc": 3, | ||
}, | ||
"train": { | ||
"D_lr": 0.0001, | ||
"G_ema": false, | ||
"G_ema_beta": 0.999, | ||
"G_lr": 0.0001, | ||
"batch_size": 4, | ||
"beta1": 0.9, | ||
"beta2": 0.999, | ||
"continue": false, | ||
"epoch": "latest", | ||
"epoch_count": 1, | ||
"export_jit": false, | ||
"gan_mode": "lsgan", | ||
"iter_size": 8, | ||
"load_iter": 0, | ||
"metrics_every": 1000, | ||
"n_epochs": 200, | ||
"n_epochs_decay": 100, | ||
"nb_img_max_fid": 1000000000, | ||
"optim": "adam", | ||
"pool_size": 50, | ||
"save_by_iter": false, | ||
"save_epoch_freq": 1, | ||
"save_latest_freq": 5000, | ||
}, | ||
"dataaug": { | ||
"APA": false, | ||
"APA_every": 4, | ||
"APA_nimg": 50, | ||
"APA_p": 0, | ||
"APA_target": 0.6, | ||
"D_diffusion": false, | ||
"D_diffusion_every": 4, | ||
"D_label_smooth": false, | ||
"D_noise": 0.0, | ||
"affine": 0.0, | ||
"affine_scale_max": 1.2, | ||
"affine_scale_min": 0.8, | ||
"affine_shear": 45, | ||
"affine_translate": 0.2, | ||
"diff_aug_policy": "", | ||
"diff_aug_proba": 0.5, | ||
"imgaug": false, | ||
"no_flip": false, | ||
"no_rotate": true, | ||
}, | ||
"checkpoints_dir": "/path/to/checkpoints", | ||
"dataroot": "/path/to/horse2zebra", | ||
"ddp_port": "12355", | ||
"gpu_ids": "0", | ||
"model_type": "cut", | ||
"name": "horse2zebra", | ||
"phase": "train", | ||
"test_batch_size": 1, | ||
"warning_mode": false, | ||
"with_amp": false, | ||
"with_tf32": false, | ||
"with_torch_compile": false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about the
[0]
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with refs:
1.https://huggingface.co/transformers/v4.8.0/model_doc/clip.html#flaxcliptextmodel
2.https://github.com/huggingface/transformers/blob/f91c16d270e5e3ff32fdb32ccf286d05c03dfa66/src/transformers/models/clip/modeling_clip.py#L759
"outputs= self.text_encoder(caption_tokens)"
type(outputs)= text_encoder <class 'transformers.modeling_outputs.BaseModelOutputWithPooling'>
len(outputs) = 2
outputs[0].shape = torch.Size([4, 77, 1024]) this is last_hidden_state
outputs[1].shape = torch.Size([4, 1024]) this is the pooler_output
According to the explication of refs 1, should be outputs[0].