Sri2901 commited on
Commit
47a1daa
·
verified ·
1 Parent(s): 58f0dd6

Upload model via CLI

Browse files
Files changed (49) hide show
  1. .job_config.json +134 -0
  2. README.md +54 -0
  3. config.yaml +128 -0
  4. log.txt +0 -0
  5. m_portrait.safetensors +3 -0
  6. m_portrait_000000250.safetensors +3 -0
  7. m_portrait_000000500.safetensors +3 -0
  8. m_portrait_000000750.safetensors +3 -0
  9. m_portrait_000001000.safetensors +3 -0
  10. m_portrait_000001250.safetensors +3 -0
  11. m_portrait_000001500.safetensors +3 -0
  12. m_portrait_000001750.safetensors +3 -0
  13. optimizer.pt +3 -0
  14. samples/1756802319166__000000000_0.jpg +0 -0
  15. samples/1756802337105__000000000_1.jpg +0 -0
  16. samples/1756802355203__000000000_2.jpg +0 -0
  17. samples/1756802373379__000000000_3.jpg +0 -0
  18. samples/1756803426663__000000250_0.jpg +0 -0
  19. samples/1756803445135__000000250_1.jpg +0 -0
  20. samples/1756803463699__000000250_2.jpg +0 -0
  21. samples/1756803482275__000000250_3.jpg +0 -0
  22. samples/1756804532517__000000500_0.jpg +0 -0
  23. samples/1756804551067__000000500_1.jpg +0 -0
  24. samples/1756804569728__000000500_2.jpg +0 -0
  25. samples/1756804588203__000000500_3.jpg +0 -0
  26. samples/1756805647143__000000750_0.jpg +0 -0
  27. samples/1756805665699__000000750_1.jpg +0 -0
  28. samples/1756805684340__000000750_2.jpg +0 -0
  29. samples/1756805703070__000000750_3.jpg +0 -0
  30. samples/1756806744053__000001000_0.jpg +0 -0
  31. samples/1756806762416__000001000_1.jpg +0 -0
  32. samples/1756806780697__000001000_2.jpg +0 -0
  33. samples/1756806799017__000001000_3.jpg +0 -0
  34. samples/1756807839099__000001250_0.jpg +0 -0
  35. samples/1756807857463__000001250_1.jpg +0 -0
  36. samples/1756807875889__000001250_2.jpg +0 -0
  37. samples/1756807894245__000001250_3.jpg +0 -0
  38. samples/1756808948242__000001500_0.jpg +0 -0
  39. samples/1756808966722__000001500_1.jpg +0 -0
  40. samples/1756808985576__000001500_2.jpg +0 -0
  41. samples/1756809004090__000001500_3.jpg +0 -0
  42. samples/1756810055112__000001750_0.jpg +0 -0
  43. samples/1756810073573__000001750_1.jpg +0 -0
  44. samples/1756810092112__000001750_2.jpg +0 -0
  45. samples/1756810110726__000001750_3.jpg +0 -0
  46. samples/1756811122320__000002000_0.jpg +0 -0
  47. samples/1756811140787__000002000_1.jpg +0 -0
  48. samples/1756811159314__000002000_2.jpg +0 -0
  49. samples/1756811177766__000002000_3.jpg +0 -0
