comdoleger commited on
Commit
3d7b47d
·
verified ·
1 Parent(s): 133b1ac

Upload config/examples/train_lora_omnigen2_24gb.yaml with huggingface_hub

Browse files
config/examples/train_lora_omnigen2_24gb.yaml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ job: extension
3
+ config:
4
+ # this name will be the folder and filename name
5
+ name: "my_first_omnigen2_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
+ # performance_log_every: 1000
12
+ device: cuda:0
13
+ # if a trigger word is specified, it will be added to captions of training data if it does not already exist
14
+ # alternatively, in your captions you can add [trigger] and it will be replaced with the trigger word
15
+ # trigger_word: "p3r5on"
16
+ network:
17
+ type: "lora"
18
+ linear: 16
19
+ linear_alpha: 16
20
+ save:
21
+ dtype: float16 # precision to save
22
+ save_every: 250 # save every this many steps
23
+ max_step_saves_to_keep: 4 # how many intermittent saves to keep
24
+ push_to_hub: false #change this to True to push your trained model to Hugging Face.
25
+ # You can either set up a HF_TOKEN env variable or you'll be prompted to log-in
26
+ # hf_repo_id: your-username/your-model-slug
27
+ # hf_private: true #whether the repo is private or public
28
+ datasets:
29
+ # datasets are a folder of images. captions need to be txt files with the same name as the image
30
+ # for instance image2.jpg and image2.txt. Only jpg, jpeg, and png are supported currently
31
+ # images will automatically be resized and bucketed into the resolution specified
32
+ # on windows, escape back slashes with another backslash so
33
+ # "C:\\path\\to\\images\\folder"
34
+ - folder_path: "/path/to/images/folder"
35
+ caption_ext: "txt"
36
+ caption_dropout_rate: 0.05 # will drop out the caption 5% of time
37
+ shuffle_tokens: false # shuffle caption order, split by commas
38
+ cache_latents_to_disk: true # leave this true unless you know what you're doing
39
+ resolution: [ 512, 768, 1024 ] # omnigen2 should work with multiple resolutions
40
+ train:
41
+ batch_size: 1
42
+ steps: 3000 # total number of steps to train 500 - 4000 is a good range
43
+ gradient_accumulation: 1
44
+ train_unet: true
45
+ train_text_encoder: false # probably won't work with omnigen2
46
+ gradient_checkpointing: true # need the on unless you have a ton of vram
47
+ noise_scheduler: "flowmatch" # for training only
48
+ optimizer: "adamw8bit"
49
+ lr: 1e-4
50
+ timestep_type: 'sigmoid' # sigmoid, linear, shift
51
+ # uncomment this to skip the pre training sample
52
+ # skip_first_sample: true
53
+ # uncomment to completely disable sampling
54
+ # disable_sampling: true
55
+
56
+ # ema will smooth out learning, but could slow it down.
57
+ # ema_config:
58
+ # use_ema: true
59
+ # ema_decay: 0.99
60
+
61
+ # will probably need this if gpu supports it for omnigen2, other dtypes may not work correctly
62
+ dtype: bf16
63
+ model:
64
+ name_or_path: "OmniGen2/OmniGen2
65
+ arch: "omnigen2"
66
+ quantize_te: true # quantize_only te
67
+ # quantize: true # quantize transformer
68
+ sample:
69
+ sampler: "flowmatch" # must match train.noise_scheduler
70
+ sample_every: 250 # sample every this many steps
71
+ width: 1024
72
+ height: 1024
73
+ prompts:
74
+ # you can add [trigger] to the prompts here and it will be replaced with the trigger word
75
+ # - "[trigger] holding a sign that says 'I LOVE PROMPTS!'"\
76
+ - "woman with red hair, playing chess at the park, bomb going off in the background"
77
+ - "a woman holding a coffee cup, in a beanie, sitting at a cafe"
78
+ - "a horse is a DJ at a night club, fish eye lens, smoke machine, lazer lights, holding a martini"
79
+ - "a man showing off his cool new t shirt at the beach, a shark is jumping out of the water in the background"
80
+ - "a bear building a log cabin in the snow covered mountains"
81
+ - "woman playing the guitar, on stage, singing a song, laser lights, punk rocker"
82
+ - "hipster man with a beard, building a chair, in a wood shop"
83
+ - "photo of a man, white background, medium shot, modeling clothing, studio lighting, white backdrop"
84
+ - "a man holding a sign that says, 'this is a sign'"
85
+ - "a bulldog, in a post apocalyptic world, with a shotgun, in a leather jacket, in a desert, with a motorcycle"
86
+ neg: "" # negative prompt, optional
87
+ seed: 42
88
+ walk_seed: true
89
+ guidance_scale: 4
90
+ sample_steps: 25
91
+ # you can add any additional meta info here. [name] is replaced with config name at top
92
+ meta:
93
+ name: "[name]"
94
+ version: '1.0'