noahyoungs commited on
Commit
2b3539d
·
verified ·
1 Parent(s): eb41a5c

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +161 -0
README.md ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: "black-forest-labs/FLUX.1-schnell"
4
+ tags:
5
+ - flux
6
+ - flux-diffusers
7
+ - text-to-image
8
+ - diffusers
9
+ - simpletuner
10
+ - safe-for-work
11
+ - lora
12
+ - template:sd-lora
13
+ - standard
14
+ inference: true
15
+ widget:
16
+ - text: 'unconditional (blank prompt)'
17
+ parameters:
18
+ negative_prompt: 'blurry, cropped, ugly'
19
+ output:
20
+ url: ./assets/image_0_0.png
21
+ - text: 'minimalist icon of a vertically oriented banana silhouette with a slight curve, featuring a tapered end and a small stem at the top, outline icon, black icon, no gradients, no shadows, clean lines, rounded corners, geometric simplicity, modern minimalism'
22
+ parameters:
23
+ negative_prompt: 'blurry, cropped, ugly'
24
+ output:
25
+ url: ./assets/image_1_0.png
26
+ - text: 'minimalist icon of a traffic cone featuring a sleek triangular top attached to a wider cylindrical base, with clean lines and consistent stroke width throughout, outline icon, black icon, no gradients, no shadows, clean lines, rounded corners, geometric simplicity, modern minimalism'
27
+ parameters:
28
+ negative_prompt: 'blurry, cropped, ugly'
29
+ output:
30
+ url: ./assets/image_2_0.png
31
+ - text: 'minimalist icon of an upward-pointing arrow inside a rectangular box, paired with a plus symbol on the right side, outline icon, black icon, no gradients, no shadows, clean lines, rounded corners, geometric simplicity, modern minimalism'
32
+ parameters:
33
+ negative_prompt: 'blurry, cropped, ugly'
34
+ output:
35
+ url: ./assets/image_3_0.png
36
+ - text: 'minimalist icon of the letters M, P, and X in a clean and modern sans-serif font, evenly spaced in a horizontal row, outline icon, black icon, no gradients, no shadows, clean lines, rounded corners, geometric simplicity, modern minimalism'
37
+ parameters:
38
+ negative_prompt: 'blurry, cropped, ugly'
39
+ output:
40
+ url: ./assets/image_4_0.png
41
+ - text: 'minimalist icon of a fire truck with a rectangular body, rounded cab windows, two wheels, extended ladder on top, and simplified geometric shapes for the body and details, outline icon, black icon, no gradients, no shadows, clean lines, rounded corners, geometric simplicity, modern minimalism'
42
+ parameters:
43
+ negative_prompt: 'blurry, cropped, ugly'
44
+ output:
45
+ url: ./assets/image_5_0.png
46
+ - text: 'minimalist icon of a heart and a star interlocking, with the bottom point of the star nestled within the top curve of the heart, creating a unified design where the shapes blend seamlessly at their connection point, outline icon, black icon, no gradients, no shadows, clean lines, rounded corners, geometric simplicity, modern minimalism'
47
+ parameters:
48
+ negative_prompt: 'blurry, cropped, ugly'
49
+ output:
50
+ url: ./assets/image_6_0.png
51
+ - text: 'minimalist icon'
52
+ parameters:
53
+ negative_prompt: 'blurry, cropped, ugly'
54
+ output:
55
+ url: ./assets/image_7_0.png
56
+ ---
57
+
58
+ # icon-generator-3
59
+
60
+ This is a standard PEFT LoRA derived from [black-forest-labs/FLUX.1-schnell](https://huggingface.co/black-forest-labs/FLUX.1-schnell).
61
+
62
+
63
+ The main validation prompt used during training was:
64
+ ```
65
+ minimalist icon
66
+ ```
67
+
68
+
69
+ ## Validation settings
70
+ - CFG: `3.0`
71
+ - CFG Rescale: `0.0`
72
+ - Steps: `20`
73
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
74
+ - Seed: `42`
75
+ - Resolution: `512x512`
76
+ - Skip-layer guidance:
77
+
78
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
79
+
80
+ You can find some example images in the following gallery:
81
+
82
+
83
+ <Gallery />
84
+
85
+ The text encoder **was not** trained.
86
+ You may reuse the base model text encoder for inference.
87
+
88
+
89
+ ## Training settings
90
+
91
+ - Training epochs: 0
92
+ - Training steps: 500
93
+ - Learning rate: 8e-05
94
+ - Learning rate schedule: polynomial
95
+ - Warmup steps: 100
96
+ - Max grad norm: 2.0
97
+ - Effective batch size: 1
98
+ - Micro-batch size: 1
99
+ - Gradient accumulation steps: 1
100
+ - Number of GPUs: 1
101
+ - Gradient checkpointing: True
102
+ - Prediction type: flow-matching (extra parameters=['flux_fast_schedule', 'shift=3', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flow_matching_loss=compatible', 'flux_lora_target=all'])
103
+ - Optimizer: adamw_bf16
104
+ - Trainable parameter precision: Pure BF16
105
+ - Caption dropout probability: 3.0%
106
+
107
+
108
+ - LoRA Rank: 64
109
+ - LoRA Alpha: None
110
+ - LoRA Dropout: 0.1
111
+ - LoRA initialisation style: default
112
+
113
+
114
+ ## Datasets
115
+
116
+ ### tabler-icons-captioned-512
117
+ - Repeats: 0
118
+ - Total number of images: 4918
119
+ - Total number of aspect buckets: 1
120
+ - Resolution: 0.262144 megapixels
121
+ - Cropped: False
122
+ - Crop style: None
123
+ - Crop aspect: None
124
+ - Used for regularisation data: No
125
+
126
+
127
+ ## Inference
128
+
129
+
130
+ ```python
131
+ import torch
132
+ from diffusers import DiffusionPipeline
133
+
134
+ model_id = 'black-forest-labs/FLUX.1-schnell'
135
+ adapter_id = 'noahyoungs/icon-generator-3'
136
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
137
+ pipeline.load_lora_weights(adapter_id)
138
+
139
+ prompt = "minimalist icon"
140
+
141
+
142
+ ## Optional: quantise the model to save on vram.
143
+ ## Note: The model was quantised during training, and so it is recommended to do the same during inference time.
144
+ from optimum.quanto import quantize, freeze, qint8
145
+ quantize(pipeline.transformer, weights=qint8)
146
+ freeze(pipeline.transformer)
147
+
148
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # the pipeline is already in its target precision level
149
+ image = pipeline(
150
+ prompt=prompt,
151
+ num_inference_steps=20,
152
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
153
+ width=512,
154
+ height=512,
155
+ guidance_scale=3.0,
156
+ ).images[0]
157
+ image.save("output.png", format="PNG")
158
+ ```
159
+
160
+
161
+