Skip to content

Commit 7faf90a

Browse files
committed
cleanup
1 parent 67e6928 commit 7faf90a

File tree

4 files changed

+57
-7
lines changed

4 files changed

+57
-7
lines changed

javascript/ui.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ function restart_reload(){
215215
function login(username) {
216216
var user=gradioApp().querySelector('#tabs').querySelectorAll('button')[5];
217217

218-
if(username=='admin')
218+
if(username=='admin'){
219+
user.style.display='block'
219220
user.click()
221+
}
222+
else
223+
user.style.display='none'
220224
}

localizations/zh_CN.json

+22-1
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,6 @@
596596
"A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result": "一个固定随机数生成器输出的值 - 以相同参数和随机种子生成的图像会得到相同的结果\n\ud83c\udfb2 将随机种子设置为-1,则每次都会使用一个新的随机数\n\u267b\ufe0f 重用上一次使用的随机种子,如果想要固定输出结果就会很有用",
597597

598598

599-
"----deprecated----": "----以下内容在webui新版本已移除----",
600599
"▼": "",
601600
"History": "历史记录",
602601
"Show Textbox": "显示文本框",
@@ -779,6 +778,28 @@
779778
"Hide annotator result": "隐藏标注结果",
780779
"Current user :": "当前用户 : ",
781780
"Reloading...": "重新载入...",
781+
"SaegMaker endpoint": "SageMaker 终端节点",
782+
"Ignore selected VAE for stable diffusion checkpoints that have their own .vae.pt next to them": "对那些已经有.vae.pt的 stable diffusion 模型忽略已选择的 VAE",
783+
"Directory for temporary images; leave empty for default": "临时图片的目录,留空使用默认",
784+
"Cleanup non-default temporary directory when starting webui": "启动webui时清空非默认的临时目录",
785+
"Turn on pin_memory for DataLoader. Makes training slightly faster but can increase memory usage.": "为数据加载器打开 pin_memory, 这将使得训练速度更快一些但会使用更多内存",
786+
"Saves Optimizer state as separate *.optim file. Training can be resumed with HN itself and matching optim file.": "保存优化器状态为单独的 *.optim,训练可以通过 HN 恢复并匹配 optim 文件",
787+
"Show image creation progress every N sampling steps. Set to 0 to disable. Set to -1 to show after completion of batch.": "每N个采样步数后显示图片创建进程,设置为0禁用,设置为1在batch完成后显示 ",
788+
"Config file for Control Net models": "ControlNet 模型配置文件",
789+
"Config file for Adapter models": "Adapter 模型配置文件",
790+
"Directory for detected maps auto saving": "已检测的detectmap自动保存的目录",
791+
"Extra path to scan for ControlNet models (e.g. training output directory)": "扫描 ControlNet 模型的额外路径,例如训练输出路径",
792+
"Multi ControlNet: Max models amount (requires restart)": "多个 ControlNet: 最大模型数据(需要重启)",
793+
"Model cache size (requires restart)": "模型缓存大小(需要重启)",
794+
"Apply transfer control when loading models": "加载模型时应用转移控制",
795+
"Do not append detectmap to output": "不追加 detectmap 到输出",
796+
"Allow detectmap auto saving": "允许 detectmap 自动保存",
797+
"Use mid-control on highres pass (second pass)": "在 highres pass(second pass)时使用mid-control",
798+
"Allow other script to control this extension": "允许其他脚本控制这个插件",
799+
"Skip img2img processing when using img2img initial image": "在使用图生图初始图片时忽略图生图处理",
800+
"Enable optimized monocular depth estimation": "允许优化单目深度估计",
801+
"Only use mid-control when inference": "推理时仅使用 mid-control",
802+
"Enable CFG-Based guidance": "使用基于扩散度指引",
782803

783804
"--------": "--------"
784805
}

localizations/zh_TW.json

