comdoleger commited on
Commit
77b2815
·
verified ·
1 Parent(s): 38d7d2b

Upload config/examples/train_lora_qwen_image_edit_2509_32gb.yaml with huggingface_hub

Browse files
config/examples/train_lora_qwen_image_edit_2509_32gb.yaml ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ job: extension
3
+ config:
4
+ # this name will be the folder and filename name
5
+ name: "my_first_qwen_image_edit_2509_lora_v1"
6
+ process:
7
+ - type: 'diffusion_trainer'
8
+ # root folder to save training sessions/samples/weights
9
+ training_folder: "output"
10
+ # uncomment to see performance stats in the terminal every N steps
11
+ # performance_log_every: 1000
12
+ device: cuda:0
13
+ network:
14
+ type: "lora"
15
+ linear: 16
16
+ linear_alpha: 16
17
+ save:
18
+ dtype: float16 # precision to save
19
+ save_every: 250 # save every this many steps
20
+ max_step_saves_to_keep: 4 # how many intermittent saves to keep
21
+ datasets:
22
+ # datasets are a folder of images. captions need to be txt files with the same name as the image
23
+ # for instance image2.jpg and image2.txt. Only jpg, jpeg, and png are supported currently
24
+ # images will automatically be resized and bucketed into the resolution specified
25
+ # on windows, escape back slashes with another backslash so
26
+ # "C:\\path\\to\\images\\folder"
27
+ - folder_path: "/path/to/images/folder"
28
+ # can do up to 3 control image folders, file names must match target file names, but aspect/size can be different
29
+ control_path:
30
+ - "/path/to/control/images/folder1"
31
+ - "/path/to/control/images/folder2"
32
+ - "/path/to/control/images/folder3"
33
+ caption_ext: "txt"
34
+ # default_caption: "a person" # if caching text embeddings, if you don't have captions, this will get cached
35
+ caption_dropout_rate: 0.05 # will drop out the caption 5% of time
36
+ resolution: [ 512, 768, 1024 ] # qwen image enjoys multiple resolutions
37
+ # a trigger word that can be cached with the text embeddings
38
+ # trigger_word: "optional trigger word"
39
+ train:
40
+ batch_size: 1
41
+ # caching text embeddings is required for 32GB
42
+ cache_text_embeddings: true
43
+ # unload_text_encoder: true
44
+
45
+ steps: 3000 # total number of steps to train 500 - 4000 is a good range
46
+ gradient_accumulation: 1
47
+ timestep_type: "weighted"
48
+ train_unet: true
49
+ train_text_encoder: false # probably won't work with qwen image
50
+ gradient_checkpointing: true # need the on unless you have a ton of vram
51
+ noise_scheduler: "flowmatch" # for training only
52
+ optimizer: "adamw8bit"
53
+ lr: 1e-4
54
+ # uncomment this to skip the pre training sample
55
+ # skip_first_sample: true
56
+ # uncomment to completely disable sampling
57
+ # disable_sampling: true
58
+ dtype: bf16
59
+ model:
60
+ # huggingface model name or path
61
+ name_or_path: "Qwen/Qwen-Image-Edit-2509"
62
+ arch: "qwen_image_edit_plus"
63
+ quantize: true
64
+ # to use the ARA use the | pipe to point to hf path, or a local path if you have one.
65
+ # 3bit is required for 32GB
66
+ qtype: "uint3|ostris/accuracy_recovery_adapters/qwen_image_edit_2509_torchao_uint3.safetensors"
67
+ quantize_te: true
68
+ qtype_te: "qfloat8"
69
+ low_vram: true
70
+ sample:
71
+ sampler: "flowmatch" # must match train.noise_scheduler
72
+ sample_every: 250 # sample every this many steps
73
+ width: 1024
74
+ height: 1024
75
+ # you can provide up to 3 control images here
76
+ samples:
77
+ - prompt: "Do whatever with Image1 and Image2"
78
+ ctrl_img_1: "/path/to/image1.png"
79
+ ctrl_img_2: "/path/to/image2.png"
80
+ # ctrl_img_3: "/path/to/image3.png"
81
+ - prompt: "Do whatever with Image1 and Image2"
82
+ ctrl_img_1: "/path/to/image1.png"
83
+ ctrl_img_2: "/path/to/image2.png"
84
+ # ctrl_img_3: "/path/to/image3.png"
85
+ - prompt: "Do whatever with Image1 and Image2"
86
+ ctrl_img_1: "/path/to/image1.png"
87
+ ctrl_img_2: "/path/to/image2.png"
88
+ # ctrl_img_3: "/path/to/image3.png"
89
+ - prompt: "Do whatever with Image1 and Image2"
90
+ ctrl_img_1: "/path/to/image1.png"
91
+ ctrl_img_2: "/path/to/image2.png"
92
+ # ctrl_img_3: "/path/to/image3.png"
93
+ - prompt: "Do whatever with Image1 and Image2"
94
+ ctrl_img_1: "/path/to/image1.png"
95
+ ctrl_img_2: "/path/to/image2.png"
96
+ # ctrl_img_3: "/path/to/image3.png"
97
+ neg: ""
98
+ seed: 42
99
+ walk_seed: true
100
+ guidance_scale: 3
101
+ sample_steps: 25
102
+ # you can add any additional meta info here. [name] is replaced with config name at top
103
+ meta:
104
+ name: "[name]"
105
+ version: '1.0'