grafit23 commited on
Commit
af50d2d
·
verified ·
1 Parent(s): 78a0bae

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +95 -0
  2. data/.ipynb_checkpoints/README-checkpoint.md +156 -0
  3. data/README.md +156 -0
  4. data/all_image_files_train-edited-images.json +0 -0
  5. data/all_image_files_train-reference-images.json +0 -0
  6. data/all_image_files_val-edited-images.json +1 -0
  7. data/all_image_files_val-reference-images.json +1 -0
  8. data/all_text_cache_files_text-embed-cache.json +0 -0
  9. data/all_vae_cache_files_train-edited-images.json +1 -0
  10. data/all_vae_cache_files_train-reference-images.json +1 -0
  11. data/all_vae_cache_files_val-edited-images.json +1 -0
  12. data/all_vae_cache_files_val-reference-images.json +1 -0
  13. data/assets/.ipynb_checkpoints/image_0_0-checkpoint.png +3 -0
  14. data/assets/image_0_0.png +3 -0
  15. data/assets/image_1_0.png +3 -0
  16. data/assets/image_2_0.png +3 -0
  17. data/assets/image_3_0.png +3 -0
  18. data/benchmarks/base_model/.ipynb_checkpoints/val-edited-images_0_1024x1024-checkpoint.png +3 -0
  19. data/benchmarks/base_model/val-edited-images_0_1024x1024.png +3 -0
  20. data/benchmarks/base_model/val-edited-images_1_1024x1024.png +3 -0
  21. data/benchmarks/base_model/val-edited-images_2_1024x1024.png +3 -0
  22. data/benchmarks/base_model/val-edited-images_3_1024x1024.png +3 -0
  23. data/pytorch_lora_weights.safetensors +3 -0
  24. data/simpletuner_config.json +318 -0
  25. data/validation_images/.ipynb_checkpoints/step_1000_val-edited-images_1_1024x1024-checkpoint.png +3 -0
  26. data/validation_images/step_0_val-edited-images_0_1024x1024.png +3 -0
  27. data/validation_images/step_0_val-edited-images_1_1024x1024.png +3 -0
  28. data/validation_images/step_0_val-edited-images_2_1024x1024.png +3 -0
  29. data/validation_images/step_0_val-edited-images_3_1024x1024.png +3 -0
  30. data/validation_images/step_10000_val-edited-images_0_1024x1024.png +3 -0
  31. data/validation_images/step_10000_val-edited-images_1_1024x1024.png +3 -0
  32. data/validation_images/step_10000_val-edited-images_2_1024x1024.png +3 -0
  33. data/validation_images/step_10000_val-edited-images_3_1024x1024.png +3 -0
  34. data/validation_images/step_1000_val-edited-images_0_1024x1024.png +3 -0
  35. data/validation_images/step_1000_val-edited-images_1_1024x1024.png +3 -0
  36. data/validation_images/step_1000_val-edited-images_2_1024x1024.png +3 -0
  37. data/validation_images/step_1000_val-edited-images_3_1024x1024.png +3 -0
  38. data/validation_images/step_11000_val-edited-images_0_1024x1024.png +3 -0
  39. data/validation_images/step_11000_val-edited-images_1_1024x1024.png +3 -0
  40. data/validation_images/step_11000_val-edited-images_2_1024x1024.png +3 -0
  41. data/validation_images/step_11000_val-edited-images_3_1024x1024.png +3 -0
  42. data/validation_images/step_12000_val-edited-images_0_1024x1024.png +3 -0
  43. data/validation_images/step_12000_val-edited-images_1_1024x1024.png +3 -0
  44. data/validation_images/step_12000_val-edited-images_2_1024x1024.png +3 -0
  45. data/validation_images/step_12000_val-edited-images_3_1024x1024.png +3 -0
  46. data/validation_images/step_13000_val-edited-images_0_1024x1024.png +3 -0
  47. data/validation_images/step_13000_val-edited-images_1_1024x1024.png +3 -0
  48. data/validation_images/step_13000_val-edited-images_2_1024x1024.png +3 -0
  49. data/validation_images/step_13000_val-edited-images_3_1024x1024.png +3 -0
  50. data/validation_images/step_14000_val-edited-images_0_1024x1024.png +3 -0
