From 0ff935bdba60db03360d5646c73e7ee4a56f272d Mon Sep 17 00:00:00 2001 From: parsee-mizuhashi <157323502+parsee-mizuhashi@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:34:10 -0700 Subject: [PATCH 1/3] Update initialize.py --- modules/initialize.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/initialize.py b/modules/initialize.py index ed6e54c15..e0605d480 100644 --- a/modules/initialize.py +++ b/modules/initialize.py @@ -133,8 +133,4 @@ def initialize_rest(*, reload_script_modules=False): extra_networks.register_default_extra_networks() startup_timer.record("initialize extra networks") - from modules_forge import google_blockly - google_blockly.initialization() - startup_timer.record("initialize google blockly") - return From e5acaeb9c67de1ad3817ff036b54076a1594b0b9 Mon Sep 17 00:00:00 2001 From: parsee-mizuhashi <157323502+parsee-mizuhashi@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:35:35 -0700 Subject: [PATCH 2/3] Update launch_utils.py --- modules/launch_utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 4f9802c9b..9e3237082 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -395,7 +395,6 @@ def prepare_environment(): # stable_diffusion_xl_repo = os.environ.get('STABLE_DIFFUSION_XL_REPO', "https://github.com/Stability-AI/generative-models.git") # k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://github.com/crowsonkb/k-diffusion.git') huggingface_guess_repo = os.environ.get('HUGGINGFACE_GUESS_REPO', 'https://github.com/lllyasviel/huggingface_guess.git') - google_blockly_repo = os.environ.get('GOOGLE_BLOCKLY_REPO', 'https://github.com/lllyasviel/google_blockly_prototypes') blip_repo = os.environ.get('BLIP_REPO', 'https://github.com/salesforce/BLIP.git') assets_commit_hash = os.environ.get('ASSETS_COMMIT_HASH', "6f7db241d2f8ba7457bac5ca9753331f0c266917") @@ -403,7 +402,6 @@ def prepare_environment(): # stable_diffusion_xl_commit_hash = os.environ.get('STABLE_DIFFUSION_XL_COMMIT_HASH', "45c443b316737a4ab6e40413d7794a7f5657c19f") # k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "ab527a9a6d347f364e3d185ba6d714e22d80cb3c") huggingface_guess_commit_hash = os.environ.get('HUGGINGFACE_GUESS_HASH', "84826248b49bb7ca754c73293299c4d4e23a548d") - google_blockly_commit_hash = os.environ.get('GOOGLE_BLOCKLY_COMMIT_HASH', "d9f9145fc4f368c80702b134c63659c7949e6541") blip_commit_hash = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9") try: @@ -464,7 +462,6 @@ def prepare_environment(): # git_clone(stable_diffusion_xl_repo, repo_dir('generative-models'), "Stable Diffusion XL", stable_diffusion_xl_commit_hash) # git_clone(k_diffusion_repo, repo_dir('k-diffusion'), "K-diffusion", k_diffusion_commit_hash) git_clone(huggingface_guess_repo, repo_dir('huggingface_guess'), "huggingface_guess", huggingface_guess_commit_hash) - git_clone(google_blockly_repo, repo_dir('google_blockly_prototypes'), "google_blockly", google_blockly_commit_hash) git_clone(blip_repo, repo_dir('BLIP'), "BLIP", blip_commit_hash) startup_timer.record("clone repositores") From 72e469f186daf6819cc92cf07f14c0e4638cc4b4 Mon Sep 17 00:00:00 2001 From: parsee-mizuhashi <157323502+parsee-mizuhashi@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:36:06 -0700 Subject: [PATCH 3/3] Delete modules_forge/google_blockly.py --- modules_forge/google_blockly.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 modules_forge/google_blockly.py diff --git a/modules_forge/google_blockly.py b/modules_forge/google_blockly.py deleted file mode 100644 index 8c233c478..000000000 --- a/modules_forge/google_blockly.py +++ /dev/null @@ -1,30 +0,0 @@ -# See also: https://github.com/lllyasviel/google_blockly_prototypes/blob/main/LICENSE_pyz - - -import os -import gzip -import importlib.util - - -pyz_dir = os.path.abspath(os.path.realpath(os.path.join(__file__, '../../repositories/google_blockly_prototypes/forge'))) -module_suffix = ".pyz" - - -def initialization(): - print('Loading additional modules ... ', end='') - - for filename in os.listdir(pyz_dir): - if not filename.endswith(module_suffix): - continue - - module_name = filename[:-len(module_suffix)] - module_package_name = __package__ + '.' + module_name - dynamic_module = importlib.util.module_from_spec(importlib.util.spec_from_loader(module_package_name, loader=None)) - dynamic_module.__dict__['__file__'] = os.path.join(pyz_dir, module_name + '.py') - dynamic_module.__dict__['__package__'] = module_package_name - google_blockly_context = gzip.open(os.path.join(pyz_dir, filename), 'rb').read().decode('utf-8') - exec(google_blockly_context, dynamic_module.__dict__) - globals()[module_name] = dynamic_module - - print('done.') - return