lanxiaofeng
commited on
Commit
•
f6b1355
1
Parent(s):
d76a43b
Upload folder using huggingface_hub
Browse files- README.md +40 -0
- dataset.toml +14 -0
- sample/yfl5_000320_00_20241027053900.png +0 -0
- sample/yfl5_000640_00_20241027054455.png +0 -0
- sample/yfl5_000960_00_20241027055050.png +0 -0
- sample/yfl5_001280_00_20241027055646.png +0 -0
- sample_prompts.txt +1 -0
- train.sh +34 -0
- yfl5-000004.safetensors +3 -0
- yfl5-000008.safetensors +3 -0
- yfl5-000012.safetensors +3 -0
- yfl5.safetensors +3 -0
README.md
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- text-to-image
|
4 |
+
- flux
|
5 |
+
- lora
|
6 |
+
- diffusers
|
7 |
+
- template:sd-lora
|
8 |
+
- fluxgym
|
9 |
+
widget:
|
10 |
+
- output:
|
11 |
+
url: sample/yfl5_001280_00_20241027055646.png
|
12 |
+
text: TOK,Professional headshot of a young Asian man in his 20s with short black
|
13 |
+
hair and bangs, warm brown eyes, and a gentle smile. Subject wearing a navy
|
14 |
+
blue turtleneck sweater, positioned slightly off-center in a three-quarter
|
15 |
+
view. Soft, natural lighting emphasizing facial features. Blurred background
|
16 |
+
suggesting a modern office or home setting. High-resolution 4K image with
|
17 |
+
shallow depth of field, captured with an 85mm lens. Subtle retouching for
|
18 |
+
a polished yet authentic LinkedIn profile picture, conveying approachability
|
19 |
+
and professionalism.
|
20 |
+
base_model: black-forest-labs/FLUX.1-dev
|
21 |
+
instance_prompt: TOK,
|
22 |
+
license: other
|
23 |
+
license_name: flux-1-dev-non-commercial-license
|
24 |
+
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
25 |
+
---
|
26 |
+
|
27 |
+
# yfl5
|
28 |
+
|
29 |
+
A Flux LoRA trained on a local computer with [Fluxgym](https://github.com/cocktailpeanut/fluxgym)
|
30 |
+
|
31 |
+
<Gallery />
|
32 |
+
|
33 |
+
## Trigger words
|
34 |
+
|
35 |
+
You should use `TOK,` to trigger the image generation.
|
36 |
+
|
37 |
+
## Download model and use it with ComfyUI, AUTOMATIC1111, SD.Next, Invoke AI, Forge, etc.
|
38 |
+
|
39 |
+
Weights for this model are available in Safetensors format.
|
40 |
+
|
dataset.toml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[general]
|
2 |
+
shuffle_caption = false
|
3 |
+
caption_extension = '.txt'
|
4 |
+
keep_tokens = 1
|
5 |
+
|
6 |
+
[[datasets]]
|
7 |
+
resolution = 512
|
8 |
+
batch_size = 1
|
9 |
+
keep_tokens = 1
|
10 |
+
|
11 |
+
[[datasets.subsets]]
|
12 |
+
image_dir = '/home/app/fluxgym/datasets/yfl5'
|
13 |
+
class_tokens = 'TOK,'
|
14 |
+
num_repeats = 20
|
sample/yfl5_000320_00_20241027053900.png
ADDED
sample/yfl5_000640_00_20241027054455.png
ADDED
sample/yfl5_000960_00_20241027055050.png
ADDED
sample/yfl5_001280_00_20241027055646.png
ADDED
sample_prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
TOK,Professional headshot of a young Asian man in his 20s with short black hair and bangs, warm brown eyes, and a gentle smile. Subject wearing a navy blue turtleneck sweater, positioned slightly off-center in a three-quarter view. Soft, natural lighting emphasizing facial features. Blurred background suggesting a modern office or home setting. High-resolution 4K image with shallow depth of field, captured with an 85mm lens. Subtle retouching for a polished yet authentic LinkedIn profile picture, conveying approachability and professionalism.
|
train.sh
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
accelerate launch \
|
2 |
+
--mixed_precision bf16 \
|
3 |
+
--num_cpu_threads_per_process 1 \
|
4 |
+
sd-scripts/flux_train_network.py \
|
5 |
+
--pretrained_model_name_or_path "/home/app/fluxgym/models/unet/flux1-dev.sft" \
|
6 |
+
--clip_l "/home/app/fluxgym/models/clip/clip_l.safetensors" \
|
7 |
+
--t5xxl "/home/app/fluxgym/models/clip/t5xxl_fp16.safetensors" \
|
8 |
+
--ae "/home/app/fluxgym/models/vae/ae.sft" \
|
9 |
+
--cache_latents_to_disk \
|
10 |
+
--save_model_as safetensors \
|
11 |
+
--sdpa --persistent_data_loader_workers \
|
12 |
+
--max_data_loader_n_workers 2 \
|
13 |
+
--seed 42 \
|
14 |
+
--gradient_checkpointing \
|
15 |
+
--mixed_precision bf16 \
|
16 |
+
--save_precision bf16 \
|
17 |
+
--network_module networks.lora_flux \
|
18 |
+
--network_dim 4 \
|
19 |
+
--optimizer_type adamw8bit \--sample_prompts="/home/app/fluxgym/outputs/yfl5/sample_prompts.txt" --sample_every_n_steps="320" \
|
20 |
+
--learning_rate 8e-4 \
|
21 |
+
--cache_text_encoder_outputs \
|
22 |
+
--cache_text_encoder_outputs_to_disk \
|
23 |
+
--fp8_base \
|
24 |
+
--highvram \
|
25 |
+
--max_train_epochs 16 \
|
26 |
+
--save_every_n_epochs 4 \
|
27 |
+
--dataset_config "/home/app/fluxgym/outputs/yfl5/dataset.toml" \
|
28 |
+
--output_dir "/home/app/fluxgym/outputs/yfl5" \
|
29 |
+
--output_name yfl5 \
|
30 |
+
--timestep_sampling shift \
|
31 |
+
--discrete_flow_shift 3.1582 \
|
32 |
+
--model_prediction_type raw \
|
33 |
+
--guidance_scale 1 \
|
34 |
+
--loss_type l2 \
|
yfl5-000004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e531c371fadfe0fe562fa5da84a651f685fb2912737a6f9dfcd984c782aef11
|
3 |
+
size 39758616
|
yfl5-000008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2780364f19cefccc2b625148d12e11d0bdd9465e92f67d76d676033f9d0efa9d
|
3 |
+
size 39758616
|
yfl5-000012.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0fcdaa99adffbcd2a7674f7e07f0d4ef5da1f63b86cd64e90496309d214fa9f9
|
3 |
+
size 39758616
|
yfl5.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:327b9eefa4ccb5b14dbfa3fa3693616952b1bdd7db8b13fc7aa8ac3dafb2760e
|
3 |
+
size 39758624
|