.gitattributes CHANGED
@@ -33,3 +33,98 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ data/assets/.ipynb_checkpoints/image_0_0-checkpoint.png filter=lfs diff=lfs merge=lfs -text
37
+ data/assets/image_0_0.png filter=lfs diff=lfs merge=lfs -text
38
+ data/assets/image_1_0.png filter=lfs diff=lfs merge=lfs -text
39
+ data/assets/image_2_0.png filter=lfs diff=lfs merge=lfs -text
40
+ data/assets/image_3_0.png filter=lfs diff=lfs merge=lfs -text
41
+ data/benchmarks/base_model/.ipynb_checkpoints/val-edited-images_0_1024x1024-checkpoint.png filter=lfs diff=lfs merge=lfs -text
42
+ data/benchmarks/base_model/val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
43
+ data/benchmarks/base_model/val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
44
+ data/benchmarks/base_model/val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
45
+ data/benchmarks/base_model/val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
46
+ data/validation_images/.ipynb_checkpoints/step_1000_val-edited-images_1_1024x1024-checkpoint.png filter=lfs diff=lfs merge=lfs -text
47
+ data/validation_images/step_0_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
48
+ data/validation_images/step_0_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
49
+ data/validation_images/step_0_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
50
+ data/validation_images/step_0_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
51
+ data/validation_images/step_10000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
52
+ data/validation_images/step_10000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
53
+ data/validation_images/step_10000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
54
+ data/validation_images/step_10000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
55
+ data/validation_images/step_1000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
56
+ data/validation_images/step_1000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
57
+ data/validation_images/step_1000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
58
+ data/validation_images/step_1000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
59
+ data/validation_images/step_11000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
60
+ data/validation_images/step_11000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
61
+ data/validation_images/step_11000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
62
+ data/validation_images/step_11000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
63
+ data/validation_images/step_12000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
64
+ data/validation_images/step_12000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
65
+ data/validation_images/step_12000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
66
+ data/validation_images/step_12000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
67
+ data/validation_images/step_13000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
68
+ data/validation_images/step_13000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
69
+ data/validation_images/step_13000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
70
+ data/validation_images/step_13000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
71
+ data/validation_images/step_14000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
72
+ data/validation_images/step_14000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
73
+ data/validation_images/step_14000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
74
+ data/validation_images/step_14000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
75
+ data/validation_images/step_15000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
76
+ data/validation_images/step_15000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
77
+ data/validation_images/step_15000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
78
+ data/validation_images/step_15000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
79
+ data/validation_images/step_16000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
80
+ data/validation_images/step_16000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
81
+ data/validation_images/step_16000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
82
+ data/validation_images/step_16000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
83
+ data/validation_images/step_17000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
84
+ data/validation_images/step_17000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
85
+ data/validation_images/step_17000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
86
+ data/validation_images/step_17000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
87
+ data/validation_images/step_18000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
88
+ data/validation_images/step_18000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
89
+ data/validation_images/step_18000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
90
+ data/validation_images/step_18000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
91
+ data/validation_images/step_19000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
92
+ data/validation_images/step_19000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
93
+ data/validation_images/step_19000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
94
+ data/validation_images/step_19000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
95
+ data/validation_images/step_20000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
96
+ data/validation_images/step_20000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
97
+ data/validation_images/step_20000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
98
+ data/validation_images/step_20000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
99
+ data/validation_images/step_2000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
100
+ data/validation_images/step_2000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
101
+ data/validation_images/step_2000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
102
+ data/validation_images/step_2000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
103
+ data/validation_images/step_3000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
104
+ data/validation_images/step_3000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
105
+ data/validation_images/step_3000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
106
+ data/validation_images/step_3000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
107
+ data/validation_images/step_4000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
108
+ data/validation_images/step_4000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
109
+ data/validation_images/step_4000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
110
+ data/validation_images/step_4000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
111
+ data/validation_images/step_5000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
112
+ data/validation_images/step_5000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
113
+ data/validation_images/step_5000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
114
+ data/validation_images/step_5000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
115
+ data/validation_images/step_6000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
116
+ data/validation_images/step_6000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
117
+ data/validation_images/step_6000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
118
+ data/validation_images/step_6000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
119
+ data/validation_images/step_7000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
120
+ data/validation_images/step_7000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
121
+ data/validation_images/step_7000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
122
+ data/validation_images/step_7000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
123
+ data/validation_images/step_8000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
124
+ data/validation_images/step_8000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
125
+ data/validation_images/step_8000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
126
+ data/validation_images/step_8000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
127
+ data/validation_images/step_9000_val-edited-images_0_1024x1024.png filter=lfs diff=lfs merge=lfs -text
128
+ data/validation_images/step_9000_val-edited-images_1_1024x1024.png filter=lfs diff=lfs merge=lfs -text
129
+ data/validation_images/step_9000_val-edited-images_2_1024x1024.png filter=lfs diff=lfs merge=lfs -text
130
+ data/validation_images/step_9000_val-edited-images_3_1024x1024.png filter=lfs diff=lfs merge=lfs -text
data/.ipynb_checkpoints/README-checkpoint.md ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: "black-forest-labs/FLUX.1-Kontext-dev"
4
+ tags:
5
+ - flux
6
+ - flux-diffusers
7
+ - text-to-image
8
+ - image-to-image
9
+ - diffusers
10
+ - simpletuner
11
+ - not-for-all-audiences
12
+ - lora
13
+
14
+ - template:sd-lora
15
+ - standard
16
+ pipeline_tag: text-to-image
17
+ inference: true
18
+ widget:
19
+ - text: 'unconditional (blank prompt)'
20
+ parameters:
21
+ negative_prompt: 'blurry, cropped, ugly'
22
+ output:
23
+ url: ./assets/image_0_0.png
24
+ - text: 'prompt not found (1)'
25
+ parameters:
26
+ negative_prompt: 'blurry, cropped, ugly'
27
+ output:
28
+ url: ./assets/image_1_0.png
29
+ - text: 'prompt not found (2)'
30
+ parameters:
31
+ negative_prompt: 'blurry, cropped, ugly'
32
+ output:
33
+ url: ./assets/image_2_0.png
34
+ - text: 'prompt not found (3)'
35
+ parameters:
36
+ negative_prompt: 'blurry, cropped, ugly'
37
+ output:
38
+ url: ./assets/image_3_0.png
39
+ ---
40
+
41
+ # color-match-kontext-training
42
+
43
+ This is a PEFT LoRA derived from [black-forest-labs/FLUX.1-Kontext-dev](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev).
44
+
45
+ No validation prompt was used during training.
46
+
47
+ None
48
+
49
+
50
+
51
+ ## Validation settings
52
+ - CFG: `2.5`
53
+ - CFG Rescale: `0.0`
54
+ - Steps: `28`
55
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
56
+ - Seed: `42`
57
+ - Resolution: `1024x1024`
58
+ - Skip-layer guidance:
59
+
60
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
61
+
62
+ You can find some example images in the following gallery:
63
+
64
+
65
+ <Gallery />
66
+
67
+ The text encoder **was not** trained.
68
+ You may reuse the base model text encoder for inference.
69
+
70
+
71
+ ## Training settings
72
+
73
+ - Training epochs: 0
74
+ - Training steps: 20000
75
+ - Learning rate: 1e-05
76
+ - Learning rate schedule: polynomial
77
+ - Warmup steps: 200
78
+ - Max grad value: 2.0
79
+ - Effective batch size: 2
80
+ - Micro-batch size: 2
81
+ - Gradient accumulation steps: 1
82
+ - Number of GPUs: 1
83
+ - Gradient checkpointing: True
84
+ - Prediction type: flow_matching (extra parameters=['flow_schedule_auto_shift', 'shift=0.0', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flux_lora_target=all'])
85
+ - Optimizer: optimi-lion
86
+ - Trainable parameter precision: Pure BF16
87
+ - Base model precision: `no_change`
88
+ - Caption dropout probability: 0.0%
89
+
90
+
91
+ - LoRA Rank: 768
92
+ - LoRA Alpha: None
93
+ - LoRA Dropout: 0.1
94
+ - LoRA initialisation style: default
95
+ - LoRA mode: Standard
96
+
97
+
98
+ ## Datasets
99
+
100
+ ### val-edited-images
101
+ - Repeats: 0
102
+ - Total number of images: 10
103
+ - Total number of aspect buckets: 1
104
+ - Resolution: 1.048576 megapixels
105
+ - Cropped: False
106
+ - Crop style: None
107
+ - Crop aspect: None
108
+ - Used for regularisation data: No
109
+ ### train-edited-images
110
+ - Repeats: 0
111
+ - Total number of images: 100000
112
+ - Total number of aspect buckets: 1
113
+ - Resolution: 0.262144 megapixels
114
+ - Cropped: False
115
+ - Crop style: None
116
+ - Crop aspect: None
117
+ - Used for regularisation data: No
118
+
119
+
120
+ ## Inference
121
+
122
+
123
+ ```python
124
+ import torch
125
+ from diffusers import DiffusionPipeline
126
+
127
+ model_id = 'black-forest-labs/FLUX.1-Kontext-dev'
128
+ adapter_id = 'color-match-kontext-training'
129
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
130
+ pipeline.load_lora_weights(adapter_id)
131
+
132
+ prompt = "An astronaut is riding a horse through the jungles of Thailand."
133
+
134
+
135
+ ## Optional: quantise the model to save on vram.
136
+ ## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
137
+ #from optimum.quanto import quantize, freeze, qint8
138
+ #quantize(pipeline.transformer, weights=qint8)
139
+ #freeze(pipeline.transformer)
140
+
141
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # the pipeline is already in its target precision level
142
+ model_output = pipeline(
143
+ prompt=prompt,
144
+ num_inference_steps=28,
145
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
146
+ width=1024,
147
+ height=1024,
148
+ guidance_scale=2.5,
149
+ ).images[0]
150
+
151
+ model_output.save("output.png", format="PNG")
152
+
153
+ ```
154
+
155
+
156
+
data/README.md ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: "black-forest-labs/FLUX.1-Kontext-dev"
4
+ tags:
5
+ - flux
6
+ - flux-diffusers
7
+ - text-to-image
8
+ - image-to-image
9
+ - diffusers
10
+ - simpletuner
11
+ - not-for-all-audiences
12
+ - lora
13
+
14
+ - template:sd-lora
15
+ - standard
16
+ pipeline_tag: text-to-image
17
+ inference: true
18
+ widget:
19
+ - text: 'unconditional (blank prompt)'
20
+ parameters:
21
+ negative_prompt: 'blurry, cropped, ugly'
22
+ output:
23
+ url: ./assets/image_0_0.png
24
+ - text: 'prompt not found (1)'
25
+ parameters:
26
+ negative_prompt: 'blurry, cropped, ugly'
27
+ output:
28
+ url: ./assets/image_1_0.png
29
+ - text: 'prompt not found (2)'
30
+ parameters:
31
+ negative_prompt: 'blurry, cropped, ugly'
32
+ output:
33
+ url: ./assets/image_2_0.png
34
+ - text: 'prompt not found (3)'
35
+ parameters:
36
+ negative_prompt: 'blurry, cropped, ugly'
37
+ output:
38
+ url: ./assets/image_3_0.png
39
+ ---
40
+
41
+ # color-match-kontext-training
42
+
43
+ This is a PEFT LoRA derived from [black-forest-labs/FLUX.1-Kontext-dev](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev).
44
+
45
+ No validation prompt was used during training.
46
+
47
+ None
48
+
49
+
50
+
51
+ ## Validation settings
52
+ - CFG: `2.5`
53
+ - CFG Rescale: `0.0`
54
+ - Steps: `28`
55
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
56
+ - Seed: `42`
57
+ - Resolution: `1024x1024`
58
+ - Skip-layer guidance:
59
+
60
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
61
+
62
+ You can find some example images in the following gallery:
63
+
64
+
65
+ <Gallery />
66
+
67
+ The text encoder **was not** trained.
68
+ You may reuse the base model text encoder for inference.
69
+
70
+
71
+ ## Training settings
72
+
73
+ - Training epochs: 0
74
+ - Training steps: 20000
75
+ - Learning rate: 1e-05
76
+ - Learning rate schedule: polynomial
77
+ - Warmup steps: 200
78
+ - Max grad value: 2.0
79
+ - Effective batch size: 2
80
+ - Micro-batch size: 2
81
+ - Gradient accumulation steps: 1
82
+ - Number of GPUs: 1
83
+ - Gradient checkpointing: True
84
+ - Prediction type: flow_matching (extra parameters=['flow_schedule_auto_shift', 'shift=0.0', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flux_lora_target=all'])
85
+ - Optimizer: optimi-lion
86
+ - Trainable parameter precision: Pure BF16
87
+ - Base model precision: `no_change`
88
+ - Caption dropout probability: 0.0%
89
+
90
+
91
+ - LoRA Rank: 768
92
+ - LoRA Alpha: None
93
+ - LoRA Dropout: 0.1
94
+ - LoRA initialisation style: default
95
+ - LoRA mode: Standard
96
+
97
+
98
+ ## Datasets
99
+
100
+ ### val-edited-images
101
+ - Repeats: 0
102
+ - Total number of images: 10
103
+ - Total number of aspect buckets: 1
104
+ - Resolution: 1.048576 megapixels
105
+ - Cropped: False
106
+ - Crop style: None
107
+ - Crop aspect: None
108
+ - Used for regularisation data: No
109
+ ### train-edited-images
110
+ - Repeats: 0
111
+ - Total number of images: 100000
112
+ - Total number of aspect buckets: 1
113
+ - Resolution: 0.262144 megapixels
114
+ - Cropped: False
115
+ - Crop style: None
116
+ - Crop aspect: None
117
+ - Used for regularisation data: No
118
+
119
+
120
+ ## Inference
121
+
122
+
123
+ ```python
124
+ import torch
125
+ from diffusers import DiffusionPipeline
126
+
127
+ model_id = 'black-forest-labs/FLUX.1-Kontext-dev'
128
+ adapter_id = 'color-match-kontext-training'
129
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
130
+ pipeline.load_lora_weights(adapter_id)
131
+
132
+ prompt = "An astronaut is riding a horse through the jungles of Thailand."
133
+
134
+
135
+ ## Optional: quantise the model to save on vram.
136
+ ## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
137
+ #from optimum.quanto import quantize, freeze, qint8
138
+ #quantize(pipeline.transformer, weights=qint8)
139
+ #freeze(pipeline.transformer)
140
+
141
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # the pipeline is already in its target precision level
142
+ model_output = pipeline(
143
+ prompt=prompt,
144
+ num_inference_steps=28,
145
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
146
+ width=1024,
147
+ height=1024,
148
+ guidance_scale=2.5,
149
+ ).images[0]
150
+
151
+ model_output.save("output.png", format="PNG")
152
+
153
+ ```
154
+
155
+
156
+
data/all_image_files_train-edited-images.json ADDED
The diff for this file is too large to render. See raw diff
 
data/all_image_files_train-reference-images.json ADDED
The diff for this file is too large to render. See raw diff
 
data/all_image_files_val-edited-images.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000005.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000009.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000003.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000006.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000008.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000004.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000002.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000001.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000007.png": false, "/workspace/logo_color_match/data/logo-icons/val/edited-images/img-000000.png": false}
data/all_image_files_val-reference-images.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000009.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000003.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000008.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000005.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000004.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000006.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000001.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000000.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000002.png": false, "/workspace/logo_color_match/data/logo-icons/val/reference-images/img-000007.png": false}
data/all_text_cache_files_text-embed-cache.json ADDED
The diff for this file is too large to render. See raw diff
 
data/all_vae_cache_files_train-edited-images.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {}
data/all_vae_cache_files_train-reference-images.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {}
data/all_vae_cache_files_val-edited-images.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/d0a8d8c5c9ebf7e55679d601fa688e1f4d577fd8833a695f07c368996dae2be6.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/6ab5676f80cb2908475fa3cf796faccc252ef24212c8faaf9e29a2f205b6db90.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/9598fa80366a9421938165b5f699bdaaea54ec4091d72d3f0d11947f665e5530.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/69881e6b4eed930c4e55612c2fe191d715c3eb9d3db1aa54b96bd0684e49d425.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/5dafb8dd1849bce3e069e5c4b54558db9ec62340d6dd923bd7415306ac0c8343.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/093c212d1f02bd1d8e5f19394949dfee746c299f5ef82ae0dbfb557fa9da4844.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/8988545e256e266ea8b79c50ae0b4f0e6f1f06fded901944f4016a8c50fb6671.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/1b427175668fd057273d4525f77b44e920182415f99cdd361b560ce100f62ea6.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/29634eb07d7a73ad3aa122f2a9ca6b285e432572450934802324cb851bb035ee.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/edit-images/ce8ff2eed47ff980d29ca1e5a46ad80fd6e92d3060c3c831e5dff563431aac2e.pt": false}
data/all_vae_cache_files_val-reference-images.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/69881e6b4eed930c4e55612c2fe191d715c3eb9d3db1aa54b96bd0684e49d425.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/5dafb8dd1849bce3e069e5c4b54558db9ec62340d6dd923bd7415306ac0c8343.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/6ab5676f80cb2908475fa3cf796faccc252ef24212c8faaf9e29a2f205b6db90.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/ce8ff2eed47ff980d29ca1e5a46ad80fd6e92d3060c3c831e5dff563431aac2e.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/8988545e256e266ea8b79c50ae0b4f0e6f1f06fded901944f4016a8c50fb6671.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/d0a8d8c5c9ebf7e55679d601fa688e1f4d577fd8833a695f07c368996dae2be6.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/9598fa80366a9421938165b5f699bdaaea54ec4091d72d3f0d11947f665e5530.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/1b427175668fd057273d4525f77b44e920182415f99cdd361b560ce100f62ea6.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/093c212d1f02bd1d8e5f19394949dfee746c299f5ef82ae0dbfb557fa9da4844.pt": false, "/workspace/logo_color_match/data/logo-icons/val/cache/vae/flux/kontext/ref-images/29634eb07d7a73ad3aa122f2a9ca6b285e432572450934802324cb851bb035ee.pt": false}
data/assets/.ipynb_checkpoints/image_0_0-checkpoint.png ADDED

Git LFS Details

  • SHA256: a18177208c0c3c359169f5c9043be05aa4d1a61b54b90e4a0d3eede5b0672540
  • Pointer size: 131 Bytes
  • Size of remote file: 555 kB
data/assets/image_0_0.png ADDED

Git LFS Details

  • SHA256: a18177208c0c3c359169f5c9043be05aa4d1a61b54b90e4a0d3eede5b0672540
  • Pointer size: 131 Bytes
  • Size of remote file: 555 kB
data/assets/image_1_0.png ADDED

Git LFS Details

  • SHA256: 6290e261a111fd5da1d3b11513fe800a44b052bd829b090be16ac507a11aab05
  • Pointer size: 131 Bytes
  • Size of remote file: 592 kB
data/assets/image_2_0.png ADDED

Git LFS Details

  • SHA256: a9a5f71b72f2c572b9befd91374d555379e0a849c5a6d29905a897afaff9a2d6
  • Pointer size: 131 Bytes
  • Size of remote file: 640 kB
data/assets/image_3_0.png ADDED

Git LFS Details

  • SHA256: a5864577aabcdc7ebe2bc1854c0e658ac92301cf222fd679ae93c5dbaf710a07
  • Pointer size: 131 Bytes
  • Size of remote file: 782 kB
data/benchmarks/base_model/.ipynb_checkpoints/val-edited-images_0_1024x1024-checkpoint.png ADDED

Git LFS Details

  • SHA256: 84ddd9775eb57709e981b63a9a3fe96a0def5467999eaa42db1ebc8876d14780
  • Pointer size: 131 Bytes
  • Size of remote file: 270 kB
data/benchmarks/base_model/val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: 84ddd9775eb57709e981b63a9a3fe96a0def5467999eaa42db1ebc8876d14780
  • Pointer size: 131 Bytes
  • Size of remote file: 270 kB
data/benchmarks/base_model/val-edited-images_1_1024x1024.png ADDED

Git LFS Details

  • SHA256: 67984c90e15257c0b73ba0f473b210b2c5df14a2a0da809e48fd6ae17fbc0e1a
  • Pointer size: 131 Bytes
  • Size of remote file: 262 kB
data/benchmarks/base_model/val-edited-images_2_1024x1024.png ADDED

Git LFS Details

  • SHA256: 63c98cde0a268670c8722926f124feae31571b5c0915b4ad9924cf794e67a429
  • Pointer size: 131 Bytes
  • Size of remote file: 194 kB
data/benchmarks/base_model/val-edited-images_3_1024x1024.png ADDED

Git LFS Details

  • SHA256: 2556a6afc2e8c2c34bdabe47e93733ca6149d0610cfd0bfcdb13b1ce766c8ea2
  • Pointer size: 131 Bytes
  • Size of remote file: 267 kB
data/pytorch_lora_weights.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2e0a0ae10a77cdca1fe6813ab803c272f012d075b05b29b8b29db46854a594e
3
+ size 1434478448
data/simpletuner_config.json ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "snr_gamma": null,
3
+ "use_soft_min_snr": false,
4
+ "soft_min_snr_sigma_data": null,
5
+ "model_family": "flux",
6
+ "model_flavour": "kontext",
7
+ "model_type": "lora",
8
+ "loss_type": "l2",
9
+ "huber_schedule": "snr",
10
+ "huber_c": 0.1,
11
+ "hidream_use_load_balancing_loss": false,
12
+ "hidream_load_balancing_loss_weight": null,
13
+ "flux_lora_target": "all",
14
+ "flow_sigmoid_scale": 1.0,
15
+ "flux_fast_schedule": false,
16
+ "flow_use_uniform_schedule": false,
17
+ "flow_use_beta_schedule": false,
18
+ "flow_beta_schedule_alpha": 2.0,
19
+ "flow_beta_schedule_beta": 2.0,
20
+ "flow_schedule_shift": 0.0,
21
+ "flow_schedule_auto_shift": true,
22
+ "flux_guidance_mode": "constant",
23
+ "flux_guidance_value": 1.0,
24
+ "flux_guidance_min": 0.0,
25
+ "flux_guidance_max": 4.0,
26
+ "flux_attention_masked_training": false,
27
+ "ltx_train_mode": "i2v",
28
+ "ltx_i2v_prob": 0.1,
29
+ "ltx_protect_first_frame": false,
30
+ "ltx_partial_noise_fraction": 0.05,
31
+ "t5_padding": "unmodified",
32
+ "sd3_clip_uncond_behaviour": "empty_string",
33
+ "sd3_t5_uncond_behaviour": null,
34
+ "lora_type": "standard",
35
+ "peft_lora_mode": "standard",
36
+ "singlora_ramp_up_steps": 0,
37
+ "lora_init_type": "default",
38
+ "init_lora": null,
39
+ "lora_rank": 768,
40
+ "lora_alpha": null,
41
+ "lora_dropout": 0.1,
42
+ "lycoris_config": "config/lycoris_config.json",
43
+ "init_lokr_norm": null,
44
+ "conditioning_multidataset_sampling": "random",
45
+ "control": false,
46
+ "controlnet": false,
47
+ "controlnet_custom_config": null,
48
+ "tread_config": null,
49
+ "controlnet_model_name_or_path": null,
50
+ "pretrained_model_name_or_path": "black-forest-labs/FLUX.1-Kontext-dev",
51
+ "pretrained_transformer_model_name_or_path": null,
52
+ "pretrained_transformer_subfolder": "transformer",
53
+ "pretrained_unet_model_name_or_path": null,
54
+ "pretrained_unet_subfolder": "unet",
55
+ "pretrained_vae_model_name_or_path": "black-forest-labs/FLUX.1-Kontext-dev",
56
+ "pretrained_t5_model_name_or_path": null,
57
+ "prediction_type": null,
58
+ "snr_weight": 1.0,
59
+ "training_scheduler_timestep_spacing": "trailing",
60
+ "inference_scheduler_timestep_spacing": "trailing",
61
+ "refiner_training": false,
62
+ "refiner_training_invert_schedule": false,
63
+ "refiner_training_strength": 0.2,
64
+ "timestep_bias_strategy": "none",
65
+ "timestep_bias_multiplier": 1.0,
66
+ "timestep_bias_begin": 0,
67
+ "timestep_bias_end": 1000,
68
+ "timestep_bias_portion": 0.25,
69
+ "disable_segmented_timestep_sampling": false,
70
+ "rescale_betas_zero_snr": false,
71
+ "vae_dtype": "bf16",
72
+ "vae_batch_size": 4,
73
+ "vae_enable_tiling": false,
74
+ "vae_enable_slicing": false,
75
+ "vae_cache_scan_behaviour": "recreate",
76
+ "vae_cache_ondemand": false,
77
+ "compress_disk_cache": false,
78
+ "aspect_bucket_disable_rebuild": false,
79
+ "keep_vae_loaded": false,
80
+ "skip_file_discovery": "",
81
+ "revision": null,
82
+ "variant": null,
83
+ "preserve_data_backend_cache": false,
84
+ "use_dora": false,
85
+ "override_dataset_config": false,
86
+ "cache_dir_text": "cache",
87
+ "cache_dir_vae": "",
88
+ "data_backend_config": "config/multidatabackend.json",
89
+ "data_backend_sampling": "auto-weighting",
90
+ "ignore_missing_files": false,
91
+ "write_batch_size": 128,
92
+ "read_batch_size": 25,
93
+ "image_processing_batch_size": 32,
94
+ "enable_multiprocessing": false,
95
+ "max_workers": 32,
96
+ "aws_max_pool_connections": 128,
97
+ "torch_num_threads": 8,
98
+ "dataloader_prefetch": false,
99
+ "dataloader_prefetch_qlen": 10,
100
+ "aspect_bucket_worker_count": 12,
101
+ "cache_dir": "output/models/cache",
102
+ "cache_clear_validation_prompts": false,
103
+ "caption_strategy": "filename",
104
+ "parquet_caption_column": null,
105
+ "parquet_filename_column": null,
106
+ "instance_prompt": null,
107
+ "output_dir": "output/models",
108
+ "seed": 42,
109
+ "seed_for_each_device": true,
110
+ "framerate": null,
111
+ "resolution": 1024,
112
+ "resolution_type": "pixel_area",
113
+ "aspect_bucket_rounding": 2,
114
+ "aspect_bucket_alignment": 64,
115
+ "minimum_image_size": null,
116
+ "maximum_image_size": null,
117
+ "target_downsample_size": null,
118
+ "train_text_encoder": false,
119
+ "tokenizer_max_length": 512,
120
+ "train_batch_size": 2,
121
+ "num_train_epochs": 1,
122
+ "max_train_steps": 20000,
123
+ "ignore_final_epochs": false,
124
+ "checkpointing_steps": 1000,
125
+ "checkpointing_rolling_steps": 0,
126
+ "checkpointing_use_tempdir": false,
127
+ "checkpoints_total_limit": 20,
128
+ "checkpoints_rolling_total_limit": 1,
129
+ "resume_from_checkpoint": null,
130
+ "gradient_accumulation_steps": 1,
131
+ "gradient_checkpointing": true,
132
+ "gradient_checkpointing_interval": null,
133
+ "learning_rate": 1e-05,
134
+ "text_encoder_lr": null,
135
+ "lr_scale": false,
136
+ "lr_scale_sqrt": false,
137
+ "lr_scheduler": "polynomial",
138
+ "lr_warmup_steps": 200,
139
+ "lr_num_cycles": 1,
140
+ "lr_power": 0.8,
141
+ "distillation_method": null,
142
+ "distillation_config": null,
143
+ "use_ema": false,
144
+ "ema_device": "cpu",
145
+ "ema_validation": "comparison",
146
+ "ema_cpu_only": false,
147
+ "ema_foreach_disable": false,
148
+ "ema_update_interval": null,
149
+ "ema_decay": 0.995,
150
+ "non_ema_revision": null,
151
+ "offload_during_startup": false,
152
+ "offload_param_path": null,
153
+ "optimizer": "optimi-lion",
154
+ "optimizer_config": null,
155
+ "optimizer_cpu_offload_method": "none",
156
+ "optimizer_offload_gradients": false,
157
+ "fuse_optimizer": false,
158
+ "optimizer_beta1": null,
159
+ "optimizer_beta2": null,
160
+ "optimizer_release_gradients": false,
161
+ "adam_beta1": 0.9,
162
+ "adam_beta2": 0.999,
163
+ "adam_weight_decay": 0.01,
164
+ "adam_epsilon": 1e-08,
165
+ "prodigy_steps": null,
166
+ "max_grad_norm": 2.0,
167
+ "grad_clip_method": "value",
168
+ "push_to_hub": false,
169
+ "push_checkpoints_to_hub": false,
170
+ "hub_model_id": null,
171
+ "model_card_note": null,
172
+ "model_card_safe_for_work": false,
173
+ "logging_dir": "output/models/logs",
174
+ "disable_benchmark": false,
175
+ "evaluation_type": null,
176
+ "eval_dataset_pooling": false,
177
+ "pretrained_evaluation_model_name_or_path": "openai/clip-vit-large-patch14-336",
178
+ "validation_on_startup": false,
179
+ "validation_seed_source": "cpu",
180
+ "validation_lycoris_strength": 1.0,
181
+ "validation_torch_compile": false,
182
+ "validation_torch_compile_mode": "max-autotune",
183
+ "validation_guidance_skip_layers": null,
184
+ "validation_guidance_skip_layers_start": 0.01,
185
+ "validation_guidance_skip_layers_stop": 0.2,
186
+ "validation_guidance_skip_scale": 2.8,
187
+ "sana_complex_human_instruction": [
188
+ "Given a user prompt, generate an 'Enhanced prompt' that provides detailed visual descriptions suitable for image generation. Evaluate the level of detail in the user prompt:",
189
+ "- If the prompt is simple, focus on adding specifics about colors, shapes, sizes, textures, and spatial relationships to create vivid and concrete scenes.",
190
+ "- Do not add detail that is not in the original prompt! Do not mention colors if the User Prompt does not!",
191
+ "- If the prompt is already detailed, refine and enhance the existing details slightly without overcomplicating.",
192
+ "- If the prompt contains explicit material, do not remove this information from the output, which would damage the performance of downstream classifiers.",
193
+ "Here are examples of how to transform or refine prompts:",
194
+ "- User Prompt: A cat sleeping -> Enhanced: A cat sleeping peacefully, showcasing the joy of pet ownership. Cute floof kitty cat gatto.",
195
+ "- User Prompt: A busy city street -> Enhanced: A bustling city street scene featuring a crowd of people.",
196
+ "Please generate only the enhanced description for the prompt below and avoid including any additional commentary or evaluations:",
197
+ "User Prompt: "
198
+ ],
199
+ "disable_tf32": false,
200
+ "validation_using_datasets": null,
201
+ "webhook_config": null,
202
+ "webhook_reporting_interval": null,
203
+ "report_to": "wandb",
204
+ "tracker_run_name": "test",
205
+ "tracker_project_name": "color-match-kontext-training",
206
+ "tracker_image_layout": "gallery",
207
+ "validation_prompt": null,
208
+ "validation_prompt_library": false,
209
+ "user_prompt_library": null,
210
+ "validation_negative_prompt": "blurry, cropped, ugly",
211
+ "num_validation_images": 1,
212
+ "validation_disable": false,
213
+ "validation_steps": 1000,
214
+ "validation_stitch_input_location": "left",
215
+ "eval_steps_interval": null,
216
+ "eval_timesteps": 28,
217
+ "num_eval_images": 4,
218
+ "eval_dataset_id": "val-edited-images",
219
+ "validation_num_inference_steps": 28,
220
+ "validation_num_video_frames": null,
221
+ "validation_resolution": "1024x1024",
222
+ "validation_noise_scheduler": null,
223
+ "validation_disable_unconditional": false,
224
+ "enable_watermark": false,
225
+ "mixed_precision": "bf16",
226
+ "gradient_precision": null,
227
+ "quantize_via": "accelerator",
228
+ "base_model_precision": "no_change",
229
+ "quantize_activations": false,
230
+ "base_model_default_dtype": "bf16",
231
+ "text_encoder_1_precision": "no_change",
232
+ "text_encoder_2_precision": "no_change",
233
+ "text_encoder_3_precision": "no_change",
234
+ "text_encoder_4_precision": "no_change",
235
+ "local_rank": -1,
236
+ "fuse_qkv_projections": true,
237
+ "attention_mechanism": "diffusers",
238
+ "sageattention_usage": "inference",
239
+ "set_grads_to_none": false,
240
+ "noise_offset": 0.1,
241
+ "noise_offset_probability": 0.25,
242
+ "masked_loss_probability": 1.0,
243
+ "validation_guidance": 2.5,
244
+ "validation_guidance_real": 1.0,
245
+ "validation_no_cfg_until_timestep": 2,
246
+ "validation_guidance_rescale": 0.0,
247
+ "validation_randomize": false,
248
+ "validation_seed": 42,
249
+ "fully_unload_text_encoder": false,
250
+ "freeze_encoder_before": 12,
251
+ "freeze_encoder_after": 17,
252
+ "freeze_encoder_strategy": "after",
253
+ "layer_freeze_strategy": "none",
254
+ "unet_attention_slice": false,
255
+ "print_filenames": false,
256
+ "print_sampler_statistics": false,
257
+ "metadata_update_interval": 3600,
258
+ "debug_aspect_buckets": false,
259
+ "debug_dataset_loader": false,
260
+ "freeze_encoder": true,
261
+ "save_text_encoder": false,
262
+ "text_encoder_limit": 25,
263
+ "prepend_instance_prompt": false,
264
+ "only_instance_prompt": false,
265
+ "data_aesthetic_score": 7.0,
266
+ "sdxl_refiner_uses_full_range": false,
267
+ "caption_dropout_probability": 0.0,
268
+ "delete_unwanted_images": false,
269
+ "delete_problematic_images": false,
270
+ "disable_bucket_pruning": false,
271
+ "offset_noise": false,
272
+ "input_perturbation": 0.0,
273
+ "input_perturbation_steps": 0,
274
+ "lr_end": "4e-7",
275
+ "i_know_what_i_am_doing": false,
276
+ "accelerator_cache_clear_interval": null,
277
+ "vae_path": "black-forest-labs/FLUX.1-Kontext-dev",
278
+ "accelerator_project_config": {
279
+ "project_dir": "output/models",
280
+ "logging_dir": "output/models/logs",
281
+ "automatic_checkpoint_naming": false,
282
+ "total_limit": null,
283
+ "iteration": 20,
284
+ "save_on_each_node": false
285
+ },
286
+ "process_group_kwargs": {
287
+ "backend": "nccl",
288
+ "init_method": null,
289
+ "timeout": "1:30:00"
290
+ },
291
+ "is_quantized": false,
292
+ "weight_dtype": "torch.bfloat16",
293
+ "disable_accelerator": false,
294
+ "lora_initialisation_style": true,
295
+ "model_type_label": "Flux.1",
296
+ "use_deepspeed_optimizer": false,
297
+ "use_deepspeed_scheduler": false,
298
+ "base_weight_dtype": "torch.bfloat16",
299
+ "is_quanto": false,
300
+ "is_torchao": false,
301
+ "is_bnb": false,
302
+ "flow_matching": true,
303
+ "vae_kwargs": {
304
+ "pretrained_model_name_or_path": "black-forest-labs/FLUX.1-Kontext-dev",
305
+ "subfolder": "vae",
306
+ "revision": null,
307
+ "force_upcast": false,
308
+ "variant": null
309
+ },
310
+ "enable_adamw_bf16": true,
311
+ "overrode_max_train_steps": false,
312
+ "total_num_batches": 50005,
313
+ "num_update_steps_per_epoch": 50005,
314
+ "total_batch_size": 2,
315
+ "is_schedulefree": false,
316
+ "is_lr_scheduler_disabled": false,
317
+ "total_steps_remaining_at_start": 20000
318
+ }
data/validation_images/.ipynb_checkpoints/step_1000_val-edited-images_1_1024x1024-checkpoint.png ADDED

Git LFS Details

  • SHA256: 564b57d233952b2e08aaa47c74b9681ab697b5e8c53a0fbe88b20bd653e8ce89
  • Pointer size: 131 Bytes
  • Size of remote file: 556 kB
data/validation_images/step_0_val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: 84ddd9775eb57709e981b63a9a3fe96a0def5467999eaa42db1ebc8876d14780
  • Pointer size: 131 Bytes
  • Size of remote file: 270 kB
data/validation_images/step_0_val-edited-images_1_1024x1024.png ADDED

Git LFS Details

  • SHA256: 67984c90e15257c0b73ba0f473b210b2c5df14a2a0da809e48fd6ae17fbc0e1a
  • Pointer size: 131 Bytes
  • Size of remote file: 262 kB
data/validation_images/step_0_val-edited-images_2_1024x1024.png ADDED

Git LFS Details

  • SHA256: 63c98cde0a268670c8722926f124feae31571b5c0915b4ad9924cf794e67a429
  • Pointer size: 131 Bytes
  • Size of remote file: 194 kB
data/validation_images/step_0_val-edited-images_3_1024x1024.png ADDED

Git LFS Details

  • SHA256: 2556a6afc2e8c2c34bdabe47e93733ca6149d0610cfd0bfcdb13b1ce766c8ea2
  • Pointer size: 131 Bytes
  • Size of remote file: 267 kB
data/validation_images/step_10000_val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: e13119d4a2d99d0ccbe7daeebc5d08ca648850036da66fb2b82f707f3b3e17ad
  • Pointer size: 131 Bytes
  • Size of remote file: 576 kB
data/validation_images/step_10000_val-edited-images_1_1024x1024.png ADDED

Git LFS Details

  • SHA256: b7005350c84a95650c1f46631cffba5f7707b5128df5d2ba66934cc15fb3ca17
  • Pointer size: 131 Bytes
  • Size of remote file: 489 kB
data/validation_images/step_10000_val-edited-images_2_1024x1024.png ADDED

Git LFS Details

  • SHA256: d87f01cb4e2fe1ececab10f0681bced4a83e453a806872fee290273bedc97b23
  • Pointer size: 131 Bytes
  • Size of remote file: 560 kB
data/validation_images/step_10000_val-edited-images_3_1024x1024.png ADDED

Git LFS Details

  • SHA256: aec576a785ac353233e559ea976b1d4417650488541d545b11e1eabb3956c695
  • Pointer size: 131 Bytes
  • Size of remote file: 772 kB
data/validation_images/step_1000_val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: f114624df8912ea74b672783ae70ee71b7b361dd324f98f8d42d4f1c594905e8
  • Pointer size: 131 Bytes
  • Size of remote file: 528 kB
data/validation_images/step_1000_val-edited-images_1_1024x1024.png ADDED

Git LFS Details

  • SHA256: 564b57d233952b2e08aaa47c74b9681ab697b5e8c53a0fbe88b20bd653e8ce89
  • Pointer size: 131 Bytes
  • Size of remote file: 556 kB
data/validation_images/step_1000_val-edited-images_2_1024x1024.png ADDED

Git LFS Details

  • SHA256: aa1b8778150bfe01d0b6ceb02c263682c4c564ddb90aa2cd2e67e9ecf508da1e
  • Pointer size: 131 Bytes
  • Size of remote file: 638 kB
data/validation_images/step_1000_val-edited-images_3_1024x1024.png ADDED

Git LFS Details

  • SHA256: f5aa580d93396d4ecbb7f0439be64e0f95303b142605314b3f116317010ad261
  • Pointer size: 131 Bytes
  • Size of remote file: 698 kB
data/validation_images/step_11000_val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: 70c0bb215f66f6520b584104650c8871b1ae7b8182d7b4cb1a825e38914d1701
  • Pointer size: 131 Bytes
  • Size of remote file: 559 kB
data/validation_images/step_11000_val-edited-images_1_1024x1024.png ADDED

Git LFS Details

  • SHA256: e485ca03c8bc8276e85fd7b353cf0ceae1431f7e3a557216e04ba3abc1685f20
  • Pointer size: 131 Bytes
  • Size of remote file: 589 kB
data/validation_images/step_11000_val-edited-images_2_1024x1024.png ADDED

Git LFS Details

  • SHA256: ccfc0c28a23d6188cf0d625b1cf4c5e8ae2baeea3e127456ca31d8c669f8d206
  • Pointer size: 131 Bytes
  • Size of remote file: 570 kB
data/validation_images/step_11000_val-edited-images_3_1024x1024.png ADDED

Git LFS Details

  • SHA256: e497c34bde0851c36fb3af6aacb9a9cb99b2f620a0d1460487460397c0596468
  • Pointer size: 131 Bytes
  • Size of remote file: 706 kB
data/validation_images/step_12000_val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: 633932afbc22b03a8f5a130a57f015781a92d0481120c2eea7bc9227081705e6
  • Pointer size: 131 Bytes
  • Size of remote file: 542 kB
data/validation_images/step_12000_val-edited-images_1_1024x1024.png ADDED

Git LFS Details

  • SHA256: a5c04e215cf7760715049f26e40cb042ae6e8f043aa2b62553fe88cd11d50fec
  • Pointer size: 131 Bytes
  • Size of remote file: 706 kB
data/validation_images/step_12000_val-edited-images_2_1024x1024.png ADDED

Git LFS Details

  • SHA256: 0fbb0885d39b6b16662939f83be39282b96e77609f7d8b74626ed19fd52b2f3d
  • Pointer size: 131 Bytes
  • Size of remote file: 601 kB
data/validation_images/step_12000_val-edited-images_3_1024x1024.png ADDED

Git LFS Details

  • SHA256: 9376490ac2368b2dac8ea70deee2e0dcc9cd496280beedb9154313c367190c97
  • Pointer size: 131 Bytes
  • Size of remote file: 833 kB
data/validation_images/step_13000_val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: 4e9b240de13417c141b73c29d3a6a1b0ccdc0bc934cc00983732aee4a7310b3c
  • Pointer size: 131 Bytes
  • Size of remote file: 565 kB
data/validation_images/step_13000_val-edited-images_1_1024x1024.png ADDED

Git LFS Details

  • SHA256: 4bbc7beef71a36c2e275e967ffa226e7725068f64fd4612a589f7275f8cd81a7
  • Pointer size: 131 Bytes
  • Size of remote file: 702 kB
data/validation_images/step_13000_val-edited-images_2_1024x1024.png ADDED

Git LFS Details

  • SHA256: d467b9288b7a252578c554b0a1dd56a5f482d0ba902c9177522961943d208dcd
  • Pointer size: 131 Bytes
  • Size of remote file: 561 kB
data/validation_images/step_13000_val-edited-images_3_1024x1024.png ADDED

Git LFS Details

  • SHA256: 06e0e3e4073db4b04147357f284b9789ced4a0bdc45203b96a290802b2a8e955
  • Pointer size: 131 Bytes
  • Size of remote file: 790 kB
data/validation_images/step_14000_val-edited-images_0_1024x1024.png ADDED

Git LFS Details

  • SHA256: c169c0f173dcd2380022a7297577282a9bd074fb7eb602f40348fbcfef9b549f
  • Pointer size: 131 Bytes
  • Size of remote file: 748 kB