commit
f9afc2c036
@ -11,3 +11,8 @@ You can find the dreambooth solution spercific [Dreambooth README](README_dreamb
|
||||
## Finetune
|
||||
|
||||
You can find the finetune solution spercific [Finetune README](README_finetune.md)
|
||||
|
||||
## Change history
|
||||
|
||||
* 12/21 (v9.7) update:
|
||||
- add optional GUI authentication support via: `python fine_tune.py --username=<name> --password=<password>`
|
@ -10,6 +10,7 @@ import os
|
||||
import subprocess
|
||||
import pathlib
|
||||
import shutil
|
||||
import argparse
|
||||
from library.dreambooth_folder_creation_gui import (
|
||||
gradio_dreambooth_folder_creation_tab,
|
||||
)
|
||||
@ -472,7 +473,7 @@ def set_pretrained_model_name_or_path_input(value, v2, v_parameterization):
|
||||
|
||||
return value, v2, v_parameterization
|
||||
|
||||
|
||||
def UI(username, password):
|
||||
css = ''
|
||||
|
||||
if os.path.exists('./style.css'):
|
||||
@ -959,4 +960,18 @@ with interface:
|
||||
)
|
||||
|
||||
# Show the interface
|
||||
if not username == '':
|
||||
interface.launch(auth=(username, password))
|
||||
else:
|
||||
interface.launch()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# torch.cuda.set_per_process_memory_fraction(0.48)
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--username", type=str, default='', help="Username for authentication")
|
||||
parser.add_argument("--password", type=str, default='', help="Password for authentication")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
UI(username=args.username, password=args.password)
|
||||
|
@ -5,6 +5,7 @@ import os
|
||||
import subprocess
|
||||
import pathlib
|
||||
import shutil
|
||||
import argparse
|
||||
|
||||
# from easygui import fileopenbox, filesavebox, diropenbox, msgbox
|
||||
from library.basic_caption_gui import gradio_basic_caption_gui_tab
|
||||
@ -99,9 +100,8 @@ def save_configuration(
|
||||
}
|
||||
|
||||
# Save the data to the selected file
|
||||
# with open(file_path, 'w') as file:
|
||||
# json.dump(variables, file)
|
||||
# msgbox('File was saved...')
|
||||
with open(file_path, 'w') as file:
|
||||
json.dump(variables, file)
|
||||
|
||||
return file_path
|
||||
|
||||
@ -386,6 +386,7 @@ def remove_doublequote(file_path):
|
||||
|
||||
return file_path
|
||||
|
||||
def UI(username, password):
|
||||
|
||||
css = ''
|
||||
|
||||
@ -792,4 +793,18 @@ with interface:
|
||||
|
||||
|
||||
# Show the interface
|
||||
if not username == '':
|
||||
interface.launch(auth=(username, password))
|
||||
else:
|
||||
interface.launch()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# torch.cuda.set_per_process_memory_fraction(0.48)
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--username", type=str, default='', help="Username for authentication")
|
||||
parser.add_argument("--password", type=str, default='', help="Password for authentication")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
UI(username=args.username, password=args.password)
|
||||
|
Loading…
Reference in New Issue
Block a user