.job_config.json ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "job": "extension",
3
+ "config": {
4
+ "name": "m_portrait",
5
+ "process": [
6
+ {
7
+ "type": "ui_trainer",
8
+ "training_folder": "/ai-toolkit/output",
9
+ "sqlite_db_path": "/ai-toolkit/aitk_db.db",
10
+ "device": "cuda",
11
+ "trigger_word": "m_port",
12
+ "performance_log_every": 10,
13
+ "network": {
14
+ "type": "lora",
15
+ "linear": 32,
16
+ "linear_alpha": 32,
17
+ "conv": 16,
18
+ "conv_alpha": 16,
19
+ "lokr_full_rank": true,
20
+ "lokr_factor": -1,
21
+ "network_kwargs": {
22
+ "ignore_if_contains": []
23
+ }
24
+ },
25
+ "save": {
26
+ "dtype": "bf16",
27
+ "save_every": 250,
28
+ "max_step_saves_to_keep": 8,
29
+ "save_format": "diffusers",
30
+ "push_to_hub": false
31
+ },
32
+ "datasets": [
33
+ {
34
+ "folder_path": "/ai-toolkit/datasets/m_portrait",
35
+ "control_path": null,
36
+ "mask_path": null,
37
+ "mask_min_value": 0.1,
38
+ "default_caption": "",
39
+ "caption_ext": "txt",
40
+ "caption_dropout_rate": 0.05,
41
+ "cache_latents_to_disk": false,
42
+ "is_reg": false,
43
+ "network_weight": 1,
44
+ "resolution": [
45
+ 512,
46
+ 768,
47
+ 1024,
48
+ 1536,
49
+ 1280
50
+ ],
51
+ "controls": [],
52
+ "shrink_video_to_frames": true,
53
+ "num_frames": 1,
54
+ "do_i2v": true,
55
+ "flip_x": false,
56
+ "flip_y": false
57
+ }
58
+ ],
59
+ "train": {
60
+ "batch_size": 1,
61
+ "bypass_guidance_embedding": false,
62
+ "steps": 2000,
63
+ "gradient_accumulation": 1,
64
+ "train_unet": true,
65
+ "train_text_encoder": false,
66
+ "gradient_checkpointing": true,
67
+ "noise_scheduler": "flowmatch",
68
+ "optimizer": "adamw8bit",
69
+ "timestep_type": "sigmoid",
70
+ "content_or_style": "balanced",
71
+ "optimizer_params": {
72
+ "weight_decay": 0.0001
73
+ },
74
+ "unload_text_encoder": false,
75
+ "cache_text_embeddings": false,
76
+ "lr": 0.0002,
77
+ "ema_config": {
78
+ "use_ema": true,
79
+ "ema_decay": 0.99
80
+ },
81
+ "skip_first_sample": false,
82
+ "force_first_sample": false,
83
+ "disable_sampling": false,
84
+ "dtype": "bf16",
85
+ "diff_output_preservation": false,
86
+ "diff_output_preservation_multiplier": 1,
87
+ "diff_output_preservation_class": "person",
88
+ "switch_boundary_every": 1
89
+ },
90
+ "model": {
91
+ "name_or_path": "black-forest-labs/FLUX.1-dev",
92
+ "quantize": false,
93
+ "qtype": "qfloat8",
94
+ "quantize_te": true,
95
+ "qtype_te": "qfloat8",
96
+ "arch": "flux",
97
+ "low_vram": false,
98
+ "model_kwargs": {}
99
+ },
100
+ "sample": {
101
+ "sampler": "flowmatch",
102
+ "sample_every": 250,
103
+ "width": 1024,
104
+ "height": 1024,
105
+ "samples": [
106
+ {
107
+ "prompt": "m_port, A man in a plain white t-shirt is captured in a close-up portrait, holding a black leather wallet near his face with his right hand. The wallet’s textured finish and embossed branding are clearly visible, drawing focus to its sleek and minimal design. His direct gaze and neutral expression add a confident, straightforward tone. Background is clean white with soft even lighting to emphasize the wallet."
108
+ },
109
+ {
110
+ "prompt": "m_port, A young man is seated against a plain grey background, wearing a relaxed white crew-neck t-shirt. He faces slightly to his left with a neutral yet contemplative expression, his short textured hairstyle and light stubble framing his features. The soft natural lighting from the side casts gentle shadows, giving depth and focus to the portrait while maintaining a minimal, clean composition."
111
+ },
112
+ {
113
+ "prompt": "m_port,A young man gazes confidently at the camera, his expression calm yet subtly curious. He’s dressed in a mustard-yellow jacket layered over a ribbed turtleneck of the same tone, creating a striking monochrome look. The background, draped in rich golden fabric, seamlessly blends with his outfit, giving the image a bold, editorial feel. Soft lighting highlights the texture of his hair and skin, while the upward collar adds a touch of attitude and modern edge."
114
+ },
115
+ {
116
+ "prompt": "m_port,A man leans casually against a white column, his posture relaxed yet confident. He’s dressed in a deep navy shirt with rolled sleeves, paired with matching trousers for a clean, monochromatic look. The crisp lines of the column contrast with the blurred greenery in the background, creating a balance of structure and softness. Natural daylight enhances the sharpness of his jawline and the polished texture of his outfit, lending the portrait an elegant, editorial edge."
117
+ }
118
+ ],
119
+ "neg": "",
120
+ "seed": 42,
121
+ "walk_seed": true,
122
+ "guidance_scale": 2.8,
123
+ "sample_steps": 30,
124
+ "num_frames": 1,
125
+ "fps": 1
126
+ }
127
+ }
128
+ ]
129
+ },
130
+ "meta": {
131
+ "name": "[name]",
132
+ "version": "1.0"
133
+ }
134
+ }
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-to-image
4
+ - flux
5
+ - lora
6
+ - diffusers
7
+ - template:sd-lora
8
+ - ai-toolkit
9
+ base_model: black-forest-labs/FLUX.1-dev
10
+ instance_prompt: m_port
11
+ license: other
12
+ license_name: flux-1-dev-non-commercial-license
13
+ license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
14
+ widget:
15
+ - text: Sample generation
16
+ output:
17
+ url: samples/1756802319166__000000000_0.jpg
18
+ - text: Sample generation
19
+ output:
20
+ url: samples/1756802337105__000000000_1.jpg
21
+ - text: Sample generation
22
+ output:
23
+ url: samples/1756802355203__000000000_2.jpg
24
+ ---
25
+
26
+ # m_portrait
27
+
28
+ Model trained with AI Toolkit by Ostris
29
+
30
+ <Gallery />
31
+
32
+ ## Trigger words
33
+
34
+ You should use `m_port` to trigger the image generation.
35
+
36
+ ## Download model and use it with ComfyUI, AUTOMATIC1111, SD.Next, Invoke AI, etc.
37
+
38
+ Weights for this model are available in Safetensors format.
39
+
40
+ [Download](/username/m_portrait/tree/main) them in the Files & versions tab.
41
+
42
+ ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
43
+
44
+ ```py
45
+ from diffusers import AutoPipelineForText2Image
46
+ import torch
47
+
48
+ pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.bfloat16).to('cuda')
49
+ pipeline.load_lora_weights('username/m_portrait', weight_name='m_portrait_000000250.safetensors')
50
+ image = pipeline('m_port style artwork').images[0]
51
+ image.save("my_image.png")
52
+ ```
53
+
54
+ For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
config.yaml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ job: extension
2
+ config:
3
+ name: m_portrait
4
+ process:
5
+ - type: ui_trainer
6
+ training_folder: /ai-toolkit/output
7
+ sqlite_db_path: /ai-toolkit/aitk_db.db
8
+ device: cuda
9
+ trigger_word: m_port
10
+ performance_log_every: 10
11
+ network:
12
+ type: lora
13
+ linear: 32
14
+ linear_alpha: 32
15
+ conv: 16
16
+ conv_alpha: 16
17
+ lokr_full_rank: true
18
+ lokr_factor: -1
19
+ network_kwargs:
20
+ ignore_if_contains: []
21
+ save:
22
+ dtype: bf16
23
+ save_every: 250
24
+ max_step_saves_to_keep: 8
25
+ save_format: diffusers
26
+ push_to_hub: false
27
+ datasets:
28
+ - folder_path: /ai-toolkit/datasets/m_portrait
29
+ control_path: null
30
+ mask_path: null
31
+ mask_min_value: 0.1
32
+ default_caption: ''
33
+ caption_ext: txt
34
+ caption_dropout_rate: 0.05
35
+ cache_latents_to_disk: false
36
+ is_reg: false
37
+ network_weight: 1
38
+ resolution:
39
+ - 512
40
+ - 768
41
+ - 1024
42
+ - 1536
43
+ - 1280
44
+ controls: []
45
+ shrink_video_to_frames: true
46
+ num_frames: 1
47
+ do_i2v: true
48
+ flip_x: false
49
+ flip_y: false
50
+ train:
51
+ batch_size: 1
52
+ bypass_guidance_embedding: false
53
+ steps: 2000
54
+ gradient_accumulation: 1
55
+ train_unet: true
56
+ train_text_encoder: false
57
+ gradient_checkpointing: true
58
+ noise_scheduler: flowmatch
59
+ optimizer: adamw8bit
60
+ timestep_type: sigmoid
61
+ content_or_style: balanced
62
+ optimizer_params:
63
+ weight_decay: 0.0001
64
+ unload_text_encoder: false
65
+ cache_text_embeddings: false
66
+ lr: 0.0002
67
+ ema_config:
68
+ use_ema: true
69
+ ema_decay: 0.99
70
+ skip_first_sample: false
71
+ force_first_sample: false
72
+ disable_sampling: false
73
+ dtype: bf16
74
+ diff_output_preservation: false
75
+ diff_output_preservation_multiplier: 1
76
+ diff_output_preservation_class: person
77
+ switch_boundary_every: 1
78
+ model:
79
+ name_or_path: black-forest-labs/FLUX.1-dev
80
+ quantize: false
81
+ qtype: qfloat8
82
+ quantize_te: true
83
+ qtype_te: qfloat8
84
+ arch: flux
85
+ low_vram: false
86
+ model_kwargs: {}
87
+ sample:
88
+ sampler: flowmatch
89
+ sample_every: 250
90
+ width: 1024
91
+ height: 1024
92
+ samples:
93
+ - prompt: "m_port, A man in a plain white t-shirt is captured in a close-up\
94
+ \ portrait, holding a black leather wallet near his face with his right\
95
+ \ hand. The wallet\u2019s textured finish and embossed branding are clearly\
96
+ \ visible, drawing focus to its sleek and minimal design. His direct gaze\
97
+ \ and neutral expression add a confident, straightforward tone. Background\
98
+ \ is clean white with soft even lighting to emphasize the wallet."
99
+ - prompt: m_port, A young man is seated against a plain grey background, wearing
100
+ a relaxed white crew-neck t-shirt. He faces slightly to his left with a
101
+ neutral yet contemplative expression, his short textured hairstyle and light
102
+ stubble framing his features. The soft natural lighting from the side casts
103
+ gentle shadows, giving depth and focus to the portrait while maintaining
104
+ a minimal, clean composition.
105
+ - prompt: "m_port,A young man gazes confidently at the camera, his expression\
106
+ \ calm yet subtly curious. He\u2019s dressed in a mustard-yellow jacket\
107
+ \ layered over a ribbed turtleneck of the same tone, creating a striking\
108
+ \ monochrome look. The background, draped in rich golden fabric, seamlessly\
109
+ \ blends with his outfit, giving the image a bold, editorial feel. Soft\
110
+ \ lighting highlights the texture of his hair and skin, while the upward\
111
+ \ collar adds a touch of attitude and modern edge."
112
+ - prompt: "m_port,A man leans casually against a white column, his posture relaxed\
113
+ \ yet confident. He\u2019s dressed in a deep navy shirt with rolled sleeves,\
114
+ \ paired with matching trousers for a clean, monochromatic look. The crisp\
115
+ \ lines of the column contrast with the blurred greenery in the background,\
116
+ \ creating a balance of structure and softness. Natural daylight enhances\
117
+ \ the sharpness of his jawline and the polished texture of his outfit, lending\
118
+ \ the portrait an elegant, editorial edge."
119
+ neg: ''
120
+ seed: 42
121
+ walk_seed: true
122
+ guidance_scale: 2.8
123
+ sample_steps: 30
124
+ num_frames: 1
125
+ fps: 1
126
+ meta:
127
+ name: m_portrait
128
+ version: '1.0'
log.txt ADDED
The diff for this file is too large to render. See raw diff
 
