serkandyck commited on
Commit
9df6418
1 Parent(s): 83f6444

Upload ai-toolkit_config.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. ai-toolkit_config.yaml +92 -0
ai-toolkit_config.yaml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ job: extension
3
+ config:
4
+ # this name will be the folder and filename name
5
+ name: "my_first_flux_lora_v1"
6
+ process:
7
+ - type: 'sd_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
+
12
+ # performance_log_every: 1000
13
+ device: cuda:0
14
+ # if a trigger word is specified, it will be added to captions of training data if it does not already exist
15
+ # alternatively, in your captions you can add [trigger] and it will be replaced with the trigger word
16
+
17
+ # trigger_word: "p3r5on"
18
+ network:
19
+ type: "lora"
20
+ linear: 16
21
+ linear_alpha: 16
22
+ save:
23
+ dtype: float16 # precision to save
24
+ save_every: 1000 # save every this many steps
25
+ max_step_saves_to_keep: 4 # how many intermittent saves to keep
26
+ push_to_hub: false #change this to True to push your trained model to Hugging Face.
27
+ # You can either set up a HF_TOKEN env variable or you'll be prompted to log-in
28
+ # hf_repo_id: your-username/your-model-slug
29
+ # hf_private: true #whether the repo is private or public
30
+
31
+ datasets:
32
+ # datasets are a folder of images. captions need to be txt files with the same name as the image
33
+ # for instance image2.jpg and image2.txt. Only jpg, jpeg, and png are supported currently
34
+ # images will automatically be resized and bucketed into the resolution specified
35
+ # on windows, escape back slashes with another backslash so
36
+ # "C:\\path\\to\\images\\folder"
37
+ - folder_path: "/workspace/ai-toolkit/images"
38
+ caption_ext: "txt"
39
+ caption_dropout_rate: 0.05 # will drop out the caption 5% of time
40
+ shuffle_tokens: false # shuffle caption order, split by commas
41
+ cache_latents_to_disk: true # leave this true unless you know what you're doing
42
+ resolution: [512, 768, 1024] # flux enjoys multiple resolutions
43
+ train:
44
+ batch_size: 1
45
+ steps: 3000 # total number of steps to train 500 - 4000 is a good range
46
+ gradient_accumulation_steps: 1
47
+ train_unet: true
48
+ train_text_encoder: false # probably won't work with flux
49
+ gradient_checkpointing: true # need the on unless you have a ton of vram
50
+ noise_scheduler: "flowmatch" # for training only
51
+ optimizer: "adamw8bit"
52
+ lr: 0.0001
53
+ # skip_first_sample: true
54
+ # uncomment to completely disable sampling
55
+ # disable_sampling: true
56
+ # uncomment to use new vell curved weighting. Experimental but may produce better results
57
+ # linear_timesteps: true
58
+
59
+ # ema will smooth out learning, but could slow it down. Recommended to leave on.
60
+ ema_config:
61
+ use_ema: true
62
+ ema_decay: 0.99
63
+ # will probably need this if gpu supports it for flux, other dtypes may not work correctly
64
+ dtype: bf16
65
+ model:
66
+ # huggingface model name or path
67
+ name_or_path: "black-forest-labs/FLUX.1-dev"
68
+ is_flux: true
69
+ quantize: true # run 8bit mixed precision
70
+ # low_vram: true # uncomment this if the GPU is connected to your monitors. It will use less vram to quantize, but is slower.
71
+ sample:
72
+ sampler: "flowmatch" # must match train.noise_scheduler
73
+ sample_every: 500 # sample every this many steps
74
+ width: 1024
75
+ height: 1024
76
+ prompts:
77
+ - portrait photograph, a man standing, wearing a TOK black hoodie, background is slightly out of focus, strong color contrast
78
+ - A portrait of a man standing on a bustling city street at night, wearing a TOK black hoodie. Neon lights illuminate the background, creating a strong color contrast, with a slightly out-of-focus backdrop of blurred car lights and urban scenery.
79
+ - A portrait of a man standing on a serene forest path, wearing a TOK black hoodie. The green foliage creates a lush and vibrant backdrop, slightly out of focus, with the dappled sunlight creating a strong color contrast against the dark hoodie.
80
+ - A portrait of a man standing on a modern urban rooftop at sunset, wearing a TOK black hoodie. The background showcases a city skyline with glowing buildings, slightly out of focus, emphasizing the contrast between the warm sunset hues and the dark clothing.
81
+ - A portrait of a man standing inside an industrial warehouse, wearing a TOK black hoodie. The background features metal beams and machinery, with a gritty, slightly out-of-focus look that contrasts sharply with the dark hoodie.
82
+ - A portrait of a man standing at a dimly lit subway station, wearing a TOK black hoodie. The background shows blurred trains and station signs, slightly out of focus, creating a strong color contrast between the artificial lighting and the dark hoodie.
83
+ neg: "" # not used on flux
84
+ seed: 42
85
+ walk_seed: true
86
+ guidance_scale: 4
87
+ sample_steps: 20
88
+ trigger_word: TOK
89
+ # you can add any additional meta info here. [name] is replaced with config name at top
90
+ meta:
91
+ name: "[name]"
92
+ version: '1.0'