Upload 3 files
Browse files- bb-multidatabackend.json +71 -0
- config.env +52 -0
- user_prompt_library.json +5 -0
bb-multidatabackend.json
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"id": "jesse",
|
4 |
+
"type": "local",
|
5 |
+
"crop": false,
|
6 |
+
"crop_aspect": "square",
|
7 |
+
"crop_style": "center",
|
8 |
+
"resolution": 512,
|
9 |
+
"minimum_image_size": 512,
|
10 |
+
"maximum_image_size": 768,
|
11 |
+
"target_downsample_size": 512,
|
12 |
+
"resolution_type": "pixel",
|
13 |
+
"cache_dir_vae": "cache/vae/jesse",
|
14 |
+
"instance_data_dir": "datasets/breaking-bad/jesse",
|
15 |
+
"instance_prompt": "Jesse Pinkman",
|
16 |
+
"disabled": false,
|
17 |
+
"skip_file_discovery": "",
|
18 |
+
"caption_strategy": "instanceprompt",
|
19 |
+
"metadata_backend": "json",
|
20 |
+
"repeats": 1
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"id": "walter",
|
24 |
+
"type": "local",
|
25 |
+
"crop": false,
|
26 |
+
"crop_aspect": "square",
|
27 |
+
"crop_style": "center",
|
28 |
+
"resolution": 512,
|
29 |
+
"minimum_image_size": 512,
|
30 |
+
"maximum_image_size": 768,
|
31 |
+
"target_downsample_size": 512,
|
32 |
+
"resolution_type": "pixel",
|
33 |
+
"cache_dir_vae": "cache/vae/walter",
|
34 |
+
"instance_data_dir": "datasets/breaking-bad/walter",
|
35 |
+
"instance_prompt": "Walter White",
|
36 |
+
"disabled": false,
|
37 |
+
"skip_file_discovery": "",
|
38 |
+
"caption_strategy": "instanceprompt",
|
39 |
+
"metadata_backend": "json"
|
40 |
+
"repeats": 1
|
41 |
+
},
|
42 |
+
{
|
43 |
+
"id": "both",
|
44 |
+
"type": "local",
|
45 |
+
"crop": false,
|
46 |
+
"crop_aspect": "square",
|
47 |
+
"crop_style": "center",
|
48 |
+
"resolution": 512,
|
49 |
+
"minimum_image_size": 512,
|
50 |
+
"maximum_image_size": 768,
|
51 |
+
"target_downsample_size": 512,
|
52 |
+
"resolution_type": "pixel",
|
53 |
+
"cache_dir_vae": "cache/vae/both",
|
54 |
+
"instance_data_dir": "datasets/breaking-bad/both",
|
55 |
+
"instance_prompt": "Jesse Pinkman and Walter White",
|
56 |
+
"disabled": false,
|
57 |
+
"skip_file_discovery": "",
|
58 |
+
"caption_strategy": "instanceprompt",
|
59 |
+
"metadata_backend": "json"
|
60 |
+
},
|
61 |
+
{
|
62 |
+
"id": "text-embeds",
|
63 |
+
"type": "local",
|
64 |
+
"dataset_type": "text_embeds",
|
65 |
+
"default": true,
|
66 |
+
"cache_dir": "cache/text/flux/breaking-bad",
|
67 |
+
"disabled": false,
|
68 |
+
"write_batch_size": 128
|
69 |
+
"repeats": 2
|
70 |
+
},
|
71 |
+
]
|
config.env
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export MODEL_TYPE='lora'
|
2 |
+
export TRAINING_SEED=420
|
3 |
+
|
4 |
+
export CHECKPOINTING_STEPS=500
|
5 |
+
export CHECKPOINTING_LIMIT=10
|
6 |
+
|
7 |
+
export LEARNING_RATE=1e-4
|
8 |
+
|
9 |
+
export FLUX=true
|
10 |
+
export MODEL_NAME="black-forest-labs/FLUX.1-dev"
|
11 |
+
|
12 |
+
export VALIDATION_SEED=420
|
13 |
+
export VALIDATION_PROMPT="a photograph of Walter White and Jesse Pinkman"
|
14 |
+
export VALIDATION_NEGATIVE_PROMPT=""
|
15 |
+
|
16 |
+
# How frequently we will save and run a pipeline for validations.
|
17 |
+
export VALIDATION_STEPS=500
|
18 |
+
|
19 |
+
# Validation image settings.
|
20 |
+
export VALIDATION_GUIDANCE=3.5
|
21 |
+
export VALIDATION_GUIDANCE_REAL=1.0
|
22 |
+
export VALIDATION_NUM_INFERENCE_STEPS=28
|
23 |
+
export VALIDATION_GUIDANCE_RESCALE=0
|
24 |
+
export VALIDATION_RESOLUTION=1024x1024
|
25 |
+
|
26 |
+
export ALLOW_TF32=true
|
27 |
+
export PURE_BF16=true
|
28 |
+
|
29 |
+
export CAPTION_DROPOUT_PROBABILITY=0
|
30 |
+
|
31 |
+
export MAX_NUM_STEPS=0
|
32 |
+
export NUM_EPOCHS=1000
|
33 |
+
|
34 |
+
export OPTIMIZER="adamw_bf16"
|
35 |
+
export LR_SCHEDULE="constant"
|
36 |
+
export LR_WARMUP_STEPS=500
|
37 |
+
|
38 |
+
export TRAIN_BATCH_SIZE=1
|
39 |
+
|
40 |
+
export RESOLUTION=512
|
41 |
+
export RESOLUTION_TYPE=pixel
|
42 |
+
|
43 |
+
export GRADIENT_ACCUMULATION_STEPS=2
|
44 |
+
export MIXED_PRECISION="bf16"
|
45 |
+
export TRAINING_DYNAMO_BACKEND='inductor'
|
46 |
+
|
47 |
+
export USE_XFORMERS=false
|
48 |
+
export USE_GRADIENT_CHECKPOINTING=true
|
49 |
+
export VAE_BATCH_SIZE=8
|
50 |
+
export TRAINER_EXTRA_ARGS="--max_grad_norm=1.0 --gradient_precision=fp32 --base_model_default_dtype=bf16 --lora_init_type=default --flux_lora_target=all+ffs --flux_guidance_value=1 --user_prompt_library=user_prompt_library.json"
|
51 |
+
|
52 |
+
export USE_EMA=false
|
user_prompt_library.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"jesse": "a photo of Jesse Pinkman",
|
3 |
+
"walter": "a photo of Walter White",
|
4 |
+
"both": "a photo of Jesse Pinkman and Walter White"
|
5 |
+
}
|