feat: upload LoRA v2 weights (trained on quantized hf_snapped dataset)
Browse files- config.yaml +20 -111
- pytorch_lora_weights.comfyui.safetensors +3 -0
- pytorch_lora_weights.safetensors +2 -2
config.yaml
CHANGED
|
@@ -1,130 +1,36 @@
|
|
| 1 |
model:
|
| 2 |
pretrained_model_name: black-forest-labs/FLUX.2-klein-4B
|
| 3 |
dtype: bfloat16
|
| 4 |
-
enable_cpu_offload: true
|
| 5 |
lora:
|
| 6 |
rank: 64
|
| 7 |
alpha: 128
|
| 8 |
dropout: 0.0
|
| 9 |
target_modules:
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
-
|
| 22 |
-
- transformer_blocks.1.attn.to_q
|
| 23 |
-
- transformer_blocks.1.attn.to_k
|
| 24 |
-
- transformer_blocks.1.attn.to_v
|
| 25 |
-
- transformer_blocks.1.attn.to_out.0
|
| 26 |
-
- transformer_blocks.1.attn.add_q_proj
|
| 27 |
-
- transformer_blocks.1.attn.add_k_proj
|
| 28 |
-
- transformer_blocks.1.attn.add_v_proj
|
| 29 |
-
- transformer_blocks.1.attn.to_add_out
|
| 30 |
-
- transformer_blocks.1.ff.linear_in
|
| 31 |
-
- transformer_blocks.1.ff.linear_out
|
| 32 |
-
- transformer_blocks.1.ff_context.linear_in
|
| 33 |
-
- transformer_blocks.1.ff_context.linear_out
|
| 34 |
-
- transformer_blocks.2.attn.to_q
|
| 35 |
-
- transformer_blocks.2.attn.to_k
|
| 36 |
-
- transformer_blocks.2.attn.to_v
|
| 37 |
-
- transformer_blocks.2.attn.to_out.0
|
| 38 |
-
- transformer_blocks.2.attn.add_q_proj
|
| 39 |
-
- transformer_blocks.2.attn.add_k_proj
|
| 40 |
-
- transformer_blocks.2.attn.add_v_proj
|
| 41 |
-
- transformer_blocks.2.attn.to_add_out
|
| 42 |
-
- transformer_blocks.2.ff.linear_in
|
| 43 |
-
- transformer_blocks.2.ff.linear_out
|
| 44 |
-
- transformer_blocks.2.ff_context.linear_in
|
| 45 |
-
- transformer_blocks.2.ff_context.linear_out
|
| 46 |
-
- transformer_blocks.3.attn.to_q
|
| 47 |
-
- transformer_blocks.3.attn.to_k
|
| 48 |
-
- transformer_blocks.3.attn.to_v
|
| 49 |
-
- transformer_blocks.3.attn.to_out.0
|
| 50 |
-
- transformer_blocks.3.attn.add_q_proj
|
| 51 |
-
- transformer_blocks.3.attn.add_k_proj
|
| 52 |
-
- transformer_blocks.3.attn.add_v_proj
|
| 53 |
-
- transformer_blocks.3.attn.to_add_out
|
| 54 |
-
- transformer_blocks.3.ff.linear_in
|
| 55 |
-
- transformer_blocks.3.ff.linear_out
|
| 56 |
-
- transformer_blocks.3.ff_context.linear_in
|
| 57 |
-
- transformer_blocks.3.ff_context.linear_out
|
| 58 |
-
- transformer_blocks.4.attn.to_q
|
| 59 |
-
- transformer_blocks.4.attn.to_k
|
| 60 |
-
- transformer_blocks.4.attn.to_v
|
| 61 |
-
- transformer_blocks.4.attn.to_out.0
|
| 62 |
-
- transformer_blocks.4.attn.add_q_proj
|
| 63 |
-
- transformer_blocks.4.attn.add_k_proj
|
| 64 |
-
- transformer_blocks.4.attn.add_v_proj
|
| 65 |
-
- transformer_blocks.4.attn.to_add_out
|
| 66 |
-
- transformer_blocks.4.ff.linear_in
|
| 67 |
-
- transformer_blocks.4.ff.linear_out
|
| 68 |
-
- transformer_blocks.4.ff_context.linear_in
|
| 69 |
-
- transformer_blocks.4.ff_context.linear_out
|
| 70 |
-
- single_transformer_blocks.0.attn.to_qkv_mlp_proj
|
| 71 |
-
- single_transformer_blocks.0.attn.to_out
|
| 72 |
-
- single_transformer_blocks.1.attn.to_qkv_mlp_proj
|
| 73 |
-
- single_transformer_blocks.1.attn.to_out
|
| 74 |
-
- single_transformer_blocks.2.attn.to_qkv_mlp_proj
|
| 75 |
-
- single_transformer_blocks.2.attn.to_out
|
| 76 |
-
- single_transformer_blocks.3.attn.to_qkv_mlp_proj
|
| 77 |
-
- single_transformer_blocks.3.attn.to_out
|
| 78 |
-
- single_transformer_blocks.4.attn.to_qkv_mlp_proj
|
| 79 |
-
- single_transformer_blocks.4.attn.to_out
|
| 80 |
-
- single_transformer_blocks.5.attn.to_qkv_mlp_proj
|
| 81 |
-
- single_transformer_blocks.5.attn.to_out
|
| 82 |
-
- single_transformer_blocks.6.attn.to_qkv_mlp_proj
|
| 83 |
-
- single_transformer_blocks.6.attn.to_out
|
| 84 |
-
- single_transformer_blocks.7.attn.to_qkv_mlp_proj
|
| 85 |
-
- single_transformer_blocks.7.attn.to_out
|
| 86 |
-
- single_transformer_blocks.8.attn.to_qkv_mlp_proj
|
| 87 |
-
- single_transformer_blocks.8.attn.to_out
|
| 88 |
-
- single_transformer_blocks.9.attn.to_qkv_mlp_proj
|
| 89 |
-
- single_transformer_blocks.9.attn.to_out
|
| 90 |
-
- single_transformer_blocks.10.attn.to_qkv_mlp_proj
|
| 91 |
-
- single_transformer_blocks.10.attn.to_out
|
| 92 |
-
- single_transformer_blocks.11.attn.to_qkv_mlp_proj
|
| 93 |
-
- single_transformer_blocks.11.attn.to_out
|
| 94 |
-
- single_transformer_blocks.12.attn.to_qkv_mlp_proj
|
| 95 |
-
- single_transformer_blocks.12.attn.to_out
|
| 96 |
-
- single_transformer_blocks.13.attn.to_qkv_mlp_proj
|
| 97 |
-
- single_transformer_blocks.13.attn.to_out
|
| 98 |
-
- single_transformer_blocks.14.attn.to_qkv_mlp_proj
|
| 99 |
-
- single_transformer_blocks.14.attn.to_out
|
| 100 |
-
- single_transformer_blocks.15.attn.to_qkv_mlp_proj
|
| 101 |
-
- single_transformer_blocks.15.attn.to_out
|
| 102 |
-
- single_transformer_blocks.16.attn.to_qkv_mlp_proj
|
| 103 |
-
- single_transformer_blocks.16.attn.to_out
|
| 104 |
-
- single_transformer_blocks.17.attn.to_qkv_mlp_proj
|
| 105 |
-
- single_transformer_blocks.17.attn.to_out
|
| 106 |
-
- single_transformer_blocks.18.attn.to_qkv_mlp_proj
|
| 107 |
-
- single_transformer_blocks.18.attn.to_out
|
| 108 |
-
- single_transformer_blocks.19.attn.to_qkv_mlp_proj
|
| 109 |
-
- single_transformer_blocks.19.attn.to_out
|
| 110 |
-
- time_guidance_embed.timestep_embedder.linear_1
|
| 111 |
-
- time_guidance_embed.timestep_embedder.linear_2
|
| 112 |
-
- double_stream_modulation_img.linear
|
| 113 |
-
- double_stream_modulation_txt.linear
|
| 114 |
-
- x_embedder
|
| 115 |
- context_embedder
|
|
|
|
| 116 |
- single_stream_modulation.linear
|
| 117 |
-
-
|
| 118 |
-
-
|
| 119 |
use_rslora: true
|
| 120 |
dataset:
|
| 121 |
-
data_dir:
|
| 122 |
caption_ext: txt
|
| 123 |
resolution: 512
|
| 124 |
center_crop: false
|
| 125 |
random_flip: true
|
| 126 |
-
output_dir: ./output/
|
| 127 |
-
resume_from_checkpoint: ./output/sprite_lora_v1_continued/step_500
|
| 128 |
num_train_steps: 1000
|
| 129 |
batch_size: 1
|
| 130 |
gradient_accumulation_steps: 4
|
|
@@ -132,6 +38,8 @@ learning_rate: 0.0001
|
|
| 132 |
lr_scheduler: cosine_with_restarts
|
| 133 |
warmup_steps: 100
|
| 134 |
max_grad_norm: 1.0
|
|
|
|
|
|
|
| 135 |
optimizer: adamw_8bit
|
| 136 |
beta1: 0.9
|
| 137 |
beta2: 0.999
|
|
@@ -147,4 +55,5 @@ sample_guidance_scale: 1.0
|
|
| 147 |
push_to_hub: false
|
| 148 |
hub_model_id: null
|
| 149 |
hub_private: false
|
|
|
|
| 150 |
trigger_word: pixel art sprite
|
|
|
|
| 1 |
model:
|
| 2 |
pretrained_model_name: black-forest-labs/FLUX.2-klein-4B
|
| 3 |
dtype: bfloat16
|
|
|
|
| 4 |
lora:
|
| 5 |
rank: 64
|
| 6 |
alpha: 128
|
| 7 |
dropout: 0.0
|
| 8 |
target_modules:
|
| 9 |
+
- to_q
|
| 10 |
+
- to_k
|
| 11 |
+
- to_v
|
| 12 |
+
- to_out.0
|
| 13 |
+
- add_q_proj
|
| 14 |
+
- add_k_proj
|
| 15 |
+
- add_v_proj
|
| 16 |
+
- to_add_out
|
| 17 |
+
- linear_in
|
| 18 |
+
- linear_out
|
| 19 |
+
- to_qkv_mlp_proj
|
| 20 |
+
- proj_out
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
- context_embedder
|
| 22 |
+
- x_embedder
|
| 23 |
- single_stream_modulation.linear
|
| 24 |
+
- double_stream_modulation_img.linear
|
| 25 |
+
- double_stream_modulation_txt.linear
|
| 26 |
use_rslora: true
|
| 27 |
dataset:
|
| 28 |
+
data_dir: /home/gero/GitHub/DeepLearning_Lab/SpriteForge/training_data/hf_snapped
|
| 29 |
caption_ext: txt
|
| 30 |
resolution: 512
|
| 31 |
center_crop: false
|
| 32 |
random_flip: true
|
| 33 |
+
output_dir: ./output/pixel-art-lora-v2
|
|
|
|
| 34 |
num_train_steps: 1000
|
| 35 |
batch_size: 1
|
| 36 |
gradient_accumulation_steps: 4
|
|
|
|
| 38 |
lr_scheduler: cosine_with_restarts
|
| 39 |
warmup_steps: 100
|
| 40 |
max_grad_norm: 1.0
|
| 41 |
+
gradient_checkpointing: true
|
| 42 |
+
offload_frozen_to_cpu: true
|
| 43 |
optimizer: adamw_8bit
|
| 44 |
beta1: 0.9
|
| 45 |
beta2: 0.999
|
|
|
|
| 55 |
push_to_hub: false
|
| 56 |
hub_model_id: null
|
| 57 |
hub_private: false
|
| 58 |
+
save_comfyui_format: true
|
| 59 |
trigger_word: pixel art sprite
|
pytorch_lora_weights.comfyui.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:24e938f510f5dd0c890ac8b1078f4abb87a50c9c053b2e85c44821c0f30011ad
|
| 3 |
+
size 325276656
|
pytorch_lora_weights.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0414baac1e19fe28c00dffb1c09eaffe2dbaf7928821d6d53d5ebd3ab903db8
|
| 3 |
+
size 325279584
|