m_portrait.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02eb3f0779269eebb9b89a233f4dd97dd4482820b92737aaa9101f8baafe99b5
3
+ size 343806424
m_portrait_000000250.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6828a8c5b13fff7ec6b056ac2f6c553a89c0ef9a1ba6306d77e25198cbb8d0f8
3
+ size 343806424
m_portrait_000000500.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bc02a8bf4d840732832511080129ad35859755bf31e9a2de940f18d41c761df
3
+ size 343806424
m_portrait_000000750.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d1b4077a30b26ed6904f129a21228c01947b4bc663f8b84018a0b668cb40383
3
+ size 343806424
m_portrait_000001000.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ecc52b8873a08475a99a0026c0cf71fe836ea59876e2f249186448b92cdac7c
3
+ size 343806424
m_portrait_000001250.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b1031841e644e6f19ea3a79bac00a8fb711e38cdab11e18af40d1d9787fbd92
3
+ size 343806424
m_portrait_000001500.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7a46c2e826fd78999038e0bf458f5d0ca7b4aa776ebd7bd4315af54ec968809
3
+ size 343806424
m_portrait_000001750.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7162279176456fb75354f3d9809d6b162d2c731932b7307bd209e2a53fcead1
3
+ size 343806424
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ef84e896dbb3a0d4a99dcaedad2402ea3f8d26c9d05553da77657d35f2e6cae
3
+ size 350203413
samples/1756802319166__000000000_0.jpg ADDED
samples/1756802337105__000000000_1.jpg ADDED
samples/1756802355203__000000000_2.jpg ADDED
samples/1756802373379__000000000_3.jpg ADDED
samples/1756803426663__000000250_0.jpg ADDED
samples/1756803445135__000000250_1.jpg ADDED
samples/1756803463699__000000250_2.jpg ADDED
samples/1756803482275__000000250_3.jpg ADDED
samples/1756804532517__000000500_0.jpg ADDED
samples/1756804551067__000000500_1.jpg ADDED
samples/1756804569728__000000500_2.jpg ADDED
samples/1756804588203__000000500_3.jpg ADDED
samples/1756805647143__000000750_0.jpg ADDED
samples/1756805665699__000000750_1.jpg ADDED
samples/1756805684340__000000750_2.jpg ADDED
samples/1756805703070__000000750_3.jpg ADDED
samples/1756806744053__000001000_0.jpg ADDED
samples/1756806762416__000001000_1.jpg ADDED
samples/1756806780697__000001000_2.jpg ADDED
samples/1756806799017__000001000_3.jpg ADDED
samples/1756807839099__000001250_0.jpg ADDED
samples/1756807857463__000001250_1.jpg ADDED
samples/1756807875889__000001250_2.jpg ADDED
samples/1756807894245__000001250_3.jpg ADDED
samples/1756808948242__000001500_0.jpg ADDED
samples/1756808966722__000001500_1.jpg ADDED
samples/1756808985576__000001500_2.jpg ADDED
samples/1756809004090__000001500_3.jpg ADDED
samples/1756810055112__000001750_0.jpg ADDED
samples/1756810073573__000001750_1.jpg ADDED
samples/1756810092112__000001750_2.jpg ADDED
samples/1756810110726__000001750_3.jpg ADDED
samples/1756811122320__000002000_0.jpg ADDED
samples/1756811140787__000002000_1.jpg ADDED
samples/1756811159314__000002000_2.jpg ADDED
samples/1756811177766__000002000_3.jpg ADDED