├── .gitignore ├── Change.md ├── LICENSE.md ├── README.md ├── docs ├── API.md ├── Algo-Details.md ├── Algo-List.md ├── Conversion-scripts.md ├── Demo.md ├── Guidelines.md ├── Network-Args.md ├── Preset.md ├── Resources.md └── images │ ├── banner.png │ ├── banner2.png │ ├── lokr-linear.png │ └── lora-loha-lokr.png ├── example ├── bnb_example.py ├── functional_example.py ├── high_precision_merge_demo.py ├── stacked_wrapper_demo.py └── standalone_example.py ├── example_configs ├── preset_configs │ └── example.toml └── training_configs │ ├── hcp │ ├── base_dataset.yaml │ ├── hcp_caption.txt │ ├── hcp_diag_oft.yaml │ ├── hcp_loha.yaml │ ├── hcp_lokr.yaml │ ├── text2img.yaml │ ├── train_base.yaml │ └── tuning_base.yaml │ └── kohya │ ├── dataset_config.toml │ ├── loha_config.toml │ ├── lokr_config.toml │ ├── lora_config.toml │ └── lycoris_full_config.toml ├── lycoris ├── __init__.py ├── config.py ├── config_sdk.py ├── functional │ ├── __init__.py │ ├── boft.py │ ├── diag_oft.py │ ├── general.py │ ├── locon.py │ ├── loha.py │ └── lokr.py ├── kohya.py ├── logging.py ├── modules │ ├── __init__.py │ ├── base.py │ ├── boft.py │ ├── diag_oft.py │ ├── dylora.py │ ├── full.py │ ├── glora.py │ ├── ia3.py │ ├── locon.py │ ├── loha.py │ ├── lokr.py │ └── norms.py ├── utils │ ├── __init__.py │ ├── general.py │ ├── logger.py │ ├── preset.py │ ├── quant.py │ └── xformers_utils.py └── wrapper.py ├── requirements-dev.txt ├── requirements-kohya.txt ├── requirements.txt ├── setup.py ├── test ├── __init__.py ├── compile.py ├── compile_swap_err_minimal_rep.py ├── functional.py ├── kohya.py ├── module.py ├── precision_merge_test.py ├── restore.py └── wrapper.py ├── tools ├── batch_bundle_convert.py ├── batch_hcp_convert.py ├── extract_locon.py ├── merge.py ├── pack_bundle.py └── sdxl_emb.py └── unit-test.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/.gitignore -------------------------------------------------------------------------------- /Change.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/Change.md -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/README.md -------------------------------------------------------------------------------- /docs/API.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/API.md -------------------------------------------------------------------------------- /docs/Algo-Details.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Algo-Details.md -------------------------------------------------------------------------------- /docs/Algo-List.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Algo-List.md -------------------------------------------------------------------------------- /docs/Conversion-scripts.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Conversion-scripts.md -------------------------------------------------------------------------------- /docs/Demo.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Demo.md -------------------------------------------------------------------------------- /docs/Guidelines.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Guidelines.md -------------------------------------------------------------------------------- /docs/Network-Args.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Network-Args.md -------------------------------------------------------------------------------- /docs/Preset.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Preset.md -------------------------------------------------------------------------------- /docs/Resources.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/Resources.md -------------------------------------------------------------------------------- /docs/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/images/banner.png -------------------------------------------------------------------------------- /docs/images/banner2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/images/banner2.png -------------------------------------------------------------------------------- /docs/images/lokr-linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/images/lokr-linear.png -------------------------------------------------------------------------------- /docs/images/lora-loha-lokr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/docs/images/lora-loha-lokr.png -------------------------------------------------------------------------------- /example/bnb_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example/bnb_example.py -------------------------------------------------------------------------------- /example/functional_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example/functional_example.py -------------------------------------------------------------------------------- /example/high_precision_merge_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example/high_precision_merge_demo.py -------------------------------------------------------------------------------- /example/stacked_wrapper_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example/stacked_wrapper_demo.py -------------------------------------------------------------------------------- /example/standalone_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example/standalone_example.py -------------------------------------------------------------------------------- /example_configs/preset_configs/example.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/preset_configs/example.toml -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/base_dataset.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/hcp/base_dataset.yaml -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/hcp_caption.txt: -------------------------------------------------------------------------------- 1 | {caption} -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/hcp_diag_oft.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/hcp/hcp_diag_oft.yaml -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/hcp_loha.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/hcp/hcp_loha.yaml -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/hcp_lokr.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/hcp/hcp_lokr.yaml -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/text2img.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/hcp/text2img.yaml -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/train_base.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/hcp/train_base.yaml -------------------------------------------------------------------------------- /example_configs/training_configs/hcp/tuning_base.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/hcp/tuning_base.yaml -------------------------------------------------------------------------------- /example_configs/training_configs/kohya/dataset_config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/kohya/dataset_config.toml -------------------------------------------------------------------------------- /example_configs/training_configs/kohya/loha_config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/kohya/loha_config.toml -------------------------------------------------------------------------------- /example_configs/training_configs/kohya/lokr_config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/kohya/lokr_config.toml -------------------------------------------------------------------------------- /example_configs/training_configs/kohya/lora_config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/kohya/lora_config.toml -------------------------------------------------------------------------------- /example_configs/training_configs/kohya/lycoris_full_config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/example_configs/training_configs/kohya/lycoris_full_config.toml -------------------------------------------------------------------------------- /lycoris/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/__init__.py -------------------------------------------------------------------------------- /lycoris/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/config.py -------------------------------------------------------------------------------- /lycoris/config_sdk.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/config_sdk.py -------------------------------------------------------------------------------- /lycoris/functional/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/functional/__init__.py -------------------------------------------------------------------------------- /lycoris/functional/boft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/functional/boft.py -------------------------------------------------------------------------------- /lycoris/functional/diag_oft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/functional/diag_oft.py -------------------------------------------------------------------------------- /lycoris/functional/general.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/functional/general.py -------------------------------------------------------------------------------- /lycoris/functional/locon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/functional/locon.py -------------------------------------------------------------------------------- /lycoris/functional/loha.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/functional/loha.py -------------------------------------------------------------------------------- /lycoris/functional/lokr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/functional/lokr.py -------------------------------------------------------------------------------- /lycoris/kohya.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/kohya.py -------------------------------------------------------------------------------- /lycoris/logging.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/logging.py -------------------------------------------------------------------------------- /lycoris/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/__init__.py -------------------------------------------------------------------------------- /lycoris/modules/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/base.py -------------------------------------------------------------------------------- /lycoris/modules/boft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/boft.py -------------------------------------------------------------------------------- /lycoris/modules/diag_oft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/diag_oft.py -------------------------------------------------------------------------------- /lycoris/modules/dylora.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/dylora.py -------------------------------------------------------------------------------- /lycoris/modules/full.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/full.py -------------------------------------------------------------------------------- /lycoris/modules/glora.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/glora.py -------------------------------------------------------------------------------- /lycoris/modules/ia3.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/ia3.py -------------------------------------------------------------------------------- /lycoris/modules/locon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/locon.py -------------------------------------------------------------------------------- /lycoris/modules/loha.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/loha.py -------------------------------------------------------------------------------- /lycoris/modules/lokr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/lokr.py -------------------------------------------------------------------------------- /lycoris/modules/norms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/modules/norms.py -------------------------------------------------------------------------------- /lycoris/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/utils/__init__.py -------------------------------------------------------------------------------- /lycoris/utils/general.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/utils/general.py -------------------------------------------------------------------------------- /lycoris/utils/logger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/utils/logger.py -------------------------------------------------------------------------------- /lycoris/utils/preset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/utils/preset.py -------------------------------------------------------------------------------- /lycoris/utils/quant.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/utils/quant.py -------------------------------------------------------------------------------- /lycoris/utils/xformers_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/utils/xformers_utils.py -------------------------------------------------------------------------------- /lycoris/wrapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/lycoris/wrapper.py -------------------------------------------------------------------------------- /requirements-dev.txt: -------------------------------------------------------------------------------- 1 | coverage 2 | parameterized 3 | numpy 4 | safetensors 5 | tqdm 6 | diffusers==0.30.2 7 | -------------------------------------------------------------------------------- /requirements-kohya.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/requirements-kohya.txt -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/requirements.txt -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/setup.py -------------------------------------------------------------------------------- /test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/compile.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/compile.py -------------------------------------------------------------------------------- /test/compile_swap_err_minimal_rep.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/compile_swap_err_minimal_rep.py -------------------------------------------------------------------------------- /test/functional.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/functional.py -------------------------------------------------------------------------------- /test/kohya.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/kohya.py -------------------------------------------------------------------------------- /test/module.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/module.py -------------------------------------------------------------------------------- /test/precision_merge_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/precision_merge_test.py -------------------------------------------------------------------------------- /test/restore.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/restore.py -------------------------------------------------------------------------------- /test/wrapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/test/wrapper.py -------------------------------------------------------------------------------- /tools/batch_bundle_convert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/tools/batch_bundle_convert.py -------------------------------------------------------------------------------- /tools/batch_hcp_convert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/tools/batch_hcp_convert.py -------------------------------------------------------------------------------- /tools/extract_locon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/tools/extract_locon.py -------------------------------------------------------------------------------- /tools/merge.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/tools/merge.py -------------------------------------------------------------------------------- /tools/pack_bundle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/tools/pack_bundle.py -------------------------------------------------------------------------------- /tools/sdxl_emb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/tools/sdxl_emb.py -------------------------------------------------------------------------------- /unit-test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KohakuBlueleaf/LyCORIS/HEAD/unit-test.py --------------------------------------------------------------------------------