Skip to content

Commit

Permalink
Merge pull request #2017 from wkpark/kohya_gui
Browse files Browse the repository at this point in the history
refactor kohya_gui parts
  • Loading branch information
bmaltais authored Mar 1, 2024
2 parents 3d4af1e + a2450b1 commit 9eb335b
Show file tree
Hide file tree
Showing 45 changed files with 5,090 additions and 5,039 deletions.
914 changes: 7 additions & 907 deletions dreambooth_gui.py

Large diffs are not rendered by default.

1,087 changes: 6 additions & 1,081 deletions finetune_gui.py

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions kohya_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
from dreambooth_gui import dreambooth_tab
from finetune_gui import finetune_tab
from textual_inversion_gui import ti_tab
from library.utilities import utilities_tab
from kohya_gui.utilities import utilities_tab
from lora_gui import lora_tab
from library.class_lora_tab import LoRATools
from kohya_gui.class_lora_tab import LoRATools

import os
from library.custom_logging import setup_logging
from library.localization_ext import add_javascript
from kohya_gui.custom_logging import setup_logging
from kohya_gui.localization_ext import add_javascript

# Set up logging
log = setup_logging()
Expand Down
1 change: 1 addition & 0 deletions kohya_gui/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""empty"""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .common_gui import get_folder_path, add_pre_postfix, find_replace
import os

from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import subprocess
import os
from .common_gui import get_folder_path, add_pre_postfix
from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import subprocess
import psutil
from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from .class_basic_training import BasicTraining
from .class_advanced_training import AdvancedTraining
from .class_sample_images import SampleImages
from library.dreambooth_folder_creation_gui import (
from .dreambooth_folder_creation_gui import (
gradio_dreambooth_folder_creation_tab,
)
from library.dataset_balancing_gui import gradio_dataset_balancing_tab
from .dataset_balancing_gui import gradio_dataset_balancing_tab
from .common_gui import color_aug_changed


Expand Down
File renamed without changes.
22 changes: 11 additions & 11 deletions library/class_lora_tab.py → kohya_gui/class_lora_tab.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import gradio as gr
from library.merge_lora_gui import GradioMergeLoRaTab
from library.svd_merge_lora_gui import gradio_svd_merge_lora_tab
from library.verify_lora_gui import gradio_verify_lora_tab
from library.resize_lora_gui import gradio_resize_lora_tab
from library.extract_lora_gui import gradio_extract_lora_tab
from library.convert_lcm_gui import gradio_convert_lcm_tab
from library.extract_lycoris_locon_gui import gradio_extract_lycoris_locon_tab
from library.extract_lora_from_dylora_gui import gradio_extract_dylora_tab
from library.merge_lycoris_gui import gradio_merge_lycoris_tab
from .merge_lora_gui import GradioMergeLoRaTab
from .svd_merge_lora_gui import gradio_svd_merge_lora_tab
from .verify_lora_gui import gradio_verify_lora_tab
from .resize_lora_gui import gradio_resize_lora_tab
from .extract_lora_gui import gradio_extract_lora_tab
from .convert_lcm_gui import gradio_convert_lcm_tab
from .extract_lycoris_locon_gui import gradio_extract_lycoris_locon_tab
from .extract_lora_from_dylora_gui import gradio_extract_dylora_tab
from .merge_lycoris_gui import gradio_merge_lycoris_tab

# Deprecated code
from library.dataset_balancing_gui import gradio_dataset_balancing_tab
from library.dreambooth_folder_creation_gui import (
from .dataset_balancing_gui import gradio_dataset_balancing_tab
from .dreambooth_folder_creation_gui import (
gradio_dreambooth_folder_creation_tab,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import gradio as gr
from easygui import msgbox

from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion library/common_gui.py → kohya_gui/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import json

from library.custom_logging import setup_logging
from .custom_logging import setup_logging
from datetime import datetime

# Set up logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
get_saveasfilename_path,
get_file_path,
)
from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import shutil
from .common_gui import get_folder_path, get_file_path

from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from easygui import msgbox, boolbox
from .common_gui import get_folder_path

from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shutil
import os

from library.custom_logging import setup_logging
from .custom_logging import setup_logging

# Set up logging
log = setup_logging()
Expand Down
Loading

0 comments on commit 9eb335b

Please sign in to comment.