diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7ce428f75b6c38858e1f4680b0145f510fabf9bb --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +--- +tags: +- text-to-image +- flux +- lora +- diffusers +- template:sd-lora +- fluxgym +widget: +- output: + url: sample/st3_004800_00_20241017173537.png + text: st3 +base_model: black-forest-labs/FLUX.1-dev +instance_prompt: st3 +license: other +license_name: flux-1-dev-non-commercial-license +license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md +--- + +# st3 + +A Flux LoRA trained on a local computer with [Fluxgym](https://github.com/cocktailpeanut/fluxgym) + + + +## Trigger words + +You should use `st3` to trigger the image generation. + +## Download model and use it with ComfyUI, AUTOMATIC1111, SD.Next, Invoke AI, Forge, etc. + +Weights for this model are available in Safetensors format. + diff --git a/dataset.toml b/dataset.toml new file mode 100644 index 0000000000000000000000000000000000000000..e7a2527219d5bdc7c0cf67b397746533b139e42c --- /dev/null +++ b/dataset.toml @@ -0,0 +1,14 @@ +[general] +shuffle_caption = false +caption_extension = '.txt' +keep_tokens = 1 + +[[datasets]] +resolution = 1024 +batch_size = 1 +keep_tokens = 1 + + [[datasets.subsets]] + image_dir = '/app/fluxgym/datasets/st3' + class_tokens = 'st3' + num_repeats = 10 \ No newline at end of file diff --git a/sample/st3_000100_00_20241017133538.png b/sample/st3_000100_00_20241017133538.png new file mode 100644 index 0000000000000000000000000000000000000000..f79b8ae5372b115b069f4a777288cb126f73bdef Binary files /dev/null and b/sample/st3_000100_00_20241017133538.png differ diff --git a/sample/st3_000200_00_20241017134045.png b/sample/st3_000200_00_20241017134045.png new file mode 100644 index 0000000000000000000000000000000000000000..3080d8bf2829c7d0a4b6481ea2503a986159c7f7 Binary files /dev/null and b/sample/st3_000200_00_20241017134045.png differ diff --git a/sample/st3_000300_00_20241017134551.png b/sample/st3_000300_00_20241017134551.png new file mode 100644 index 0000000000000000000000000000000000000000..b87656f7ce0124ad8fff8878af6deda9213f33e0 Binary files /dev/null and b/sample/st3_000300_00_20241017134551.png differ diff --git a/sample/st3_000400_00_20241017135057.png b/sample/st3_000400_00_20241017135057.png new file mode 100644 index 0000000000000000000000000000000000000000..306265674bfee0db2ad64826ab5a26d68b3a4b79 Binary files /dev/null and b/sample/st3_000400_00_20241017135057.png differ diff --git a/sample/st3_000500_00_20241017135602.png b/sample/st3_000500_00_20241017135602.png new file mode 100644 index 0000000000000000000000000000000000000000..dc7014a01e7f74e828361b4b23ef0cb1f4bac757 Binary files /dev/null and b/sample/st3_000500_00_20241017135602.png differ diff --git a/sample/st3_000600_00_20241017140110.png b/sample/st3_000600_00_20241017140110.png new file mode 100644 index 0000000000000000000000000000000000000000..0a4e658c499a5492f1561835bdea8e7a1748263a Binary files /dev/null and b/sample/st3_000600_00_20241017140110.png differ diff --git a/sample/st3_000700_00_20241017140618.png b/sample/st3_000700_00_20241017140618.png new file mode 100644 index 0000000000000000000000000000000000000000..abf78cbff37242e3123c38754443b5c544c74f96 Binary files /dev/null and b/sample/st3_000700_00_20241017140618.png differ diff --git a/sample/st3_000800_00_20241017141125.png b/sample/st3_000800_00_20241017141125.png new file mode 100644 index 0000000000000000000000000000000000000000..d3003577266c6f5215a914092c25e205f812ba58 Binary files /dev/null and b/sample/st3_000800_00_20241017141125.png differ diff --git a/sample/st3_000900_00_20241017141632.png b/sample/st3_000900_00_20241017141632.png new file mode 100644 index 0000000000000000000000000000000000000000..daf6d3ff76a733fabe303b9fcfccbaff8d9fd6a0 Binary files /dev/null and b/sample/st3_000900_00_20241017141632.png differ diff --git a/sample/st3_001000_00_20241017142139.png b/sample/st3_001000_00_20241017142139.png new file mode 100644 index 0000000000000000000000000000000000000000..59933f0071e89cfc795e952afafcb8c37e3147b0 Binary files /dev/null and b/sample/st3_001000_00_20241017142139.png differ diff --git a/sample/st3_001100_00_20241017142646.png b/sample/st3_001100_00_20241017142646.png new file mode 100644 index 0000000000000000000000000000000000000000..fe7c9ca894b1b2e02f9a1d7c7631bbd12f2a5cf1 Binary files /dev/null and b/sample/st3_001100_00_20241017142646.png differ diff --git a/sample/st3_001200_00_20241017143154.png b/sample/st3_001200_00_20241017143154.png new file mode 100644 index 0000000000000000000000000000000000000000..7a26674a5618b7d75674af4c5c5893ea290e8bbe Binary files /dev/null and b/sample/st3_001200_00_20241017143154.png differ diff --git a/sample/st3_001300_00_20241017143702.png b/sample/st3_001300_00_20241017143702.png new file mode 100644 index 0000000000000000000000000000000000000000..ea4b1359acf14b86bc43b4f4edace3d70060c743 Binary files /dev/null and b/sample/st3_001300_00_20241017143702.png differ diff --git a/sample/st3_001400_00_20241017144209.png b/sample/st3_001400_00_20241017144209.png new file mode 100644 index 0000000000000000000000000000000000000000..43cf186a16fe3efefdda4e2f4dcc72ee1b63b1b0 Binary files /dev/null and b/sample/st3_001400_00_20241017144209.png differ diff --git a/sample/st3_001500_00_20241017144715.png b/sample/st3_001500_00_20241017144715.png new file mode 100644 index 0000000000000000000000000000000000000000..76852f0b592f86b101cdb6ecf32a8b64bfc36fa7 Binary files /dev/null and b/sample/st3_001500_00_20241017144715.png differ diff --git a/sample/st3_001600_00_20241017145222.png b/sample/st3_001600_00_20241017145222.png new file mode 100644 index 0000000000000000000000000000000000000000..c746886c787cae07b78182abd4680d079a7b15cb Binary files /dev/null and b/sample/st3_001600_00_20241017145222.png differ diff --git a/sample/st3_001700_00_20241017145728.png b/sample/st3_001700_00_20241017145728.png new file mode 100644 index 0000000000000000000000000000000000000000..ac2c68560afd880413fae97c14d10a6f5c5fedc2 Binary files /dev/null and b/sample/st3_001700_00_20241017145728.png differ diff --git a/sample/st3_001800_00_20241017150234.png b/sample/st3_001800_00_20241017150234.png new file mode 100644 index 0000000000000000000000000000000000000000..84fbefbf1074e068d2d51e2215a43ac88220901b Binary files /dev/null and b/sample/st3_001800_00_20241017150234.png differ diff --git a/sample/st3_001900_00_20241017150740.png b/sample/st3_001900_00_20241017150740.png new file mode 100644 index 0000000000000000000000000000000000000000..d7f7fe7e3d767894fa8788f0bb2eff4a9dc362e9 Binary files /dev/null and b/sample/st3_001900_00_20241017150740.png differ diff --git a/sample/st3_002000_00_20241017151246.png b/sample/st3_002000_00_20241017151246.png new file mode 100644 index 0000000000000000000000000000000000000000..63e7ff1310e7eaa1ce3aba1a7b80e2a0e84014e1 Binary files /dev/null and b/sample/st3_002000_00_20241017151246.png differ diff --git a/sample/st3_002100_00_20241017151752.png b/sample/st3_002100_00_20241017151752.png new file mode 100644 index 0000000000000000000000000000000000000000..e31fd5e3adb7449112c5664928300817c0a554df Binary files /dev/null and b/sample/st3_002100_00_20241017151752.png differ diff --git a/sample/st3_002200_00_20241017152257.png b/sample/st3_002200_00_20241017152257.png new file mode 100644 index 0000000000000000000000000000000000000000..e1952a7b6375f1f61f43b6d0d41735aff370544e Binary files /dev/null and b/sample/st3_002200_00_20241017152257.png differ diff --git a/sample/st3_002300_00_20241017152803.png b/sample/st3_002300_00_20241017152803.png new file mode 100644 index 0000000000000000000000000000000000000000..d26ca79d0aae01438aa5a9db98e708bb5959ec31 Binary files /dev/null and b/sample/st3_002300_00_20241017152803.png differ diff --git a/sample/st3_002400_00_20241017153308.png b/sample/st3_002400_00_20241017153308.png new file mode 100644 index 0000000000000000000000000000000000000000..a45749048786b67746525cd543dd6553291edb76 Binary files /dev/null and b/sample/st3_002400_00_20241017153308.png differ diff --git a/sample/st3_002500_00_20241017153814.png b/sample/st3_002500_00_20241017153814.png new file mode 100644 index 0000000000000000000000000000000000000000..3f5cc83273fff773eb74ed6927533d83cc55e688 Binary files /dev/null and b/sample/st3_002500_00_20241017153814.png differ diff --git a/sample/st3_002600_00_20241017154320.png b/sample/st3_002600_00_20241017154320.png new file mode 100644 index 0000000000000000000000000000000000000000..fa9c80bf0b489d3f920313f802e8293e5a7a1779 Binary files /dev/null and b/sample/st3_002600_00_20241017154320.png differ diff --git a/sample/st3_002700_00_20241017154825.png b/sample/st3_002700_00_20241017154825.png new file mode 100644 index 0000000000000000000000000000000000000000..239eae3bb4f342e4a3393902b02a194f407ab1c3 Binary files /dev/null and b/sample/st3_002700_00_20241017154825.png differ diff --git a/sample/st3_002800_00_20241017155331.png b/sample/st3_002800_00_20241017155331.png new file mode 100644 index 0000000000000000000000000000000000000000..8a01cf563faf6fe84a6306b9b08b226dd96b98c9 Binary files /dev/null and b/sample/st3_002800_00_20241017155331.png differ diff --git a/sample/st3_002900_00_20241017155836.png b/sample/st3_002900_00_20241017155836.png new file mode 100644 index 0000000000000000000000000000000000000000..04f5e0ad1f4f4604b33f0b064e5d758a8d4c74d9 Binary files /dev/null and b/sample/st3_002900_00_20241017155836.png differ diff --git a/sample/st3_003000_00_20241017160345.png b/sample/st3_003000_00_20241017160345.png new file mode 100644 index 0000000000000000000000000000000000000000..f448b2e45305d50801b0a379d6b0689026a78881 Binary files /dev/null and b/sample/st3_003000_00_20241017160345.png differ diff --git a/sample/st3_003100_00_20241017160855.png b/sample/st3_003100_00_20241017160855.png new file mode 100644 index 0000000000000000000000000000000000000000..163a6b5d12e4e9deee9905218b1b78f969cbe230 Binary files /dev/null and b/sample/st3_003100_00_20241017160855.png differ diff --git a/sample/st3_003200_00_20241017161404.png b/sample/st3_003200_00_20241017161404.png new file mode 100644 index 0000000000000000000000000000000000000000..732d07dece4affc19f6ccd9b137891485dd37139 Binary files /dev/null and b/sample/st3_003200_00_20241017161404.png differ diff --git a/sample/st3_003300_00_20241017161910.png b/sample/st3_003300_00_20241017161910.png new file mode 100644 index 0000000000000000000000000000000000000000..b8567abfa51a0e6423034cb4812d8b42ab95b80e Binary files /dev/null and b/sample/st3_003300_00_20241017161910.png differ diff --git a/sample/st3_003400_00_20241017162416.png b/sample/st3_003400_00_20241017162416.png new file mode 100644 index 0000000000000000000000000000000000000000..6a76b7d3bf587be1a0ec66313d5b214ce0fe85d7 Binary files /dev/null and b/sample/st3_003400_00_20241017162416.png differ diff --git a/sample/st3_003500_00_20241017162921.png b/sample/st3_003500_00_20241017162921.png new file mode 100644 index 0000000000000000000000000000000000000000..5d5fa47810bda87c5c872ec5a040995eea2b3d0f Binary files /dev/null and b/sample/st3_003500_00_20241017162921.png differ diff --git a/sample/st3_003600_00_20241017163427.png b/sample/st3_003600_00_20241017163427.png new file mode 100644 index 0000000000000000000000000000000000000000..35eb199f7f64cb3531e98d1617c1ad9d4d29d684 Binary files /dev/null and b/sample/st3_003600_00_20241017163427.png differ diff --git a/sample/st3_003700_00_20241017163932.png b/sample/st3_003700_00_20241017163932.png new file mode 100644 index 0000000000000000000000000000000000000000..1ad7486d90ad2eba96e8231fc5d0ef056213da0a Binary files /dev/null and b/sample/st3_003700_00_20241017163932.png differ diff --git a/sample/st3_003800_00_20241017164437.png b/sample/st3_003800_00_20241017164437.png new file mode 100644 index 0000000000000000000000000000000000000000..775cd281975c8d903943b84bda7b02f73ddf2b7e Binary files /dev/null and b/sample/st3_003800_00_20241017164437.png differ diff --git a/sample/st3_003900_00_20241017164943.png b/sample/st3_003900_00_20241017164943.png new file mode 100644 index 0000000000000000000000000000000000000000..185a090667bbc773b5951377c606fd86e130b39e Binary files /dev/null and b/sample/st3_003900_00_20241017164943.png differ diff --git a/sample/st3_004000_00_20241017165449.png b/sample/st3_004000_00_20241017165449.png new file mode 100644 index 0000000000000000000000000000000000000000..7bb291d75076559e4329c478a23f23175cabbe10 Binary files /dev/null and b/sample/st3_004000_00_20241017165449.png differ diff --git a/sample/st3_004100_00_20241017165954.png b/sample/st3_004100_00_20241017165954.png new file mode 100644 index 0000000000000000000000000000000000000000..f73a60f2a7836b8ba9d1537de698ddef8995ebca Binary files /dev/null and b/sample/st3_004100_00_20241017165954.png differ diff --git a/sample/st3_004200_00_20241017170500.png b/sample/st3_004200_00_20241017170500.png new file mode 100644 index 0000000000000000000000000000000000000000..ed2a7fc06755d18daa51555f79cbf4c60ecd1c6e Binary files /dev/null and b/sample/st3_004200_00_20241017170500.png differ diff --git a/sample/st3_004300_00_20241017171005.png b/sample/st3_004300_00_20241017171005.png new file mode 100644 index 0000000000000000000000000000000000000000..c7183a450192b7b3ff79141a89f271ac3a27e381 Binary files /dev/null and b/sample/st3_004300_00_20241017171005.png differ diff --git a/sample/st3_004400_00_20241017171511.png b/sample/st3_004400_00_20241017171511.png new file mode 100644 index 0000000000000000000000000000000000000000..3eee11fd6c3891aa33ee6deb252a4d0f1c0ff449 Binary files /dev/null and b/sample/st3_004400_00_20241017171511.png differ diff --git a/sample/st3_004500_00_20241017172017.png b/sample/st3_004500_00_20241017172017.png new file mode 100644 index 0000000000000000000000000000000000000000..926f29589e11a71088a140742d75be30a5b51ef1 Binary files /dev/null and b/sample/st3_004500_00_20241017172017.png differ diff --git a/sample/st3_004600_00_20241017172524.png b/sample/st3_004600_00_20241017172524.png new file mode 100644 index 0000000000000000000000000000000000000000..9e82066293900f53191905534afeeda2d71597cc Binary files /dev/null and b/sample/st3_004600_00_20241017172524.png differ diff --git a/sample/st3_004700_00_20241017173031.png b/sample/st3_004700_00_20241017173031.png new file mode 100644 index 0000000000000000000000000000000000000000..ab4db112e473c4be83148b692d2cd5e5acce1349 Binary files /dev/null and b/sample/st3_004700_00_20241017173031.png differ diff --git a/sample/st3_004800_00_20241017173537.png b/sample/st3_004800_00_20241017173537.png new file mode 100644 index 0000000000000000000000000000000000000000..9b0773c06d0d54adb7c15d5d9d8e0a7303f5001c Binary files /dev/null and b/sample/st3_004800_00_20241017173537.png differ diff --git a/sample_prompts.txt b/sample_prompts.txt new file mode 100644 index 0000000000000000000000000000000000000000..c10bc2d47345bfcdb9d3c0d81b4a9f51c5d0ff58 --- /dev/null +++ b/sample_prompts.txt @@ -0,0 +1 @@ +st3 \ No newline at end of file diff --git a/st3-000004.safetensors b/st3-000004.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..d44327e2d7b820bba3cb388d580e559fd9758a5d --- /dev/null +++ b/st3-000004.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efa2d8177320b93a34c8dfa1df365c40557b965b95a70dc83ebb7744fd210462 +size 39767352 diff --git a/st3-000008.safetensors b/st3-000008.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..56fc20abca58bec5fa4133c9366c5302683d6bcd --- /dev/null +++ b/st3-000008.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:379f5dbef8d89ee1fd4ff88d7e5c11b517244141bb398426d4afbee3ec7d4700 +size 39767352 diff --git a/st3-000012.safetensors b/st3-000012.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..830406f657e5e0907a47e57b2181d22acbf67051 --- /dev/null +++ b/st3-000012.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28126e23b327408f1077bc85eea10bf0ffd07e45452a3d3b3ac74f82c3e4815e +size 39767352 diff --git a/st3.safetensors b/st3.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..60fb0173f883215a4a71d6861fa9b5af83843f84 --- /dev/null +++ b/st3.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd3f259870d88c4fe021a3046696f528a21cea79f53eedc6084cb27b61f21d5d +size 39767352 diff --git a/train.sh b/train.sh new file mode 100644 index 0000000000000000000000000000000000000000..cf2d66cfe2683289bb329254ed20e22f7bab1b90 --- /dev/null +++ b/train.sh @@ -0,0 +1,34 @@ +accelerate launch \ + --mixed_precision bf16 \ + --num_cpu_threads_per_process 1 \ + sd-scripts/flux_train_network.py \ + --pretrained_model_name_or_path "/app/fluxgym/models/unet/flux1-dev.sft" \ + --clip_l "/app/fluxgym/models/clip/clip_l.safetensors" \ + --t5xxl "/app/fluxgym/models/clip/t5xxl_fp16.safetensors" \ + --ae "/app/fluxgym/models/vae/ae.sft" \ + --cache_latents_to_disk \ + --save_model_as safetensors \ + --sdpa --persistent_data_loader_workers \ + --max_data_loader_n_workers 2 \ + --seed 42 \ + --gradient_checkpointing \ + --mixed_precision bf16 \ + --save_precision bf16 \ + --network_module networks.lora_flux \ + --network_dim 4 \ + --optimizer_type adamw8bit \--sample_prompts="/app/fluxgym/outputs/st3/sample_prompts.txt" --sample_every_n_steps="100" \ + --learning_rate 8e-4 \ + --cache_text_encoder_outputs \ + --cache_text_encoder_outputs_to_disk \ + --fp8_base \ + --highvram \ + --max_train_epochs 16 \ + --save_every_n_epochs 4 \ + --dataset_config "/app/fluxgym/outputs/st3/dataset.toml" \ + --output_dir "/app/fluxgym/outputs/st3" \ + --output_name st3 \ + --timestep_sampling shift \ + --discrete_flow_shift 3.1582 \ + --model_prediction_type raw \ + --guidance_scale 1 \ + --loss_type l2 \ \ No newline at end of file