mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-10 06:54:17 +00:00
Append sys path for import_module
This will be better if we run the scripts we do not run the training script from the current directory. This is reasonable as some other projects will use this as a subfolder, such as https://github.com/ddPn08/kohya-sd-scripts-webui. I can not run the script without adding this.
This commit is contained in:
@@ -134,6 +134,8 @@ def train(args):
|
||||
gc.collect()
|
||||
|
||||
# prepare network
|
||||
import sys
|
||||
sys.path.append(os.path.dirname(__file__))
|
||||
print("import network module:", args.network_module)
|
||||
network_module = importlib.import_module(args.network_module)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user