tlennon-ie commited on
Commit
c036a3f
·
verified ·
0 Parent(s):

initial commit

Browse files
Files changed (2) hide show
  1. .gitattributes +55 -0
  2. README.md +183 -0
.gitattributes ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-to-image
4
+ - lora
5
+ - diffusers
6
+ - template:diffusion-lora
7
+ widget:
8
+ - output:
9
+ url: images/Comparision_00001_.png
10
+ text: make the subjects skin details more prominent and natural
11
+ - output:
12
+ url: images/Comparision_00002_.png
13
+ text: make the subjects skin details more prominent and natural
14
+ - output:
15
+ url: images/Comparision_00003_.png
16
+ text: make the subjects skin details more prominent and natural
17
+ - output:
18
+ url: images/Comparision_00004_.png
19
+ text: make the subjects skin details more prominent and natural
20
+ - output:
21
+ url: images/Comparision_00005_.png
22
+ text: make the subjects skin details more prominent and natural
23
+ - output:
24
+ url: images/Comparision_00006_.png
25
+ text: make the subjects skin details more prominent and natural
26
+ - output:
27
+ url: images/Comparision_00007_.png
28
+ text: make the subjects skin details more prominent and natural
29
+ - output:
30
+ url: images/Comparision_00008_.png
31
+ text: make the subjects skin details more prominent and natural
32
+ - output:
33
+ url: images/Comparision_00009_.png
34
+ text: make the subjects skin details more prominent and natural
35
+ - output:
36
+ url: images/Comparision_00010_.png
37
+ text: make the subjects skin details more prominent and natural
38
+ - output:
39
+ url: images/Comparision_00011_.png
40
+ text: make the subjects skin details more prominent and natural
41
+ - output:
42
+ url: images/Comparision_00012_.png
43
+ text: make the subjects skin details more prominent and natural
44
+ - output:
45
+ url: images/Comparision_00013_.png
46
+ text: make the subjects skin details more prominent and natural
47
+ - output:
48
+ url: images/Comparision_00014_.png
49
+ text: make the subjects skin details more prominent and natural
50
+ - output:
51
+ url: images/Comparision_00015_.png
52
+ text: make the subjects skin details more prominent and natural
53
+ - output:
54
+ url: images/Comparision_00016_.png
55
+ text: make the subjects skin details more prominent and natural
56
+ - output:
57
+ url: images/Comparision_00017_.png
58
+ text: make the subjects skin details more prominent and natural
59
+ - output:
60
+ url: images/Comparision_00018_.png
61
+ text: make the subjects skin details more prominent and natural
62
+ - output:
63
+ url: images/Comparision_00019_.png
64
+ text: make the subjects skin details more prominent and natural
65
+ - output:
66
+ url: images/Comparision_00020_.png
67
+ text: make the subjects skin details more prominent and natural
68
+ - output:
69
+ url: images/Comparision_00021_.png
70
+ text: make the subjects skin details more prominent and natural
71
+ - output:
72
+ url: images/Comparision_00022_.png
73
+ text: make the subjects skin details more prominent and natural
74
+ - output:
75
+ url: images/Comparision_00023_.png
76
+ text: make the subjects skin details more prominent and natural
77
+ base_model: Qwen/Qwen-Image-Edit-2509
78
+ instance_prompt: make the subjects skin details more prominent and natural
79
+ license: apache-2.0
80
+ ---
81
+ # Qwen-Edit-Skin
82
+
83
+ <Gallery />
84
+
85
+ ## Model description
86
+
87
+
88
+ ##
89
+ Finetuned LoRA for Enhanced Skin Realism in Qwen-Image-Edit-2509
90
+
91
+ This repository contains a finetuned Low-Rank Adaptation (LoRA) model designed to enhance the realism and detail of human skin in images. The LoRA has been trained on top of the powerful Qwen&#x2F;Qwen-Image-Edit-2509 model, leveraging its advanced image editing capabilities to focus specifically on generating more natural and detailed skin textures.
92
+
93
+ This model was trained for 5000 steps on a local RTX 5090 using the AI-Toolkit. The resulting LoRA is ideal for photographers, digital artists, and anyone looking to improve the quality of human subjects in their generated or edited images.
94
+
95
+ ### Model Description
96
+
97
+ The qwen-edit-skin LoRA is a specialized finetuning of the Qwen&#x2F;Qwen-Image-Edit-2509 base model. The base model is a versatile image editor with strong capabilities in multi-image editing and maintaining single-image consistency, particularly in preserving personal identity. This LoRA builds upon that foundation to specifically address the nuances of human skin, adding detail and realism that may not be present in the original generations.
98
+
99
+ The training was conducted using this fork of [AI ToolKit](https:&#x2F;&#x2F;github.com&#x2F;relaxis&#x2F;ai-toolkit), a comprehensive suite for finetuning diffusion models.
100
+ The process for curating the dataset involved reverse modification of subject skin details as follows:
101
+ * Taking real images of versatile subject portraits with skin exposed
102
+ * Captioning each of these as our &quot;Target&quot; (THE AFTER) images for the final outcome expected in a standard Qwen Edit workflow
103
+ * Editing the image in Photoshop to add more gaussian blur and smoother skin tones, to make the skin texture, tone and pores less visible
104
+ * These became our &quot;Control&quot; (The BEFORE) images for Qwen Edit training.
105
+
106
+
107
+ ### Training Details
108
+
109
+ The model was finetuned with the following key parameters, which can be found in the accompanying config.yaml file:
110
+
111
+ **Hardware:**
112
+
113
+ - **GPU:** NVIDIA RTX 5090
114
+
115
+
116
+ **Training Configuration:**
117
+
118
+ - **Training Steps:** 5000
119
+
120
+ - **Batch Size:** 1
121
+
122
+ - **Gradient Accumulation:** 1
123
+
124
+ - **Learning Rate:** 1.0e-04
125
+
126
+ - **Optimizer:** adamw8bit
127
+
128
+ - **Noise Scheduler:** flowmatch
129
+
130
+ - **Resolution:** The model was trained on a dataset with resolutions of 512, 768, and 1024 pixels.
131
+
132
+ - **Precision:** bf16
133
+
134
+
135
+ **Network Architecture:**
136
+
137
+ - **Type:** LoRA
138
+
139
+ - **Linear Rank &amp; Alpha:** 16
140
+
141
+ - **Convolutional Rank &amp; Alpha:** 16
142
+
143
+
144
+ The choice of adamw8bit as the optimizer is significant as it reduces the memory footprint of the training process, allowing for more efficient finetuning on consumer-grade hardware without sacrificing performance. The flowmatch noise scheduler is a modern approach that can lead to more efficient training and high-quality image generation.
145
+
146
+ A notable aspect of the LoRA architecture is that the alpha values for both linear and convolutional layers are set to be equal to their respective rank (16). This balanced approach is a common starting point for LoRA training, ensuring that the learned adaptations are applied with a proportional scaling factor, which can help in preventing overfitting while allowing the model to learn the desired new features effectively.
147
+
148
+ ### How to Use
149
+
150
+ To use this LoRA, you will need to load the base model Qwen&#x2F;Qwen-Image-Edit-2509 and then apply the finetuned LoRA weights loaded as qwen-edit-skin.safetensors. Previous step versions of the weights are uploaded for reference but the final version is qwen-edit-skin.safetensors.
151
+ You can also leverage the example workflow attached in the repo for ComfyUI to compare the results across different weights.
152
+
153
+ The recommended weight is between 1 and 1.5, the examples provided show weights up to 2 only to show the effect of the Lora with a strength considered too high for effect.
154
+
155
+
156
+ ### Intended Use
157
+
158
+ This LoRA is intended for creative and artistic purposes to enhance the realism of human skin in digital images. It can be used by:
159
+
160
+ - **Digital Artists:** To add finer details and textures to the skin of their characters.
161
+
162
+ - **Photographers:** For retouching and enhancing portraits.
163
+
164
+ - **AI Art Enthusiasts:** To generate more lifelike images of people.
165
+
166
+
167
+ ### Limitations and Bias
168
+
169
+ This model is a finetuning of a large-scale, pre-trained model and may carry some of its inherent biases. The training dataset for this LoRA was focused on improving skin details and may not represent the full diversity of human skin tones and types equally. Users should be aware of this and use the model responsibly. The output of the model is influenced by the input prompt, and users are encouraged to use descriptive and inclusive language to guide the generation process.
170
+
171
+ ----------
172
+
173
+ **Disclaimer:** This model is intended for artistic and creative purposes. Users are responsible for the content they create and should adhere to ethical guidelines and respect the privacy and dignity of individuals.
174
+
175
+ ## Trigger words
176
+
177
+ You should use `make the subjects skin details more prominent and natural` to trigger the image generation.
178
+
179
+
180
+ ## Download model
181
+
182
+
183
+ [Download](/tlennon-ie/qwen-edit-skin/tree/main) them in the Files & versions tab.