├── .gitignore ├── LICENSE ├── WEIGHTS_LICENSE ├── __init__.py ├── configs ├── inference │ ├── controlnet_c_3b_canny.yaml │ ├── controlnet_c_3b_identity.yaml │ ├── controlnet_c_3b_inpainting.yaml │ ├── controlnet_c_3b_sr.yaml │ ├── lora_c_3b.yaml │ ├── stage_b_1b.yaml │ ├── stage_b_3b.yaml │ ├── stage_c_1b.yaml │ ├── stage_c_3b.yaml │ ├── trained_c_1b.yaml │ └── trained_c_3b.yaml └── training │ ├── controlnet_c_3b_canny.yaml │ ├── controlnet_c_3b_identity.yaml │ ├── controlnet_c_3b_inpainting.yaml │ ├── controlnet_c_3b_sr.yaml │ ├── finetune_b_3b.yaml │ ├── finetune_b_700m.yaml │ ├── finetune_c_1b.yaml │ ├── finetune_c_3b.yaml │ ├── finetune_c_3b_lora.yaml │ ├── finetune_c_3b_lowres.yaml │ └── finetune_c_3b_v.yaml ├── core ├── __init__.py ├── data │ ├── __init__.py │ └── bucketeer.py ├── scripts │ ├── __init__.py │ └── cli.py ├── templates │ ├── __init__.py │ └── diffusion.py └── utils │ ├── __init__.py │ ├── base_dto.py │ └── save_and_load.py ├── figures ├── collage_1.jpg ├── collage_2.jpg ├── collage_3.jpg ├── collage_4.jpg ├── comparison-inference-speed.jpg ├── comparison.png ├── controlnet-canny.jpg ├── controlnet-face.jpg ├── controlnet-paint.jpg ├── controlnet-sr.jpg ├── fernando.jpg ├── fernando_original.jpg ├── image-to-image-example-rodent.jpg ├── image-variations-example-headset.jpg ├── model-overview.jpg ├── original.jpg ├── reconstructed.jpg └── text-to-image-example-penguin.jpg ├── gdf ├── __init__.py ├── loss_weights.py ├── noise_conditions.py ├── readme.md ├── samplers.py ├── scalers.py ├── schedulers.py └── targets.py ├── gradio_app ├── app.py └── style.css ├── inference ├── readme.md ├── stage_c_1b_stage_b_1b.py ├── stage_c_1b_stage_b_3b.py ├── trained_c_1b_stage_b_1b.py ├── trained_c_1b_stage_b_3b.py ├── trained_c_3b_stage_b_1b.py ├── trained_c_3b_stage_b_3b.py └── utils.py ├── input └── data.tar ├── models ├── download_models.sh └── readme.md ├── modules ├── __init__.py ├── cnet_modules │ ├── face_id │ │ └── arcface.py │ ├── inpainting │ │ ├── saliency_model.pt │ │ └── saliency_model.py │ └── pidinet │ │ ├── __init__.py │ │ ├── ckpts │ │ └── table5_pidinet.pth │ │ ├── model.py │ │ └── util.py ├── common.py ├── controlnet.py ├── effnet.py ├── lora.py ├── previewer.py ├── stage_a.py ├── stage_b.py └── stage_c.py ├── readme.md ├── requirements.txt └── train ├── __init__.py ├── adafactor.py ├── base.py ├── example_train.sh ├── readme.md ├── train_b.py ├── train_c.py ├── train_c_controlnet.py └── train_c_lora.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/LICENSE -------------------------------------------------------------------------------- /WEIGHTS_LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/WEIGHTS_LICENSE -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /configs/inference/controlnet_c_3b_canny.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/controlnet_c_3b_canny.yaml -------------------------------------------------------------------------------- /configs/inference/controlnet_c_3b_identity.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/controlnet_c_3b_identity.yaml -------------------------------------------------------------------------------- /configs/inference/controlnet_c_3b_inpainting.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/controlnet_c_3b_inpainting.yaml -------------------------------------------------------------------------------- /configs/inference/controlnet_c_3b_sr.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/controlnet_c_3b_sr.yaml -------------------------------------------------------------------------------- /configs/inference/lora_c_3b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/lora_c_3b.yaml -------------------------------------------------------------------------------- /configs/inference/stage_b_1b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/stage_b_1b.yaml -------------------------------------------------------------------------------- /configs/inference/stage_b_3b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/stage_b_3b.yaml -------------------------------------------------------------------------------- /configs/inference/stage_c_1b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/stage_c_1b.yaml -------------------------------------------------------------------------------- /configs/inference/stage_c_3b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/stage_c_3b.yaml -------------------------------------------------------------------------------- /configs/inference/trained_c_1b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/trained_c_1b.yaml -------------------------------------------------------------------------------- /configs/inference/trained_c_3b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/inference/trained_c_3b.yaml -------------------------------------------------------------------------------- /configs/training/controlnet_c_3b_canny.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/controlnet_c_3b_canny.yaml -------------------------------------------------------------------------------- /configs/training/controlnet_c_3b_identity.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/controlnet_c_3b_identity.yaml -------------------------------------------------------------------------------- /configs/training/controlnet_c_3b_inpainting.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/controlnet_c_3b_inpainting.yaml -------------------------------------------------------------------------------- /configs/training/controlnet_c_3b_sr.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/controlnet_c_3b_sr.yaml -------------------------------------------------------------------------------- /configs/training/finetune_b_3b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/finetune_b_3b.yaml -------------------------------------------------------------------------------- /configs/training/finetune_b_700m.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/finetune_b_700m.yaml -------------------------------------------------------------------------------- /configs/training/finetune_c_1b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/finetune_c_1b.yaml -------------------------------------------------------------------------------- /configs/training/finetune_c_3b.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/finetune_c_3b.yaml -------------------------------------------------------------------------------- /configs/training/finetune_c_3b_lora.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/finetune_c_3b_lora.yaml -------------------------------------------------------------------------------- /configs/training/finetune_c_3b_lowres.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/finetune_c_3b_lowres.yaml -------------------------------------------------------------------------------- /configs/training/finetune_c_3b_v.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/configs/training/finetune_c_3b_v.yaml -------------------------------------------------------------------------------- /core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/__init__.py -------------------------------------------------------------------------------- /core/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/data/__init__.py -------------------------------------------------------------------------------- /core/data/bucketeer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/data/bucketeer.py -------------------------------------------------------------------------------- /core/scripts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/scripts/cli.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/scripts/cli.py -------------------------------------------------------------------------------- /core/templates/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/templates/__init__.py -------------------------------------------------------------------------------- /core/templates/diffusion.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/templates/diffusion.py -------------------------------------------------------------------------------- /core/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/utils/__init__.py -------------------------------------------------------------------------------- /core/utils/base_dto.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/utils/base_dto.py -------------------------------------------------------------------------------- /core/utils/save_and_load.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/core/utils/save_and_load.py -------------------------------------------------------------------------------- /figures/collage_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/collage_1.jpg -------------------------------------------------------------------------------- /figures/collage_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/collage_2.jpg -------------------------------------------------------------------------------- /figures/collage_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/collage_3.jpg -------------------------------------------------------------------------------- /figures/collage_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/collage_4.jpg -------------------------------------------------------------------------------- /figures/comparison-inference-speed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/comparison-inference-speed.jpg -------------------------------------------------------------------------------- /figures/comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/comparison.png -------------------------------------------------------------------------------- /figures/controlnet-canny.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/controlnet-canny.jpg -------------------------------------------------------------------------------- /figures/controlnet-face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/controlnet-face.jpg -------------------------------------------------------------------------------- /figures/controlnet-paint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/controlnet-paint.jpg -------------------------------------------------------------------------------- /figures/controlnet-sr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/controlnet-sr.jpg -------------------------------------------------------------------------------- /figures/fernando.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/fernando.jpg -------------------------------------------------------------------------------- /figures/fernando_original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/fernando_original.jpg -------------------------------------------------------------------------------- /figures/image-to-image-example-rodent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/image-to-image-example-rodent.jpg -------------------------------------------------------------------------------- /figures/image-variations-example-headset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/image-variations-example-headset.jpg -------------------------------------------------------------------------------- /figures/model-overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/model-overview.jpg -------------------------------------------------------------------------------- /figures/original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/original.jpg -------------------------------------------------------------------------------- /figures/reconstructed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/reconstructed.jpg -------------------------------------------------------------------------------- /figures/text-to-image-example-penguin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/figures/text-to-image-example-penguin.jpg -------------------------------------------------------------------------------- /gdf/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/__init__.py -------------------------------------------------------------------------------- /gdf/loss_weights.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/loss_weights.py -------------------------------------------------------------------------------- /gdf/noise_conditions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/noise_conditions.py -------------------------------------------------------------------------------- /gdf/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/readme.md -------------------------------------------------------------------------------- /gdf/samplers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/samplers.py -------------------------------------------------------------------------------- /gdf/scalers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/scalers.py -------------------------------------------------------------------------------- /gdf/schedulers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/schedulers.py -------------------------------------------------------------------------------- /gdf/targets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gdf/targets.py -------------------------------------------------------------------------------- /gradio_app/app.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gradio_app/app.py -------------------------------------------------------------------------------- /gradio_app/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/gradio_app/style.css -------------------------------------------------------------------------------- /inference/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/readme.md -------------------------------------------------------------------------------- /inference/stage_c_1b_stage_b_1b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/stage_c_1b_stage_b_1b.py -------------------------------------------------------------------------------- /inference/stage_c_1b_stage_b_3b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/stage_c_1b_stage_b_3b.py -------------------------------------------------------------------------------- /inference/trained_c_1b_stage_b_1b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/trained_c_1b_stage_b_1b.py -------------------------------------------------------------------------------- /inference/trained_c_1b_stage_b_3b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/trained_c_1b_stage_b_3b.py -------------------------------------------------------------------------------- /inference/trained_c_3b_stage_b_1b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/trained_c_3b_stage_b_1b.py -------------------------------------------------------------------------------- /inference/trained_c_3b_stage_b_3b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/trained_c_3b_stage_b_3b.py -------------------------------------------------------------------------------- /inference/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/inference/utils.py -------------------------------------------------------------------------------- /input/data.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/input/data.tar -------------------------------------------------------------------------------- /models/download_models.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/models/download_models.sh -------------------------------------------------------------------------------- /models/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/models/readme.md -------------------------------------------------------------------------------- /modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/__init__.py -------------------------------------------------------------------------------- /modules/cnet_modules/face_id/arcface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/cnet_modules/face_id/arcface.py -------------------------------------------------------------------------------- /modules/cnet_modules/inpainting/saliency_model.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/cnet_modules/inpainting/saliency_model.pt -------------------------------------------------------------------------------- /modules/cnet_modules/inpainting/saliency_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/cnet_modules/inpainting/saliency_model.py -------------------------------------------------------------------------------- /modules/cnet_modules/pidinet/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/cnet_modules/pidinet/__init__.py -------------------------------------------------------------------------------- /modules/cnet_modules/pidinet/ckpts/table5_pidinet.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/cnet_modules/pidinet/ckpts/table5_pidinet.pth -------------------------------------------------------------------------------- /modules/cnet_modules/pidinet/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/cnet_modules/pidinet/model.py -------------------------------------------------------------------------------- /modules/cnet_modules/pidinet/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/cnet_modules/pidinet/util.py -------------------------------------------------------------------------------- /modules/common.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/common.py -------------------------------------------------------------------------------- /modules/controlnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/controlnet.py -------------------------------------------------------------------------------- /modules/effnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/effnet.py -------------------------------------------------------------------------------- /modules/lora.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/lora.py -------------------------------------------------------------------------------- /modules/previewer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/previewer.py -------------------------------------------------------------------------------- /modules/stage_a.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/stage_a.py -------------------------------------------------------------------------------- /modules/stage_b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/stage_b.py -------------------------------------------------------------------------------- /modules/stage_c.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/modules/stage_c.py -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/readme.md -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/requirements.txt -------------------------------------------------------------------------------- /train/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/__init__.py -------------------------------------------------------------------------------- /train/adafactor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/adafactor.py -------------------------------------------------------------------------------- /train/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/base.py -------------------------------------------------------------------------------- /train/example_train.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/example_train.sh -------------------------------------------------------------------------------- /train/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/readme.md -------------------------------------------------------------------------------- /train/train_b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/train_b.py -------------------------------------------------------------------------------- /train/train_c.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/train_c.py -------------------------------------------------------------------------------- /train/train_c_controlnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/train_c_controlnet.py -------------------------------------------------------------------------------- /train/train_c_lora.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2kpr/StableCascade/HEAD/train/train_c_lora.py --------------------------------------------------------------------------------