badul13 commited on
Commit
5acbee3
·
verified ·
1 Parent(s): 523893c

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +141 -0
README.md ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - 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: 'A pixel art sprite of majestic water and dark-element cat. It evolved for full, featuring slender graceful body. The cat has sleek, shadowy black fur with glowing blue wave-like patterns flowing across its body. Its piercing blue eyes glow with an ethereal light, and its tail curls in a spiral, resembling a dark water vortex. Small floating water droplets and ghostly blue mist surround the cat, enhancing its mysterious aura. The background is dark to contrast the bright neon blue elements, with pixelated waves and shadowy mist effects. Created using high-detail pixel art, vibrant color balance, and dynamic lighting effects.'
22
+ parameters:
23
+ negative_prompt: 'blurry, cropped, ugly'
24
+ output:
25
+ url: ./assets/image_1_0.png
26
+ ---
27
+
28
+ # 0211
29
+
30
+ This is a standard PEFT LoRA 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
+ A pixel art sprite of majestic water and dark-element cat. It evolved for full, featuring slender graceful body. The cat has sleek, shadowy black fur with glowing blue wave-like patterns flowing across its body. Its piercing blue eyes glow with an ethereal light, and its tail curls in a spiral, resembling a dark water vortex. Small floating water droplets and ghostly blue mist surround the cat, enhancing its mysterious aura. The background is dark to contrast the bright neon blue elements, with pixelated waves and shadowy mist effects. Created using high-detail pixel art, vibrant color balance, and dynamic lighting effects.
36
+ ```
37
+
38
+
39
+ ## Validation settings
40
+ - CFG: `5.0`
41
+ - CFG Rescale: `0.0`
42
+ - Steps: `20`
43
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
44
+ - Seed: `42`
45
+ - Resolution: `1024x1024`
46
+ - Skip-layer guidance:
47
+
48
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
49
+
50
+ You can find some example images in the following gallery:
51
+
52
+
53
+ <Gallery />
54
+
55
+ The text encoder **was not** trained.
56
+ You may reuse the base model text encoder for inference.
57
+
58
+
59
+ ## Training settings
60
+
61
+ - Training epochs: 0
62
+ - Training steps: 500
63
+ - Learning rate: 8e-05
64
+ - Learning rate schedule: polynomial
65
+ - Warmup steps: 100
66
+ - Max grad norm: 2.0
67
+ - Effective batch size: 1
68
+ - Micro-batch size: 1
69
+ - Gradient accumulation steps: 1
70
+ - Number of GPUs: 1
71
+ - Gradient checkpointing: True
72
+ - Prediction type: flow-matching (extra parameters=['shift=3'])
73
+ - Optimizer: adamw_bf16
74
+ - Trainable parameter precision: Pure BF16
75
+ - Caption dropout probability: 5.0%
76
+
77
+
78
+ - LoRA Rank: 64
79
+ - LoRA Alpha: None
80
+ - LoRA Dropout: 0.1
81
+ - LoRA initialisation style: default
82
+
83
+
84
+ ## Datasets
85
+
86
+ ### dataset-1024
87
+ - Repeats: 10
88
+ - Total number of images: 41
89
+ - Total number of aspect buckets: 1
90
+ - Resolution: 1.048576 megapixels
91
+ - Cropped: False
92
+ - Crop style: None
93
+ - Crop aspect: None
94
+ - Used for regularisation data: No
95
+ ### dataset-crop-1024
96
+ - Repeats: 10
97
+ - Total number of images: 41
98
+ - Total number of aspect buckets: 1
99
+ - Resolution: 1.048576 megapixels
100
+ - Cropped: True
101
+ - Crop style: center
102
+ - Crop aspect: square
103
+ - Used for regularisation data: No
104
+
105
+
106
+ ## Inference
107
+
108
+
109
+ ```python
110
+ import torch
111
+ from diffusers import DiffusionPipeline
112
+
113
+ model_id = 'stabilityai/stable-diffusion-3.5-large'
114
+ adapter_id = 'badul13/0211'
115
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
116
+ pipeline.load_lora_weights(adapter_id)
117
+
118
+ prompt = "A pixel art sprite of majestic water and dark-element cat. It evolved for full, featuring slender graceful body. The cat has sleek, shadowy black fur with glowing blue wave-like patterns flowing across its body. Its piercing blue eyes glow with an ethereal light, and its tail curls in a spiral, resembling a dark water vortex. Small floating water droplets and ghostly blue mist surround the cat, enhancing its mysterious aura. The background is dark to contrast the bright neon blue elements, with pixelated waves and shadowy mist effects. Created using high-detail pixel art, vibrant color balance, and dynamic lighting effects."
119
+ negative_prompt = 'blurry, cropped, ugly'
120
+
121
+ ## Optional: quantise the model to save on vram.
122
+ ## Note: The model was quantised during training, and so it is recommended to do the same during inference time.
123
+ from optimum.quanto import quantize, freeze, qint8
124
+ quantize(pipeline.transformer, weights=qint8)
125
+ freeze(pipeline.transformer)
126
+
127
+ 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
128
+ image = pipeline(
129
+ prompt=prompt,
130
+ negative_prompt=negative_prompt,
131
+ num_inference_steps=20,
132
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
133
+ width=1024,
134
+ height=1024,
135
+ guidance_scale=5.0,
136
+ ).images[0]
137
+ image.save("output.png", format="PNG")
138
+ ```
139
+
140
+
141
+