lycoris-lora 2.3.0.dev5__tar.gz → 2.3.0.dev6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lycoris_lora-2.3.0.dev5/lycoris_lora.egg-info → lycoris_lora-2.3.0.dev6}/PKG-INFO +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/kohya/__init__.py +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/kohya/model_utils.py +24 -24
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/kohya/sdxl_model_util.py +4 -6
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/glokr.py +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/glora.py +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/lilora.py +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/locon.py +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/loha.py +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6/lycoris_lora.egg-info}/PKG-INFO +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/setup.py +1 -1
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/LICENSE.md +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/README.md +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/config.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/hcp/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/hcp/base.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/hcp/diag_oft.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/hcp/loha.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/hcp/lokr.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/kohya/original_unet.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/kohya/sdxl_original_unet.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/kohya/utils.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/logging.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/attention.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/base.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/boft.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/diag_oft.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/dylora.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/full.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/hypernet/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/hypernet/generater.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/hypernet/text_encoder.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/ia3.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/lokr.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/norms.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/utils/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/utils/bnb.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/utils/logger.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/utils/preset.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/utils/xformers_utils.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/wrapper.py +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris_lora.egg-info/SOURCES.txt +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris_lora.egg-info/dependency_links.txt +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris_lora.egg-info/not-zip-safe +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris_lora.egg-info/requires.txt +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris_lora.egg-info/top_level.txt +0 -0
- {lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 2.3.0.
|
|
3
|
+
Version: 2.3.0.dev6
|
|
4
4
|
Summary: Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion
|
|
5
5
|
Home-page: https://github.com/KohakuBlueleaf/LyCORIS
|
|
6
6
|
Author: Shih-Ying Yeh(KohakuBlueLeaf), Yu-Guan Hsieh, Zhidong Gao
|
|
@@ -357,12 +357,12 @@ def convert_ldm_unet_checkpoint(v2, checkpoint, config):
|
|
|
357
357
|
attentions = [key for key in input_blocks[i] if f"input_blocks.{i}.1" in key]
|
|
358
358
|
|
|
359
359
|
if f"input_blocks.{i}.0.op.weight" in unet_state_dict:
|
|
360
|
-
new_checkpoint[
|
|
361
|
-
|
|
362
|
-
)
|
|
363
|
-
new_checkpoint[
|
|
364
|
-
|
|
365
|
-
)
|
|
360
|
+
new_checkpoint[
|
|
361
|
+
f"down_blocks.{block_id}.downsamplers.0.conv.weight"
|
|
362
|
+
] = unet_state_dict.pop(f"input_blocks.{i}.0.op.weight")
|
|
363
|
+
new_checkpoint[
|
|
364
|
+
f"down_blocks.{block_id}.downsamplers.0.conv.bias"
|
|
365
|
+
] = unet_state_dict.pop(f"input_blocks.{i}.0.op.bias")
|
|
366
366
|
|
|
367
367
|
paths = renew_resnet_paths(resnets)
|
|
368
368
|
meta_path = {
|
|
@@ -457,12 +457,12 @@ def convert_ldm_unet_checkpoint(v2, checkpoint, config):
|
|
|
457
457
|
index = list(output_block_list.values()).index(
|
|
458
458
|
["conv.bias", "conv.weight"]
|
|
459
459
|
)
|
|
460
|
-
new_checkpoint[
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
new_checkpoint[
|
|
464
|
-
|
|
465
|
-
|
|
460
|
+
new_checkpoint[
|
|
461
|
+
f"up_blocks.{block_id}.upsamplers.0.conv.bias"
|
|
462
|
+
] = unet_state_dict[f"output_blocks.{i}.{index}.conv.bias"]
|
|
463
|
+
new_checkpoint[
|
|
464
|
+
f"up_blocks.{block_id}.upsamplers.0.conv.weight"
|
|
465
|
+
] = unet_state_dict[f"output_blocks.{i}.{index}.conv.weight"]
|
|
466
466
|
|
|
467
467
|
# Clear attentions as they have been attributed above.
|
|
468
468
|
if len(attentions) == 2:
|
|
@@ -586,12 +586,12 @@ def convert_ldm_vae_checkpoint(checkpoint, config):
|
|
|
586
586
|
]
|
|
587
587
|
|
|
588
588
|
if f"encoder.down.{i}.downsample.conv.weight" in vae_state_dict:
|
|
589
|
-
new_checkpoint[
|
|
590
|
-
|
|
591
|
-
)
|
|
592
|
-
new_checkpoint[
|
|
593
|
-
|
|
594
|
-
)
|
|
589
|
+
new_checkpoint[
|
|
590
|
+
f"encoder.down_blocks.{i}.downsamplers.0.conv.weight"
|
|
591
|
+
] = vae_state_dict.pop(f"encoder.down.{i}.downsample.conv.weight")
|
|
592
|
+
new_checkpoint[
|
|
593
|
+
f"encoder.down_blocks.{i}.downsamplers.0.conv.bias"
|
|
594
|
+
] = vae_state_dict.pop(f"encoder.down.{i}.downsample.conv.bias")
|
|
595
595
|
|
|
596
596
|
paths = renew_vae_resnet_paths(resnets)
|
|
597
597
|
meta_path = {"old": f"down.{i}.block", "new": f"down_blocks.{i}.resnets"}
|
|
@@ -639,12 +639,12 @@ def convert_ldm_vae_checkpoint(checkpoint, config):
|
|
|
639
639
|
]
|
|
640
640
|
|
|
641
641
|
if f"decoder.up.{block_id}.upsample.conv.weight" in vae_state_dict:
|
|
642
|
-
new_checkpoint[
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
new_checkpoint[
|
|
646
|
-
|
|
647
|
-
|
|
642
|
+
new_checkpoint[
|
|
643
|
+
f"decoder.up_blocks.{i}.upsamplers.0.conv.weight"
|
|
644
|
+
] = vae_state_dict[f"decoder.up.{block_id}.upsample.conv.weight"]
|
|
645
|
+
new_checkpoint[
|
|
646
|
+
f"decoder.up_blocks.{i}.upsamplers.0.conv.bias"
|
|
647
|
+
] = vae_state_dict[f"decoder.up.{block_id}.upsample.conv.bias"]
|
|
648
648
|
|
|
649
649
|
paths = renew_vae_resnet_paths(resnets)
|
|
650
650
|
meta_path = {"old": f"up.{block_id}.block", "new": f"up_blocks.{i}.resnets"}
|
|
@@ -15,9 +15,7 @@ VAE_SCALE_FACTOR = 0.13025
|
|
|
15
15
|
MODEL_VERSION_SDXL_BASE_V0_9 = "sdxl_base_v0-9"
|
|
16
16
|
|
|
17
17
|
# Diffusersの設定を読み込むための参照モデル
|
|
18
|
-
DIFFUSERS_REF_MODEL_ID_SDXL =
|
|
19
|
-
"stabilityai/stable-diffusion-xl-base-0.9" # アクセス権が必要
|
|
20
|
-
)
|
|
18
|
+
DIFFUSERS_REF_MODEL_ID_SDXL = "stabilityai/stable-diffusion-xl-base-0.9" # アクセス権が必要
|
|
21
19
|
|
|
22
20
|
DIFFUSERS_SDXL_UNET_CONFIG = {
|
|
23
21
|
"act_fn": "silu",
|
|
@@ -237,9 +235,9 @@ def load_models_from_sdxl_checkpoint(model_version, ckpt_path, map_location):
|
|
|
237
235
|
te2_sd = {}
|
|
238
236
|
for k in list(state_dict.keys()):
|
|
239
237
|
if k.startswith("conditioner.embedders.0.transformer."):
|
|
240
|
-
te1_sd[
|
|
241
|
-
|
|
242
|
-
)
|
|
238
|
+
te1_sd[
|
|
239
|
+
k.replace("conditioner.embedders.0.transformer.", "")
|
|
240
|
+
] = state_dict.pop(k)
|
|
243
241
|
elif k.startswith("conditioner.embedders.1.model."):
|
|
244
242
|
te2_sd[k] = state_dict.pop(k)
|
|
245
243
|
|
|
@@ -200,7 +200,7 @@ class LohaModule(ModuleCustomSD):
|
|
|
200
200
|
if type(alpha) == torch.Tensor:
|
|
201
201
|
alpha = alpha.detach().float().numpy() # without casting, bf16 causes error
|
|
202
202
|
alpha = lora_dim if alpha is None or alpha == 0 else alpha
|
|
203
|
-
|
|
203
|
+
|
|
204
204
|
r_factor = lora_dim
|
|
205
205
|
if self.rs_lora:
|
|
206
206
|
r_factor = math.sqrt(r_factor)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 2.3.0.
|
|
3
|
+
Version: 2.3.0.dev6
|
|
4
4
|
Summary: Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion
|
|
5
5
|
Home-page: https://github.com/KohakuBlueleaf/LyCORIS
|
|
6
6
|
Author: Shih-Ying Yeh(KohakuBlueLeaf), Yu-Guan Hsieh, Zhidong Gao
|
|
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
|
|
|
4
4
|
setup(
|
|
5
5
|
name="lycoris_lora",
|
|
6
6
|
packages=find_packages(),
|
|
7
|
-
version="2.3.0.
|
|
7
|
+
version="2.3.0.dev6",
|
|
8
8
|
url="https://github.com/KohakuBlueleaf/LyCORIS",
|
|
9
9
|
description="Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion",
|
|
10
10
|
author="Shih-Ying Yeh(KohakuBlueLeaf), Yu-Guan Hsieh, Zhidong Gao",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris/modules/hypernet/text_encoder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lycoris_lora-2.3.0.dev5 → lycoris_lora-2.3.0.dev6}/lycoris_lora.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|