bghira commited on
Commit
baa4c14
·
verified ·
1 Parent(s): cd8ba26

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +136 -0
README.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: "fal/AuraFlow"
4
+ tags:
5
+ - auraflow
6
+ - auraflow-diffusers
7
+ - text-to-image
8
+ - image-to-image
9
+ - diffusers
10
+ - simpletuner
11
+ - not-for-all-audiences
12
+ - lora
13
+ - template:sd-lora
14
+ - standard
15
+ pipeline_tag: text-to-image
16
+ inference: true
17
+ widget:
18
+ - text: 'unconditional (blank prompt)'
19
+ parameters:
20
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
21
+ output:
22
+ url: ./assets/image_0_0.png
23
+ - text: 'An domokun running through a field with flowers all around him.'
24
+ parameters:
25
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
26
+ output:
27
+ url: ./assets/image_1_0.png
28
+ ---
29
+
30
+ # Auraflow-DomoKun-LoRA-rank8
31
+
32
+ This is a standard PEFT LoRA derived from [fal/AuraFlow](https://huggingface.co/fal/AuraFlow).
33
+
34
+ The main validation prompt used during training was:
35
+ ```
36
+ An domokun running through a field with flowers all around him.
37
+ ```
38
+
39
+
40
+ ## Validation settings
41
+ - CFG: `4.0`
42
+ - CFG Rescale: `0.0`
43
+ - Steps: `30`
44
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
45
+ - Seed: `42`
46
+ - Resolution: `512x512`
47
+
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: 5
63
+ - Training steps: 750
64
+ - Learning rate: 0.0001
65
+ - Learning rate schedule: constant
66
+ - Warmup steps: 100
67
+ - Max grad value: 0.01
68
+ - Effective batch size: 3
69
+ - Micro-batch size: 1
70
+ - Gradient accumulation steps: 1
71
+ - Number of GPUs: 3
72
+ - Gradient checkpointing: True
73
+ - Prediction type: flow_matching (extra parameters=['shift=3'])
74
+ - Optimizer: adamw_bf16
75
+ - Trainable parameter precision: Pure BF16
76
+ - Base model precision: `no_change`
77
+ - Caption dropout probability: 10.0%
78
+
79
+
80
+ - LoRA Rank: 8
81
+ - LoRA Alpha: 8.0
82
+ - LoRA Dropout: 0.1
83
+ - LoRA initialisation style: default
84
+
85
+
86
+ ## Datasets
87
+
88
+ ### domokun-cropped-512
89
+ - Repeats: 10
90
+ - Total number of images: ~36
91
+ - Total number of aspect buckets: 7
92
+ - Resolution: 0.262144 megapixels
93
+ - Cropped: False
94
+ - Crop style: None
95
+ - Crop aspect: None
96
+ - Used for regularisation data: No
97
+
98
+
99
+ ## Inference
100
+
101
+
102
+ ```python
103
+ import torch
104
+ from diffusers import DiffusionPipeline
105
+
106
+ model_id = 'fal/AuraFlow'
107
+ adapter_id = 'bghira/Auraflow-DomoKun-LoRA-rank8'
108
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
109
+ pipeline.load_lora_weights(adapter_id)
110
+
111
+ prompt = "An domokun running through a field with flowers all around him."
112
+ negative_prompt = 'ugly, cropped, blurry, low-quality, mediocre average'
113
+
114
+ ## Optional: quantise the model to save on vram.
115
+ ## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
116
+ #from optimum.quanto import quantize, freeze, qint8
117
+ #quantize(pipeline.transformer, weights=qint8)
118
+ #freeze(pipeline.transformer)
119
+
120
+ 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
121
+ model_output = pipeline(
122
+ prompt=prompt,
123
+ negative_prompt=negative_prompt,
124
+ num_inference_steps=30,
125
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
126
+ width=512,
127
+ height=512,
128
+ guidance_scale=4.0,
129
+ ).images[0]
130
+
131
+ model_output.save("output.png", format="PNG")
132
+
133
+ ```
134
+
135
+
136
+