maver1chh commited on
Commit
3cd87d6
·
verified ·
1 Parent(s): df44a66

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +139 -0
README.md ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: "black-forest-labs/FLUX.1-dev"
4
+ tags:
5
+ - flux
6
+ - flux-diffusers
7
+ - text-to-image
8
+ - diffusers
9
+ - simpletuner
10
+ - not-for-all-audiences
11
+ - lora
12
+ - template:sd-lora
13
+ - standard
14
+ inference: true
15
+
16
+ ---
17
+
18
+ # maver1chh/jazzy0301
19
+
20
+ This is a standard PEFT LoRA derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
21
+
22
+
23
+ The main validation prompt used during training was:
24
+ ```
25
+ An illustration of the beach in Malibu, California with palm trees and ocean view during sunset. A classic car is parked on an empty street next to two palm trees near a stop sign. There is a yellow line drawn across the road leading towards the beach. The sky casts long shadows over the scene, creating a warm glow that highlights the serene beauty of the landscape, illustration in classic vibes.
26
+ ```
27
+
28
+
29
+ ## Validation settings
30
+ - CFG: `3.0`
31
+ - CFG Rescale: `0.0`
32
+ - Steps: `20`
33
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
34
+ - Seed: `42`
35
+ - Resolution: `1080x1980`
36
+ - Skip-layer guidance:
37
+
38
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
39
+
40
+
41
+
42
+
43
+ <Gallery />
44
+
45
+ The text encoder **was not** trained.
46
+ You may reuse the base model text encoder for inference.
47
+
48
+
49
+ ## Training settings
50
+
51
+ - Training epochs: 0
52
+ - Training steps: 500
53
+ - Learning rate: 0.0008
54
+ - Learning rate schedule: polynomial
55
+ - Warmup steps: 1000
56
+ - Max grad norm: 1.0
57
+ - Effective batch size: 1
58
+ - Micro-batch size: 1
59
+ - Gradient accumulation steps: 1
60
+ - Number of GPUs: 1
61
+ - Gradient checkpointing: True
62
+ - Prediction type: flow-matching (extra parameters=['shift=3', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flow_matching_loss=compatible', 'flux_lora_target=all'])
63
+ - Optimizer: adamw_bf16
64
+ - Trainable parameter precision: Pure BF16
65
+ - Caption dropout probability: 10.0%
66
+
67
+
68
+ - LoRA Rank: 16
69
+ - LoRA Alpha: 16.0
70
+ - LoRA Dropout: 0.1
71
+ - LoRA initialisation style: default
72
+
73
+
74
+ ## Datasets
75
+
76
+ ### jazz512_0301
77
+ - Repeats: 10
78
+ - Total number of images: 28
79
+ - Total number of aspect buckets: 1
80
+ - Resolution: 0.262144 megapixels
81
+ - Cropped: False
82
+ - Crop style: None
83
+ - Crop aspect: None
84
+ - Used for regularisation data: No
85
+ ### jazz768_0301
86
+ - Repeats: 10
87
+ - Total number of images: 28
88
+ - Total number of aspect buckets: 1
89
+ - Resolution: 0.589824 megapixels
90
+ - Cropped: False
91
+ - Crop style: None
92
+ - Crop aspect: None
93
+ - Used for regularisation data: No
94
+ ### jazz1024_0301
95
+ - Repeats: 10
96
+ - Total number of images: 28
97
+ - Total number of aspect buckets: 1
98
+ - Resolution: 1.048576 megapixels
99
+ - Cropped: False
100
+ - Crop style: None
101
+ - Crop aspect: None
102
+ - Used for regularisation data: No
103
+
104
+
105
+ ## Inference
106
+
107
+
108
+ ```python
109
+ import torch
110
+ from diffusers import DiffusionPipeline
111
+
112
+ model_id = 'black-forest-labs/FLUX.1-dev'
113
+ adapter_id = 'maver1chh/maver1chh/jazzy0301'
114
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
115
+ pipeline.load_lora_weights(adapter_id)
116
+
117
+ prompt = "An illustration of the beach in Malibu, California with palm trees and ocean view during sunset. A classic car is parked on an empty street next to two palm trees near a stop sign. There is a yellow line drawn across the road leading towards the beach. The sky casts long shadows over the scene, creating a warm glow that highlights the serene beauty of the landscape, illustration in classic vibes."
118
+
119
+
120
+ ## Optional: quantise the model to save on vram.
121
+ ## Note: The model was quantised during training, and so it is recommended to do the same during inference time.
122
+ from optimum.quanto import quantize, freeze, qint8
123
+ quantize(pipeline.transformer, weights=qint8)
124
+ freeze(pipeline.transformer)
125
+
126
+ 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
127
+ image = pipeline(
128
+ prompt=prompt,
129
+ num_inference_steps=20,
130
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
131
+ width=1080,
132
+ height=1980,
133
+ guidance_scale=3.0,
134
+ ).images[0]
135
+ image.save("output.png", format="PNG")
136
+ ```
137
+
138
+
139
+