raaedk commited on
Commit
d520106
·
verified ·
1 Parent(s): d61f6fd

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +169 -0
README.md ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: "stabilityai/stable-diffusion-3.5-large"
4
+ tags:
5
+ - sd3
6
+ - sd3-diffusers
7
+ - text-to-image
8
+ - diffusers
9
+ - simpletuner
10
+ - safe-for-work
11
+ - lora
12
+ - template:sd-lora
13
+ - lycoris
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: 'anime girl'
22
+ parameters:
23
+ negative_prompt: 'blurry, cropped, ugly'
24
+ output:
25
+ url: ./assets/image_1_0.png
26
+ ---
27
+
28
+ # niji
29
+
30
+ This is a LyCORIS adapter derived from [stabilityai/stable-diffusion-3.5-large](https://huggingface.co/stabilityai/stable-diffusion-3.5-large).
31
+
32
+
33
+ The main validation prompt used during training was:
34
+
35
+
36
+
37
+ ```
38
+ anime girl
39
+ ```
40
+
41
+ ## Validation settings
42
+ - CFG: `5.0`
43
+ - CFG Rescale: `0.0`
44
+ - Steps: `20`
45
+ - Sampler: `None`
46
+ - Seed: `42`
47
+ - Resolution: `1024x1024`
48
+
49
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
50
+
51
+ You can find some example images in the following gallery:
52
+
53
+
54
+ <Gallery />
55
+
56
+ The text encoder **was not** trained.
57
+ You may reuse the base model text encoder for inference.
58
+
59
+
60
+ ## Training settings
61
+
62
+ - Training epochs: 0
63
+ - Training steps: 500
64
+ - Learning rate: 0.0001
65
+ - Max grad norm: 0.01
66
+ - Effective batch size: 1
67
+ - Micro-batch size: 1
68
+ - Gradient accumulation steps: 1
69
+ - Number of GPUs: 1
70
+ - Prediction type: flow-matching
71
+ - Rescaled betas zero SNR: False
72
+ - Optimizer: adamw_bf16
73
+ - Precision: Pure BF16
74
+ - Quantised: Yes: int8-quanto
75
+ - Xformers: Not used
76
+ - LyCORIS Config:
77
+ ```json
78
+ {
79
+ "algo": "lokr",
80
+ "multiplier": 1.0,
81
+ "linear_dim": 10000,
82
+ "linear_alpha": 1,
83
+ "factor": 16,
84
+ "apply_preset": {
85
+ "target_module": [
86
+ "Attention",
87
+ "FeedForward"
88
+ ],
89
+ "module_algo_map": {
90
+ "Attention": {
91
+ "factor": 16
92
+ },
93
+ "FeedForward": {
94
+ "factor": 8
95
+ }
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ ## Datasets
102
+
103
+ ### niji-512
104
+ - Repeats: 10
105
+ - Total number of images: 100
106
+ - Total number of aspect buckets: 1
107
+ - Resolution: 0.262144 megapixels
108
+ - Cropped: False
109
+ - Crop style: None
110
+ - Crop aspect: None
111
+ - Used for regularisation data: No
112
+ ### niji-1024
113
+ - Repeats: 10
114
+ - Total number of images: 100
115
+ - Total number of aspect buckets: 1
116
+ - Resolution: 1.048576 megapixels
117
+ - Cropped: False
118
+ - Crop style: None
119
+ - Crop aspect: None
120
+ - Used for regularisation data: No
121
+ ### niji-512-crop
122
+ - Repeats: 10
123
+ - Total number of images: 100
124
+ - Total number of aspect buckets: 1
125
+ - Resolution: 0.262144 megapixels
126
+ - Cropped: True
127
+ - Crop style: random
128
+ - Crop aspect: square
129
+ - Used for regularisation data: No
130
+ ### niji-1024-crop
131
+ - Repeats: 10
132
+ - Total number of images: 100
133
+ - Total number of aspect buckets: 1
134
+ - Resolution: 1.048576 megapixels
135
+ - Cropped: True
136
+ - Crop style: random
137
+ - Crop aspect: square
138
+ - Used for regularisation data: No
139
+
140
+
141
+ ## Inference
142
+
143
+
144
+ ```python
145
+ import torch
146
+ from diffusers import DiffusionPipeline
147
+ from lycoris import create_lycoris_from_weights
148
+
149
+ model_id = 'stabilityai/stable-diffusion-3.5-large'
150
+ adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
151
+ lora_scale = 1.0
152
+ wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
153
+ wrapper.merge_to()
154
+
155
+ prompt = "anime girl"
156
+ negative_prompt = 'blurry, cropped, ugly'
157
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
158
+ image = pipeline(
159
+ prompt=prompt,
160
+ negative_prompt=negative_prompt,
161
+ num_inference_steps=20,
162
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
163
+ width=1024,
164
+ height=1024,
165
+ guidance_scale=5.0,
166
+ ).images[0]
167
+ image.save("output.png", format="PNG")
168
+ ```
169
+