Skip to content

Commit

Permalink
Revert "Merge branch 'dev' into master"
Browse files Browse the repository at this point in the history
This reverts commit 4b91ee0, reversing
changes made to fc7e3c5.
  • Loading branch information
vladmandic committed Oct 26, 2023
1 parent 90d2197 commit 5219daa
Show file tree
Hide file tree
Showing 282 changed files with 288 additions and 43,168 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ cache
!package.json

# all dynamic stuff
/repositories/**/*
/extensions/**/*
/outputs/**/*
/embeddings/**/*
Expand All @@ -58,5 +59,6 @@ cache
/localizations

# unexcluded so folders get created
!/repositories/.placeholder
!/models/VAE-approx
!/models/VAE-approx/model.pt
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@
path = extensions-builtin/sd-extension-chainner
url = https://github.com/vladmandic/sd-extension-chainner
ignore = dirty
[submodule "modules/k-diffusion"]
path = modules/k-diffusion
url = https://github.com/crowsonkb/k-diffusion
ignore = dirty
1 change: 0 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ disable=bad-inline-option,
missing-function-docstring,
missing-module-docstring,
no-else-return,
not-callable,
pointless-string-statement,
raw-checker-failed,
simplifiable-if-expression,
Expand Down
80 changes: 0 additions & 80 deletions configs/v2-1-stable-unclip-h-inference.yaml

This file was deleted.

83 changes: 0 additions & 83 deletions configs/v2-1-stable-unclip-l-inference.yaml

This file was deleted.

74 changes: 0 additions & 74 deletions configs/v2-midas-inference.yaml

This file was deleted.

16 changes: 8 additions & 8 deletions extensions-builtin/Lora/lora_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,11 @@ def __init__(self):
self.converter = self.diffusers
self.is_sdxl = True if shared.sd_model_type == "sdxl" else False
self.UNET_CONVERSION_MAP = make_unet_conversion_map() if self.is_sdxl else None
self.LORA_PREFIX_UNET = "lora_unet_"
self.LORA_PREFIX_TEXT_ENCODER = "lora_te_"
self.OFT_PREFIX_UNET = "oft_unet_"
self.LORA_PREFIX_UNET = "lora_unet"
self.LORA_PREFIX_TEXT_ENCODER = "lora_te"
# SDXL: must starts with LORA_PREFIX_TEXT_ENCODER
self.LORA_PREFIX_TEXT_ENCODER1 = "lora_te1_"
self.LORA_PREFIX_TEXT_ENCODER2 = "lora_te2_"
self.LORA_PREFIX_TEXT_ENCODER1 = "lora_te1"
self.LORA_PREFIX_TEXT_ENCODER2 = "lora_te2"

def original(self, key):
key = convert_diffusers_name_to_compvis(key, self.is_sd2)
Expand All @@ -143,12 +142,13 @@ def diffusers(self, key):
if self.is_sdxl:
map_keys = list(self.UNET_CONVERSION_MAP.keys()) # prefix of U-Net modules
map_keys.sort()
search_key = key.replace(self.LORA_PREFIX_UNET, "").replace(self.OFT_PREFIX_UNET, "").replace(self.LORA_PREFIX_TEXT_ENCODER1, "").replace(self.LORA_PREFIX_TEXT_ENCODER2, "")

search_key = key.replace(self.LORA_PREFIX_UNET + "_", "").replace(self.LORA_PREFIX_TEXT_ENCODER1 + "_",
"").replace(
self.LORA_PREFIX_TEXT_ENCODER2 + "_", "")
position = bisect.bisect_right(map_keys, search_key)
map_key = map_keys[position - 1]
if search_key.startswith(map_key):
key = key.replace(map_key, self.UNET_CONVERSION_MAP[map_key]).replace("oft","lora") # pylint: disable=unsubscriptable-object
key = key.replace(map_key, self.UNET_CONVERSION_MAP[map_key]) # pylint: disable=unsubscriptable-object
sd_module = shared.sd_model.network_layer_mapping.get(key, None)
return key, sd_module

Expand Down
49 changes: 0 additions & 49 deletions extensions-builtin/Lora/network_oft.py

This file was deleted.

2 changes: 0 additions & 2 deletions extensions-builtin/Lora/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import network_lora
import network_hada
import network_ia3
import network_oft
import network_lokr
import network_full
import network_norm
Expand All @@ -33,7 +32,6 @@
network_lora.ModuleTypeLora(),
network_hada.ModuleTypeHada(),
network_ia3.ModuleTypeIa3(),
network_oft.ModuleTypeOFT(),
network_lokr.ModuleTypeLokr(),
network_full.ModuleTypeFull(),
network_norm.ModuleTypeNorm(),
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,6 @@ def install_packages():

# clone required repositories
def install_repositories():
"""
if args.profile:
pr = cProfile.Profile()
pr.enable()
Expand All @@ -616,7 +615,6 @@ def d(name):
clone(blip_repo, d('BLIP'), blip_commit)
if args.profile:
print_profile(pr, 'Repositories')
"""


# run extension installer
Expand Down
Loading

0 comments on commit 5219daa

Please sign in to comment.