+22
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,28 @@
772772
"Hide annotator result": "隱藏標註結果",
773773
"Current user": "當前用戶 : ",
774774
"Reloading...": "重新載入...",
775+
"SaegMaker endpoint": "SageMaker 終端節點",
776+
"Ignore selected VAE for stable diffusion checkpoints that have their own .vae.pt next to them": "對那些已經有.vae.pt的 stable diffusion 模型忽略已選擇的 VAE",
777+
"Directory for temporary images; leave empty for default": "臨時圖片的目錄,留空使用默認",
778+
"Cleanup non-default temporary directory when starting webui": "啟動webui時清空非默認的臨時目錄",
779+
"Turn on pin_memory for DataLoader. Makes training slightly faster but can increase memory usage.": "為數據加載器打開 pin_memory, 這將使得訓練速度更快一些但會使用更多內存",
780+
"Saves Optimizer state as separate *.optim file. Training can be resumed with HN itself and matching optim file.": "保存優化器狀態為單獨的 *.optim,訓練可以通過 HN 恢復並匹配 optim 文件",
781+
"Show image creation progress every N sampling steps. Set to 0 to disable. Set to -1 to show after completion of batch.": "每N個採樣步數後顯示圖片創建進程,設置為0禁用,設置為1在batch完成後顯示 ",
782+
"Config file for Control Net models": "ControlNet 模型配置文件",
783+
"Config file for Adapter models": "Adapter 模型配置文件",
784+
"Directory for detected maps auto saving": "已檢測的detectmap自動保存的目錄",
785+
"Extra path to scan for ControlNet models (e.g. training output directory)": "掃描 ControlNet 模型的額外路徑,例如訓練輸出路徑",
786+
"Multi ControlNet: Max models amount (requires restart)": "多個 ControlNet: 最大模型數據(需要重啟)",
787+
"Model cache size (requires restart)": "模型緩存大小(需要重啟)",
788+
"Apply transfer control when loading models": "加載模型時應用轉移控制",
789+
"Do not append detectmap to output": "不追加 detectmap 到輸出",
790+
"Allow detectmap auto saving": "允許 detectmap 自動保存",
791+
"Use mid-control on highres pass (second pass)": "在 highres pass(second pass)時使用mid-control",
792+
"Allow other script to control this extension": "允許其他腳本控制這個插件",
793+
"Skip img2img processing when using img2img initial image": "在使用圖生圖初始圖片時忽略圖生圖處理",
794+
"Enable optimized monocular depth estimation": "允許優化單目深度估計",
795+
"Only use mid-control when inference": "推理時僅使用 mid-control",
796+
"Enable CFG-Based guidance": "使用基於擴散度指引",
775797

776798
"--------": "--------"
777799
}

modules/ui.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,11 @@ def open_folder(f):
613613
with gr.Column():
614614
with gr.Row():
615615
if tabname != "extras":
616-
save = gr.Button('Save', elem_id=f'save_{tabname}')
616+
save = gr.Button('Save', elem_id=f'save_{tabname}', visible=False)
617617

618618
buttons = parameters_copypaste.create_buttons(["img2img", "inpaint", "extras"])
619619
button_id = "hidden_element" if shared.cmd_opts.hide_ui_dir_config else 'open_folder'
620-
open_folder_button = gr.Button(folder_symbol, elem_id=button_id)
620+
open_folder_button = gr.Button(folder_symbol, elem_id=button_id, visible=False)
621621

622622
open_folder_button.click(
623623
fn=lambda: open_folder(opts.outdir_samples or outdir),
@@ -627,7 +627,7 @@ def open_folder(f):
627627

628628
if tabname != "extras":
629629
with gr.Row():
630-
do_make_zip = gr.Checkbox(label="Make Zip when Save?", value=False)
630+
do_make_zip = gr.Checkbox(label="Make Zip when Save?", value=False, visible=False)
631631

632632
with gr.Row():
633633
download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False)
@@ -672,9 +672,11 @@ def open_folder(f):
672672
extras_submit = None
673673

674674
def update_sagemaker_endpoint():
675+
print(shared.opts.sagemaker_endpoint)
675676
return gr.update(value=shared.opts.sagemaker_endpoint, choices=shared.sagemaker_endpoints)
676677

677678
def update_sd_model_checkpoint():
679+
print(shared.opts.sd_model_checkpoint)
678680
return gr.update(value=shared.opts.sd_model_checkpoint, choices=modules.sd_models.checkpoint_tiles())
679681

680682
def update_username():
@@ -688,10 +690,11 @@ def update_username():
688690
items = []
689691
for item in json.loads(response.text):
690692
items.append([item['username'], item['password'], item['options'] if 'options' in item else ''])
691-
print(items)
692693
return gr.update(value=shared.username), gr.update(value=items)
693694
else:
694695
return gr.update(value=shared.username), gr.update()
696+
else:
697+
return gr.update(value=shared.username), gr.update()
695698

696699
def create_ui():
697700
import modules.img2img
@@ -2092,7 +2095,7 @@ def save_userdata(user_dataframe, request: gr.Request):
20922095
component_dict[k] = component
20932096

20942097
with gr.Row():
2095-
with gr.Column(scale=4):
2098+
with gr.Column(scale=5):
20962099
gr.HTML(value='<h1 align="right">Current user : </h1>')
20972100
with gr.Column(scale=1):
20982101
username_state = gr.HTML()

0 commit comments

Comments
 (0)