diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..96ad0e98960f315dd6d9f5e3aecf27aff95cbb49 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +--- +tags: +- text-to-image +- flux +- lora +- diffusers +- template:sd-lora +- fluxgym +widget: +- output: + url: sample/test-5_000100_01_20241014112746_42.png + text: 1lustrat10n a man and woman sitting at a table with a laptop and a cup + of coffee. --d 42 +- output: + url: sample/test-5_000200_01_20241014112936_42.png + text: 1lustrat10n a man and woman walking their dog in the city. --d 42 +base_model: black-forest-labs/FLUX.1-schnell +instance_prompt: 1lustrat10n +license: apache-2.0 +--- + +# test-5 + +A Flux LoRA trained on a local computer with [Fluxgym](https://github.com/cocktailpeanut/fluxgym) + + + +## Trigger words + +You should use `1lustrat10n` 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..609ec380043c784fbf5cf452b19be3f154c0b9d7 --- /dev/null +++ b/dataset.toml @@ -0,0 +1,14 @@ +[general] +shuffle_caption = false +caption_extension = '.txt' +keep_tokens = 1 + +[[datasets]] +resolution = 256 +batch_size = 1 +keep_tokens = 1 + + [[datasets.subsets]] + image_dir = '/app/fluxgym/datasets/test-5' + class_tokens = '1lustrat10n' + num_repeats = 12 \ No newline at end of file diff --git a/sample/test-5_000100_00_20241014112737_42.png b/sample/test-5_000100_00_20241014112737_42.png new file mode 100644 index 0000000000000000000000000000000000000000..0d6727171859b48926bae47505e82f5a50c1b5c5 Binary files /dev/null and b/sample/test-5_000100_00_20241014112737_42.png differ diff --git a/sample/test-5_000100_01_20241014112746_42.png b/sample/test-5_000100_01_20241014112746_42.png new file mode 100644 index 0000000000000000000000000000000000000000..b65acee1f257d8f746ab9f4dfd7055d9de9f3958 Binary files /dev/null and b/sample/test-5_000100_01_20241014112746_42.png differ diff --git a/sample/test-5_000200_00_20241014112927_42.png b/sample/test-5_000200_00_20241014112927_42.png new file mode 100644 index 0000000000000000000000000000000000000000..3824a24619eaed4af4888de20c00b925f2d4cb40 Binary files /dev/null and b/sample/test-5_000200_00_20241014112927_42.png differ diff --git a/sample/test-5_000200_01_20241014112936_42.png b/sample/test-5_000200_01_20241014112936_42.png new file mode 100644 index 0000000000000000000000000000000000000000..20a0942f031719b732e1325d329f9a7018d74eae Binary files /dev/null and b/sample/test-5_000200_01_20241014112936_42.png differ diff --git a/sample/test-5_000300_00_20241014113125_42.png b/sample/test-5_000300_00_20241014113125_42.png new file mode 100644 index 0000000000000000000000000000000000000000..c379ae9302df41a7fc51c28dee9d0601ae91823c Binary files /dev/null and b/sample/test-5_000300_00_20241014113125_42.png differ diff --git a/sample/test-5_000300_01_20241014113134_42.png b/sample/test-5_000300_01_20241014113134_42.png new file mode 100644 index 0000000000000000000000000000000000000000..f6aa0471e1e2d55cd281d1b5da87d1aa44a404d4 Binary files /dev/null and b/sample/test-5_000300_01_20241014113134_42.png differ diff --git a/sample/test-5_000400_00_20241014113321_42.png b/sample/test-5_000400_00_20241014113321_42.png new file mode 100644 index 0000000000000000000000000000000000000000..a31c7b10399fcf72757b79f3256444e8c2a98325 Binary files /dev/null and b/sample/test-5_000400_00_20241014113321_42.png differ diff --git a/sample/test-5_000400_01_20241014113330_42.png b/sample/test-5_000400_01_20241014113330_42.png new file mode 100644 index 0000000000000000000000000000000000000000..97d449395885a2107710e1ddf053b220b9173181 Binary files /dev/null and b/sample/test-5_000400_01_20241014113330_42.png differ diff --git a/sample/test-5_000500_00_20241014113512_42.png b/sample/test-5_000500_00_20241014113512_42.png new file mode 100644 index 0000000000000000000000000000000000000000..2e6906092727e1698a061d58054edf08b5c8bd6a Binary files /dev/null and b/sample/test-5_000500_00_20241014113512_42.png differ diff --git a/sample/test-5_000500_01_20241014113521_42.png b/sample/test-5_000500_01_20241014113521_42.png new file mode 100644 index 0000000000000000000000000000000000000000..d580283bf79d823d83b11caa446dcedf2e85e7b7 Binary files /dev/null and b/sample/test-5_000500_01_20241014113521_42.png differ diff --git a/sample/test-5_000600_00_20241014113703_42.png b/sample/test-5_000600_00_20241014113703_42.png new file mode 100644 index 0000000000000000000000000000000000000000..fe0bcfc0a7887fcdca6c21b1299f905020350bb9 Binary files /dev/null and b/sample/test-5_000600_00_20241014113703_42.png differ diff --git a/sample/test-5_000600_01_20241014113712_42.png b/sample/test-5_000600_01_20241014113712_42.png new file mode 100644 index 0000000000000000000000000000000000000000..bdc797326aa1d8df4a3538a302f44d8c5ee23a37 Binary files /dev/null and b/sample/test-5_000600_01_20241014113712_42.png differ diff --git a/sample/test-5_000700_00_20241014113855_42.png b/sample/test-5_000700_00_20241014113855_42.png new file mode 100644 index 0000000000000000000000000000000000000000..a006cd550ca296a304620d6a8f2bea567c37c386 Binary files /dev/null and b/sample/test-5_000700_00_20241014113855_42.png differ diff --git a/sample/test-5_000700_01_20241014113904_42.png b/sample/test-5_000700_01_20241014113904_42.png new file mode 100644 index 0000000000000000000000000000000000000000..9128d21b00eefacc9fc35376e17c2afdcd2aa8af Binary files /dev/null and b/sample/test-5_000700_01_20241014113904_42.png differ diff --git a/sample/test-5_000800_00_20241014114044_42.png b/sample/test-5_000800_00_20241014114044_42.png new file mode 100644 index 0000000000000000000000000000000000000000..11d7113f1aca50106dc2b5601216938d2586f2ce Binary files /dev/null and b/sample/test-5_000800_00_20241014114044_42.png differ diff --git a/sample/test-5_000800_01_20241014114053_42.png b/sample/test-5_000800_01_20241014114053_42.png new file mode 100644 index 0000000000000000000000000000000000000000..a084ece4f4ea126fda98c4e249c8c62b5d3f3b47 Binary files /dev/null and b/sample/test-5_000800_01_20241014114053_42.png differ diff --git a/sample/test-5_000900_00_20241014114237_42.png b/sample/test-5_000900_00_20241014114237_42.png new file mode 100644 index 0000000000000000000000000000000000000000..e3c8684bc746ead85d1453a928fcd350ebfffeaf Binary files /dev/null and b/sample/test-5_000900_00_20241014114237_42.png differ diff --git a/sample/test-5_000900_01_20241014114246_42.png b/sample/test-5_000900_01_20241014114246_42.png new file mode 100644 index 0000000000000000000000000000000000000000..91b1f2008a153b8be36b986c511d92b0aecc2459 Binary files /dev/null and b/sample/test-5_000900_01_20241014114246_42.png differ diff --git a/sample/test-5_001000_00_20241014114428_42.png b/sample/test-5_001000_00_20241014114428_42.png new file mode 100644 index 0000000000000000000000000000000000000000..37a60deafc33f4b29be7ef5275050adccca347f9 Binary files /dev/null and b/sample/test-5_001000_00_20241014114428_42.png differ diff --git a/sample/test-5_001000_01_20241014114437_42.png b/sample/test-5_001000_01_20241014114437_42.png new file mode 100644 index 0000000000000000000000000000000000000000..44d1b140bf8c3896eeb28902d78d04d400dea785 Binary files /dev/null and b/sample/test-5_001000_01_20241014114437_42.png differ diff --git a/sample/test-5_001100_00_20241014114616_42.png b/sample/test-5_001100_00_20241014114616_42.png new file mode 100644 index 0000000000000000000000000000000000000000..49f8efbce219865fd4ce0b9bf703eb5c76bb184d Binary files /dev/null and b/sample/test-5_001100_00_20241014114616_42.png differ diff --git a/sample/test-5_001100_01_20241014114625_42.png b/sample/test-5_001100_01_20241014114625_42.png new file mode 100644 index 0000000000000000000000000000000000000000..e86b6efcc7c1294ef87aae05f8fc91beee8d1443 Binary files /dev/null and b/sample/test-5_001100_01_20241014114625_42.png differ diff --git a/sample/test-5_001200_00_20241014114804_42.png b/sample/test-5_001200_00_20241014114804_42.png new file mode 100644 index 0000000000000000000000000000000000000000..aa3adc708391e09a69ca997ec95e3d2bb6f7ca61 Binary files /dev/null and b/sample/test-5_001200_00_20241014114804_42.png differ diff --git a/sample/test-5_001200_01_20241014114813_42.png b/sample/test-5_001200_01_20241014114813_42.png new file mode 100644 index 0000000000000000000000000000000000000000..553c3e1199dce9e2a51f5df35601ea674fae59af Binary files /dev/null and b/sample/test-5_001200_01_20241014114813_42.png differ diff --git a/sample/test-5_001300_00_20241014114954_42.png b/sample/test-5_001300_00_20241014114954_42.png new file mode 100644 index 0000000000000000000000000000000000000000..33d4426a80d4e9fda98236e0dda6bc368f8f807e Binary files /dev/null and b/sample/test-5_001300_00_20241014114954_42.png differ diff --git a/sample/test-5_001300_01_20241014115003_42.png b/sample/test-5_001300_01_20241014115003_42.png new file mode 100644 index 0000000000000000000000000000000000000000..357453a275819720c1073a75ff84f05e73490308 Binary files /dev/null and b/sample/test-5_001300_01_20241014115003_42.png differ diff --git a/sample/test-5_001400_00_20241014115146_42.png b/sample/test-5_001400_00_20241014115146_42.png new file mode 100644 index 0000000000000000000000000000000000000000..56bc4174c9daef3b866eaecd0e936b5a33cb6060 Binary files /dev/null and b/sample/test-5_001400_00_20241014115146_42.png differ diff --git a/sample/test-5_001400_01_20241014115155_42.png b/sample/test-5_001400_01_20241014115155_42.png new file mode 100644 index 0000000000000000000000000000000000000000..5c42d0c21da8eebe7619a42e7c09482115b1b872 Binary files /dev/null and b/sample/test-5_001400_01_20241014115155_42.png differ diff --git a/sample/test-5_001500_00_20241014115337_42.png b/sample/test-5_001500_00_20241014115337_42.png new file mode 100644 index 0000000000000000000000000000000000000000..2f92ae72f136ae37604d0f7edee6518608221cf7 Binary files /dev/null and b/sample/test-5_001500_00_20241014115337_42.png differ diff --git a/sample/test-5_001500_01_20241014115346_42.png b/sample/test-5_001500_01_20241014115346_42.png new file mode 100644 index 0000000000000000000000000000000000000000..06a05d7bd058b077969990f76531a2d4aa2a005e Binary files /dev/null and b/sample/test-5_001500_01_20241014115346_42.png differ diff --git a/sample/test-5_001600_00_20241014115524_42.png b/sample/test-5_001600_00_20241014115524_42.png new file mode 100644 index 0000000000000000000000000000000000000000..810b6547f7dc405e02abf289472e81d9b1fc07b2 Binary files /dev/null and b/sample/test-5_001600_00_20241014115524_42.png differ diff --git a/sample/test-5_001600_01_20241014115533_42.png b/sample/test-5_001600_01_20241014115533_42.png new file mode 100644 index 0000000000000000000000000000000000000000..279c01088b634c7b28e77fafd851d2d1c624b756 Binary files /dev/null and b/sample/test-5_001600_01_20241014115533_42.png differ diff --git a/sample/test-5_001700_00_20241014115707_42.png b/sample/test-5_001700_00_20241014115707_42.png new file mode 100644 index 0000000000000000000000000000000000000000..b891fbc2576511f2f1b8106cb25616c013dd5fd1 Binary files /dev/null and b/sample/test-5_001700_00_20241014115707_42.png differ diff --git a/sample/test-5_001700_01_20241014115716_42.png b/sample/test-5_001700_01_20241014115716_42.png new file mode 100644 index 0000000000000000000000000000000000000000..a509a6c5f7e9ab0a2a25a5823541ef896af25514 Binary files /dev/null and b/sample/test-5_001700_01_20241014115716_42.png differ diff --git a/sample/test-5_001800_00_20241014115855_42.png b/sample/test-5_001800_00_20241014115855_42.png new file mode 100644 index 0000000000000000000000000000000000000000..21bcd48e1850641000a7355a8b9094641c426423 Binary files /dev/null and b/sample/test-5_001800_00_20241014115855_42.png differ diff --git a/sample/test-5_001800_01_20241014115904_42.png b/sample/test-5_001800_01_20241014115904_42.png new file mode 100644 index 0000000000000000000000000000000000000000..8c2d9f5e77a1fd051bc63336d45be1bbf098ac75 Binary files /dev/null and b/sample/test-5_001800_01_20241014115904_42.png differ diff --git a/sample/test-5_001900_00_20241014120038_42.png b/sample/test-5_001900_00_20241014120038_42.png new file mode 100644 index 0000000000000000000000000000000000000000..a45abac80f6a43eac8bea68e718c014dc4d3124f Binary files /dev/null and b/sample/test-5_001900_00_20241014120038_42.png differ diff --git a/sample/test-5_001900_01_20241014120047_42.png b/sample/test-5_001900_01_20241014120047_42.png new file mode 100644 index 0000000000000000000000000000000000000000..a6206f0445c07db31198e748e73867561331885d Binary files /dev/null and b/sample/test-5_001900_01_20241014120047_42.png differ diff --git a/sample/test-5_002000_00_20241014120225_42.png b/sample/test-5_002000_00_20241014120225_42.png new file mode 100644 index 0000000000000000000000000000000000000000..bddc617c0c2bb13a99184a229fcfe494c93742fe Binary files /dev/null and b/sample/test-5_002000_00_20241014120225_42.png differ diff --git a/sample/test-5_002000_01_20241014120234_42.png b/sample/test-5_002000_01_20241014120234_42.png new file mode 100644 index 0000000000000000000000000000000000000000..b1d8b244815c5e4a17e355e6603cf9be7bc26ca8 Binary files /dev/null and b/sample/test-5_002000_01_20241014120234_42.png differ diff --git a/sample/test-5_002100_00_20241014120413_42.png b/sample/test-5_002100_00_20241014120413_42.png new file mode 100644 index 0000000000000000000000000000000000000000..9c76c0aa37b770048bec92c21ce536a87d2288d9 Binary files /dev/null and b/sample/test-5_002100_00_20241014120413_42.png differ diff --git a/sample/test-5_002100_01_20241014120422_42.png b/sample/test-5_002100_01_20241014120422_42.png new file mode 100644 index 0000000000000000000000000000000000000000..ad4b1dda97b6c7ed09f912aae797c437759742c4 Binary files /dev/null and b/sample/test-5_002100_01_20241014120422_42.png differ diff --git a/sample/test-5_002200_00_20241014120558_42.png b/sample/test-5_002200_00_20241014120558_42.png new file mode 100644 index 0000000000000000000000000000000000000000..c9d193c819ca3214bfbf2966b98c09f07337df4a Binary files /dev/null and b/sample/test-5_002200_00_20241014120558_42.png differ diff --git a/sample/test-5_002200_01_20241014120607_42.png b/sample/test-5_002200_01_20241014120607_42.png new file mode 100644 index 0000000000000000000000000000000000000000..16b689016ae541393ede80de04e2b55076a318c8 Binary files /dev/null and b/sample/test-5_002200_01_20241014120607_42.png differ diff --git a/sample/test-5_002300_00_20241014120745_42.png b/sample/test-5_002300_00_20241014120745_42.png new file mode 100644 index 0000000000000000000000000000000000000000..1f5e39bef523e87cca245b8b9a8f9f356dce0640 Binary files /dev/null and b/sample/test-5_002300_00_20241014120745_42.png differ diff --git a/sample/test-5_002300_01_20241014120754_42.png b/sample/test-5_002300_01_20241014120754_42.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f2b9156b1cb56b578838ea9d9367bf04e6983d Binary files /dev/null and b/sample/test-5_002300_01_20241014120754_42.png differ diff --git a/sample_prompts.txt b/sample_prompts.txt new file mode 100644 index 0000000000000000000000000000000000000000..ec6b4e9de2d7c086a21f973cba62fd2533c537cb --- /dev/null +++ b/sample_prompts.txt @@ -0,0 +1,2 @@ +1lustrat10n a man and woman sitting at a table with a laptop and a cup of coffee. --d 42 +1lustrat10n a man and woman walking their dog in the city. --d 42 diff --git a/test-5-000004.safetensors b/test-5-000004.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a20249660c14ad33583431b3682dbb770f9542ed --- /dev/null +++ b/test-5-000004.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1375db4252eea04faf0f4042ceb6a483cc3f63f9bbd819feddca8ddcb409492a +size 39764112 diff --git a/test-5-000008.safetensors b/test-5-000008.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..da78b5829a44d7d87007b54af37253ef43a63441 --- /dev/null +++ b/test-5-000008.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e51613cc46b3b2ad5ada1e264552600c0a07a04b38e597c3f46274eaedf86294 +size 39764120 diff --git a/test-5-000012.safetensors b/test-5-000012.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..afe328092b67c61d859844e7ca8db8604ca2e1e1 --- /dev/null +++ b/test-5-000012.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbe329ac3069d0a97837863fdb085283af8bc9215b7819acdba81b5344b38b62 +size 39764120 diff --git a/test-5.safetensors b/test-5.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..e8c9b6feac8c39535235a0a8551ef22e5eba2719 --- /dev/null +++ b/test-5.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e4c432bcd83a4cc8ab01ca73ff717e57e2c50918259534013219081b7799846 +size 39764120 diff --git a/train.sh b/train.sh new file mode 100644 index 0000000000000000000000000000000000000000..e157514cb9d5900643e472c6a794adc7a0a6c185 --- /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-schnell.safetensors" \ + --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/test-5/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/test-5/dataset.toml" \ + --output_dir "/app/fluxgym/outputs/test-5" \ + --output_name test-5 \ + --timestep_sampling shift \ + --discrete_flow_shift 3.1582 \ + --model_prediction_type raw \ + --guidance_scale 1 \ + --loss_type l2 \ \ No newline at end of file