linhqyy commited on
Commit
16a5b64
·
verified ·
1 Parent(s): 42aaab1

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +145 -0
README.md ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 'A girl in light blue sits at the bar counter, holding an ice-cold wine glass and drinking alone on top of the Eiffel Tower, with a night view outside the window.. It features a close-up shot of her sitting by herself. She has long hair, wears glasses, faces away from the camera, and is wearing white shoes, black pants, a gray jacket, and a green scarf. with bright colors and a Paris night background featuring the Eiffel Tower. The composition is elegant, with the woman sitting on a high stool'
22
+ parameters:
23
+ negative_prompt: 'blurry, cropped, ugly'
24
+ output:
25
+ url: ./assets/image_1_0.png
26
+ ---
27
+
28
+ # jazzy-st-1411
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
+
36
+
37
+ ```
38
+ A girl in light blue sits at the bar counter, holding an ice-cold wine glass and drinking alone on top of the Eiffel Tower, with a night view outside the window.. It features a close-up shot of her sitting by herself. She has long hair, wears glasses, faces away from the camera, and is wearing white shoes, black pants, a gray jacket, and a green scarf. with bright colors and a Paris night background featuring the Eiffel Tower. The composition is elegant, with the woman sitting on a high stool
39
+ ```
40
+
41
+ ## Validation settings
42
+ - CFG: `3.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.0004
65
+ - Max grad norm: 2.0
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 (extra parameters=['shift=3', 'flux_guidance_value=1.0', 'flux_lora_target=all'])
71
+ - Rescaled betas zero SNR: False
72
+ - Optimizer: adamw_bf16
73
+ - Precision: Pure BF16
74
+ - Quantised: No
75
+ - Xformers: Not used
76
+ - LoRA Rank: 32
77
+ - LoRA Alpha: 32.0
78
+ - LoRA Dropout: 0.1
79
+ - LoRA initialisation style: default
80
+
81
+
82
+ ## Datasets
83
+
84
+ ### jazzy-512
85
+ - Repeats: 10
86
+ - Total number of images: 28
87
+ - Total number of aspect buckets: 1
88
+ - Resolution: 0.262144 megapixels
89
+ - Cropped: False
90
+ - Crop style: None
91
+ - Crop aspect: None
92
+ - Used for regularisation data: No
93
+ ### jazzy-768
94
+ - Repeats: 10
95
+ - Total number of images: 28
96
+ - Total number of aspect buckets: 2
97
+ - Resolution: 0.589824 megapixels
98
+ - Cropped: False
99
+ - Crop style: None
100
+ - Crop aspect: None
101
+ - Used for regularisation data: No
102
+ ### jazzy-1024
103
+ - Repeats: 10
104
+ - Total number of images: 28
105
+ - Total number of aspect buckets: 1
106
+ - Resolution: 1.048576 megapixels
107
+ - Cropped: False
108
+ - Crop style: None
109
+ - Crop aspect: None
110
+ - Used for regularisation data: No
111
+
112
+
113
+ ## Inference
114
+
115
+
116
+ ```python
117
+ import torch
118
+ from diffusers import DiffusionPipeline
119
+
120
+ model_id = 'black-forest-labs/FLUX.1-dev'
121
+ adapter_id = 'linhqyy/jazzy-st-1411'
122
+ pipeline = DiffusionPipeline.from_pretrained(model_id), torch_dtype=torch.bfloat16) # loading directly in bf16
123
+ pipeline.load_lora_weights(adapter_id)
124
+
125
+ prompt = "A girl in light blue sits at the bar counter, holding an ice-cold wine glass and drinking alone on top of the Eiffel Tower, with a night view outside the window.. It features a close-up shot of her sitting by herself. She has long hair, wears glasses, faces away from the camera, and is wearing white shoes, black pants, a gray jacket, and a green scarf. with bright colors and a Paris night background featuring the Eiffel Tower. The composition is elegant, with the woman sitting on a high stool"
126
+
127
+
128
+ ## Optional: quantise the model to save on vram.
129
+ ## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
130
+ #from optimum.quanto import quantize, freeze, qint8
131
+ #quantize(pipeline.transformer, weights=qint8)
132
+ #freeze(pipeline.transformer)
133
+
134
+ 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
135
+ image = pipeline(
136
+ prompt=prompt,
137
+ num_inference_steps=20,
138
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
139
+ width=1024,
140
+ height=1024,
141
+ guidance_scale=3.0,
142
+ ).images[0]
143
+ image.save("output.png", format="PNG")
144
+ ```
145
+