mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-01-30 12:59:47 +00:00
Upload "Google Blockly" prototyping tools
This commit is contained in:
@@ -132,3 +132,9 @@ def initialize_rest(*, reload_script_modules=False):
|
||||
extra_networks.initialize()
|
||||
extra_networks.register_default_extra_networks()
|
||||
startup_timer.record("initialize extra networks")
|
||||
|
||||
from modules_forge.google_blockly.loader import load_all_google_blockly
|
||||
load_all_google_blockly()
|
||||
startup_timer.record("initialize google blockly")
|
||||
|
||||
return
|
||||
|
||||
11
modules_forge/google_blockly/README.md
Normal file
11
modules_forge/google_blockly/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
### Google Blockly
|
||||
|
||||
Starting from **v2.0.1**, Forge will begin incorporating **Google Blockly** as a prototyping tool for certain developments. This approach is aimed at enhancing the speed and flexibility of experimental feature creation.
|
||||
|
||||
- **Experimental Prototype**: Forge may store experimental Visual Programming Graphs (VPGs) directly in Google Blockly specifications within the `google_blockly` folder.
|
||||
- **Mature Code**: Once code has matured and proven its stability, it may be rewritten in Python and moved to its appropriate directory, if necessary.
|
||||
|
||||
For further references, see also the following resources:
|
||||
|
||||
- [Google Blockly GitHub Repository](https://github.com/google/blockly)
|
||||
- [Google Blockly Homepage](https://developers.google.com/blockly)
|
||||
60
modules_forge/google_blockly/additional_samplers.py
Normal file
60
modules_forge/google_blockly/additional_samplers.py
Normal file
File diff suppressed because one or more lines are too long
28
modules_forge/google_blockly/loader.py
Normal file
28
modules_forge/google_blockly/loader.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
import importlib
|
||||
|
||||
|
||||
def load_all_google_blockly():
|
||||
current_dir = os.path.dirname(__file__)
|
||||
package = __package__
|
||||
|
||||
for filename in os.listdir(current_dir):
|
||||
if filename == os.path.basename(__file__):
|
||||
continue
|
||||
|
||||
if not filename.endswith(".py"):
|
||||
continue
|
||||
|
||||
if filename.endswith("_s.py"):
|
||||
continue
|
||||
|
||||
if filename.endswith("_u.py"):
|
||||
continue
|
||||
|
||||
if filename.endswith("_m.py"):
|
||||
continue
|
||||
|
||||
module_name = f"{package}.{filename[:-3]}"
|
||||
importlib.import_module(module_name)
|
||||
|
||||
return
|
||||
Reference in New Issue
Block a user