linhqyy commited on
Commit
ea8245d
·
verified ·
1 Parent(s): ccbb5e7

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +148 -0
README.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - 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: 'This vibrant photograph captures a woman standing on a wooden deck, gazing out at a stunning, clear, turquoise ocean below. The woman is a tall, slim blonde with long, straight hair flowing down her back. She wears a bright turquoise bikini that contrasts with the vivid blue water and highlights her tanned skin. The wooden deck is sturdy and well-built, with a railing that she leans on for support. The deck is positioned on a cliff that overlooks a breathtaking seascape. The water is a gradient of vibrant turquoise and deep blue, with a sandy beach visible at the bottom of the image. The beach is pristine white, with gentle waves lapping against it. Three sailboats are anchored in the water, adding a sense of scale and perspective. The cliffs are lush with green vegetation, contrasting with the blue water and sky. The sky is a clear, bright blue, with no clouds. The overall mood is one of serene, tranquil relaxation, with the bright colors and clear, sharp details adding to the vividness and clarity of the scene.'
22
+ parameters:
23
+ negative_prompt: 'blurry, cropped, ugly'
24
+ output:
25
+ url: ./assets/image_1_0.png
26
+ ---
27
+
28
+ # deephouse-st-2911
29
+
30
+ This is a standard PEFT LoRA derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
31
+
32
+
33
+ The main validation prompt used during training was:
34
+ ```
35
+ This vibrant photograph captures a woman standing on a wooden deck, gazing out at a stunning, clear, turquoise ocean below. The woman is a tall, slim blonde with long, straight hair flowing down her back. She wears a bright turquoise bikini that contrasts with the vivid blue water and highlights her tanned skin. The wooden deck is sturdy and well-built, with a railing that she leans on for support. The deck is positioned on a cliff that overlooks a breathtaking seascape. The water is a gradient of vibrant turquoise and deep blue, with a sandy beach visible at the bottom of the image. The beach is pristine white, with gentle waves lapping against it. Three sailboats are anchored in the water, adding a sense of scale and perspective. The cliffs are lush with green vegetation, contrasting with the blue water and sky. The sky is a clear, bright blue, with no clouds. The overall mood is one of serene, tranquil relaxation, with the bright colors and clear, sharp details adding to the vividness and clarity of the scene.
36
+ ```
37
+
38
+
39
+ ## Validation settings
40
+ - CFG: `3.0`
41
+ - CFG Rescale: `0.0`
42
+ - Steps: `20`
43
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
44
+ - Seed: `42`
45
+ - Resolution: `1344x768`
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: 1
62
+ - Training steps: 500
63
+ - Learning rate: 0.0004
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', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flow_matching_loss=compatible', 'flux_lora_target=all'])
73
+ - Optimizer: adamw_bf16
74
+ - Trainable parameter precision: Pure BF16
75
+ - Caption dropout probability: 10.0%
76
+
77
+ - LoRA Rank: 16
78
+ - LoRA Alpha: 16.0
79
+ - LoRA Dropout: 0.1
80
+ - LoRA initialisation style: default
81
+
82
+
83
+ ## Datasets
84
+
85
+ ### deephouse-512
86
+ - Repeats: 10
87
+ - Total number of images: 15
88
+ - Total number of aspect buckets: 1
89
+ - Resolution: 0.262144 megapixels
90
+ - Cropped: False
91
+ - Crop style: None
92
+ - Crop aspect: None
93
+ - Used for regularisation data: No
94
+ ### deephouse-768
95
+ - Repeats: 10
96
+ - Total number of images: 15
97
+ - Total number of aspect buckets: 1
98
+ - Resolution: 0.589824 megapixels
99
+ - Cropped: False
100
+ - Crop style: None
101
+ - Crop aspect: None
102
+ - Used for regularisation data: No
103
+ ### deephouse-1024
104
+ - Repeats: 10
105
+ - Total number of images: 15
106
+ - Total number of aspect buckets: 1
107
+ - Resolution: 1.048576 megapixels
108
+ - Cropped: False
109
+ - Crop style: None
110
+ - Crop aspect: None
111
+ - Used for regularisation data: No
112
+
113
+
114
+ ## Inference
115
+
116
+
117
+ ```python
118
+ import torch
119
+ from diffusers import DiffusionPipeline
120
+
121
+ model_id = 'black-forest-labs/FLUX.1-dev'
122
+ adapter_id = 'linhqyy/deephouse-st-2911'
123
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
124
+ pipeline.load_lora_weights(adapter_id)
125
+
126
+ prompt = "This vibrant photograph captures a woman standing on a wooden deck, gazing out at a stunning, clear, turquoise ocean below. The woman is a tall, slim blonde with long, straight hair flowing down her back. She wears a bright turquoise bikini that contrasts with the vivid blue water and highlights her tanned skin. The wooden deck is sturdy and well-built, with a railing that she leans on for support. The deck is positioned on a cliff that overlooks a breathtaking seascape. The water is a gradient of vibrant turquoise and deep blue, with a sandy beach visible at the bottom of the image. The beach is pristine white, with gentle waves lapping against it. Three sailboats are anchored in the water, adding a sense of scale and perspective. The cliffs are lush with green vegetation, contrasting with the blue water and sky. The sky is a clear, bright blue, with no clouds. The overall mood is one of serene, tranquil relaxation, with the bright colors and clear, sharp details adding to the vividness and clarity of the scene."
127
+
128
+
129
+ ## Optional: quantise the model to save on vram.
130
+ ## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
131
+ #from optimum.quanto import quantize, freeze, qint8
132
+ #quantize(pipeline.transformer, weights=qint8)
133
+ #freeze(pipeline.transformer)
134
+
135
+ 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
136
+ image = pipeline(
137
+ prompt=prompt,
138
+ num_inference_steps=20,
139
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
140
+ width=1344,
141
+ height=768,
142
+ guidance_scale=3.0,
143
+ ).images[0]
144
+ image.save("output.png", format="PNG")
145
+ ```
146
+
147
+
148
+