mirror of https://github.com/bmaltais/kohya_ss
Restructure files
parent
49f76343b5
commit
ec04263028
|
|
@ -2,5 +2,5 @@
|
||||||
"python.linting.enabled": true,
|
"python.linting.enabled": true,
|
||||||
"python.formatting.provider": "yapf",
|
"python.formatting.provider": "yapf",
|
||||||
"DockerRun.DisableDockerrc": true,
|
"DockerRun.DisableDockerrc": true,
|
||||||
"augment.enableAutomaticCompletions": false
|
"augment.enableAutomaticCompletions": true
|
||||||
}
|
}
|
||||||
|
|
@ -20,8 +20,8 @@ def UI(**kwargs):
|
||||||
headless = kwargs.get("headless", False)
|
headless = kwargs.get("headless", False)
|
||||||
log.info(f"headless: {headless}")
|
log.info(f"headless: {headless}")
|
||||||
|
|
||||||
if os.path.exists("./style.css"):
|
if os.path.exists("./assets/style.css"):
|
||||||
with open(os.path.join("./style.css"), "r", encoding="utf8") as file:
|
with open(os.path.join("./assets/style.css"), "r", encoding="utf8") as file:
|
||||||
log.info("Load CSS...")
|
log.info("Load CSS...")
|
||||||
css += file.read() + "\n"
|
css += file.read() + "\n"
|
||||||
|
|
||||||
|
|
@ -19,8 +19,8 @@ def UI(**kwargs):
|
||||||
headless = kwargs.get("headless", False)
|
headless = kwargs.get("headless", False)
|
||||||
log.info(f"headless: {headless}")
|
log.info(f"headless: {headless}")
|
||||||
|
|
||||||
if os.path.exists("./style.css"):
|
if os.path.exists("./assets/style.css"):
|
||||||
with open(os.path.join("./style.css"), "r", encoding="utf8") as file:
|
with open(os.path.join("./assets/style.css"), "r", encoding="utf8") as file:
|
||||||
log.info("Load CSS...")
|
log.info("Load CSS...")
|
||||||
css += file.read() + "\n"
|
css += file.read() + "\n"
|
||||||
|
|
||||||
|
|
@ -22,8 +22,8 @@ def UI(**kwargs):
|
||||||
headless = kwargs.get("headless", False)
|
headless = kwargs.get("headless", False)
|
||||||
log.info(f"headless: {headless}")
|
log.info(f"headless: {headless}")
|
||||||
|
|
||||||
if os.path.exists("./style.css"):
|
if os.path.exists("./assets/style.css"):
|
||||||
with open(os.path.join("./style.css"), "r", encoding="utf8") as file:
|
with open(os.path.join("./assets/style.css"), "r", encoding="utf8") as file:
|
||||||
log.info("Load CSS...")
|
log.info("Load CSS...")
|
||||||
css += file.read() + "\n"
|
css += file.read() + "\n"
|
||||||
|
|
||||||
|
|
@ -20,8 +20,8 @@ def UI(**kwargs):
|
||||||
headless = kwargs.get("headless", False)
|
headless = kwargs.get("headless", False)
|
||||||
log.info(f"headless: {headless}")
|
log.info(f"headless: {headless}")
|
||||||
|
|
||||||
if os.path.exists("./style.css"):
|
if os.path.exists("./assets/style.css"):
|
||||||
with open(os.path.join("./style.css"), "r", encoding="utf8") as file:
|
with open(os.path.join("./assets/style.css"), "r", encoding="utf8") as file:
|
||||||
log.info("Load CSS...")
|
log.info("Load CSS...")
|
||||||
css += file.read() + "\n"
|
css += file.read() + "\n"
|
||||||
|
|
||||||
|
|
@ -15,8 +15,8 @@ log = setup_logging()
|
||||||
def UI(**kwargs):
|
def UI(**kwargs):
|
||||||
css = ''
|
css = ''
|
||||||
|
|
||||||
if os.path.exists('./style.css'):
|
if os.path.exists('./assets/style.css'):
|
||||||
with open(os.path.join('./style.css'), 'r', encoding='utf8') as file:
|
with open(os.path.join('./assets/style.css'), 'r', encoding='utf8') as file:
|
||||||
print('Load CSS...')
|
print('Load CSS...')
|
||||||
css += file.read() + '\n'
|
css += file.read() + '\n'
|
||||||
|
|
||||||
12
kohya_gui.py
12
kohya_gui.py
|
|
@ -2,11 +2,11 @@ import gradio as gr
|
||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
from kohya_gui.class_gui_config import KohyaSSGUIConfig
|
from kohya_gui.class_gui_config import KohyaSSGUIConfig
|
||||||
from dreambooth_gui import dreambooth_tab
|
from kohya_gui.dreambooth_gui import dreambooth_tab
|
||||||
from finetune_gui import finetune_tab
|
from kohya_gui.finetune_gui import finetune_tab
|
||||||
from textual_inversion_gui import ti_tab
|
from kohya_gui.textual_inversion_gui import ti_tab
|
||||||
from kohya_gui.utilities import utilities_tab
|
from kohya_gui.utilities import utilities_tab
|
||||||
from lora_gui import lora_tab
|
from kohya_gui.lora_gui import lora_tab
|
||||||
from kohya_gui.class_lora_tab import LoRATools
|
from kohya_gui.class_lora_tab import LoRATools
|
||||||
|
|
||||||
from kohya_gui.custom_logging import setup_logging
|
from kohya_gui.custom_logging import setup_logging
|
||||||
|
|
@ -23,8 +23,8 @@ def UI(**kwargs):
|
||||||
headless = kwargs.get("headless", False)
|
headless = kwargs.get("headless", False)
|
||||||
log.info(f"headless: {headless}")
|
log.info(f"headless: {headless}")
|
||||||
|
|
||||||
if os.path.exists("./style.css"):
|
if os.path.exists("./assets/style.css"):
|
||||||
with open(os.path.join("./style.css"), "r", encoding="utf8") as file:
|
with open(os.path.join("./assets/style.css"), "r", encoding="utf8") as file:
|
||||||
log.debug("Load CSS...")
|
log.debug("Load CSS...")
|
||||||
css += file.read() + "\n"
|
css += file.read() + "\n"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ def file_path(fn):
|
||||||
def js_html_str(language):
|
def js_html_str(language):
|
||||||
head = f'<script type="text/javascript">{localization.load_language_js(language)}</script>\n'
|
head = f'<script type="text/javascript">{localization.load_language_js(language)}</script>\n'
|
||||||
head += (
|
head += (
|
||||||
f'<script type="text/javascript" src="{file_path("js/script.js")}"></script>\n'
|
f'<script type="text/javascript" src="{file_path("assets/js/script.js")}"></script>\n'
|
||||||
)
|
)
|
||||||
head += f'<script type="text/javascript" src="{file_path("js/localization.js")}"></script>\n'
|
head += f'<script type="text/javascript" src="{file_path("assets/js/localization.js")}"></script>\n'
|
||||||
return head
|
return head
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue