-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfooocus_installer.ps1
6627 lines (5920 loc) · 310 KB
/
fooocus_installer.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
param (
[string]$InstallPath = "$PSScriptRoot/Fooocus",
[string]$InstallBranch,
[switch]$UseUpdateMode,
[switch]$DisablePipMirror,
[switch]$DisableProxy,
[string]$UseCustomProxy,
[switch]$DisableUV,
[switch]$DisableGithubMirror,
[string]$UseCustomGithubMirror,
[switch]$Help
)
# 有关 PowerShell 脚本保存编码的问题: https://learn.microsoft.com/zh-cn/powershell/module/microsoft.powershell.core/about/about_character_encoding?view=powershell-7.4#the-byte-order-mark
# Fooocus Installer 版本和检查更新间隔
$FOOOCUS_INSTALLER_VERSION = 108
$UPDATE_TIME_SPAN = 3600
# Pip 镜像源
$PIP_INDEX_ADDR = "https://mirrors.cloud.tencent.com/pypi/simple"
$PIP_INDEX_ADDR_ORI = "https://pypi.python.org/simple"
$PIP_EXTRA_INDEX_ADDR = "https://mirrors.cernet.edu.cn/pypi/web/simple"
$PIP_EXTRA_INDEX_ADDR_ORI = "https://download.pytorch.org/whl"
$PIP_FIND_ADDR = "https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html"
$PIP_FIND_ADDR_ORI = "https://download.pytorch.org/whl/torch_stable.html"
$USE_PIP_MIRROR = if ((!(Test-Path "$PSScriptRoot/disable_pip_mirror.txt")) -and (!($DisablePipMirror))) { $true } else { $false }
$PIP_INDEX_MIRROR = if ($USE_PIP_MIRROR) { $PIP_INDEX_ADDR } else { $PIP_INDEX_ADDR_ORI }
$PIP_EXTRA_INDEX_MIRROR = if ($USE_PIP_MIRROR) { $PIP_EXTRA_INDEX_ADDR } else { $PIP_EXTRA_INDEX_ADDR_ORI }
$PIP_FIND_MIRROR = if ($USE_PIP_MIRROR) { $PIP_FIND_ADDR } else { $PIP_FIND_ADDR_ORI }
# $PIP_FIND_MIRROR_CU121 = "https://download.pytorch.org/whl/cu121/torch_stable.html"
$PIP_EXTRA_INDEX_MIRROR_PYTORCH = "https://download.pytorch.org/whl"
$PIP_EXTRA_INDEX_MIRROR_CU121 = "https://download.pytorch.org/whl/cu121"
$PIP_EXTRA_INDEX_MIRROR_CU124 = "https://download.pytorch.org/whl/cu124"
# Github 镜像源列表
$GITHUB_MIRROR_LIST = @(
"https://ghfast.top/https://github.com",
"https://mirror.ghproxy.com/https://github.com",
"https://ghproxy.net/https://github.com",
"https://gh.api.99988866.xyz/https://github.com",
"https://gitclone.com/github.com",
"https://gh-proxy.com/https://github.com",
"https://ghps.cc/https://github.com",
"https://gh.idayer.com/https://github.com"
)
# PyTorch 版本
$PYTORCH_VER = "torch==2.3.0+cu118 torchvision==0.18.0+cu118 torchaudio==2.3.0+cu118"
$XFORMERS_VER = "xformers===0.0.26.post1+cu118"
# uv 最低版本
$UV_MINIMUM_VER = "0.5.22"
# Fooocus 仓库地址
$FOOOCUS_REPO = if ((Test-Path "$PSScriptRoot/install_fooocus.txt") -or ($InstallBranch -eq "fooocus")) {
"https://github.com/lllyasviel/Fooocus"
} elseif ((Test-Path "$PSScriptRoot/install_fooocus_mre.txt") -or ($InstallBranch -eq "fooocus_mre")) {
"https://github.com/MoonRide303/Fooocus-MRE"
} elseif ((Test-Path "$PSScriptRoot/install_ruined_fooocus.txt") -or ($InstallBranch -eq "ruined_fooocus")) {
"https://github.com/runew0lf/RuinedFooocus"
} else {
"https://github.com/lllyasviel/Fooocus"
}
# PATH
$PYTHON_PATH = "$InstallPath/python"
$PYTHON_EXTRA_PATH = "$InstallPath/Fooocus/python"
$PYTHON_SCRIPTS_PATH = "$InstallPath/python/Scripts"
$PYTHON_SCRIPTS_EXTRA_PATH = "$InstallPath/Fooocus/python/Scripts"
$GIT_PATH = "$InstallPath/git/bin"
$GIT_EXTRA_PATH = "$InstallPath/Fooocus/git/bin"
$Env:PATH = "$PYTHON_EXTRA_PATH$([System.IO.Path]::PathSeparator)$PYTHON_SCRIPTS_EXTRA_PATH$([System.IO.Path]::PathSeparator)$GIT_EXTRA_PATH$([System.IO.Path]::PathSeparator)$PYTHON_PATH$([System.IO.Path]::PathSeparator)$PYTHON_SCRIPTS_PATH$([System.IO.Path]::PathSeparator)$GIT_PATH$([System.IO.Path]::PathSeparator)$Env:PATH"
# 环境变量
$Env:PIP_INDEX_URL = $PIP_INDEX_MIRROR
$Env:PIP_EXTRA_INDEX_URL = $PIP_EXTRA_INDEX_MIRROR
$Env:PIP_FIND_LINKS = $PIP_FIND_MIRROR
$Env:UV_INDEX_URL = $PIP_INDEX_MIRROR
# $Env:UV_EXTRA_INDEX_URL = $PIP_EXTRA_INDEX_MIRROR
$Env:UV_FIND_LINKS = $PIP_FIND_MIRROR
$Env:UV_LINK_MODE = "copy"
$Env:UV_HTTP_TIMEOUT = 30
$Env:UV_CONCURRENT_DOWNLOADS = 50
$Env:PIP_DISABLE_PIP_VERSION_CHECK = 1
$Env:PIP_NO_WARN_SCRIPT_LOCATION = 0
$Env:PIP_TIMEOUT = 30
$Env:PIP_RETRIES = 5
$Env:PYTHONUTF8 = 1
$Env:PYTHONIOENCODING = "utf8"
$Env:CACHE_HOME = "$InstallPath/cache"
$Env:HF_HOME = "$InstallPath/cache/huggingface"
$Env:MATPLOTLIBRC = "$InstallPath/cache"
$Env:MODELSCOPE_CACHE = "$InstallPath/cache/modelscope/hub"
$Env:MS_CACHE_HOME = "$InstallPath/cache/modelscope/hub"
$Env:SYCL_CACHE_DIR = "$InstallPath/cache/libsycl_cache"
$Env:TORCH_HOME = "$InstallPath/cache/torch"
$Env:U2NET_HOME = "$InstallPath/cache/u2net"
$Env:XDG_CACHE_HOME = "$InstallPath/cache"
$Env:PIP_CACHE_DIR = "$InstallPath/cache/pip"
$Env:PYTHONPYCACHEPREFIX = "$InstallPath/cache/pycache"
$Env:UV_CACHE_DIR = "$InstallPath/cache/uv"
$Env:UV_PYTHON = "$InstallPath/python/python.exe"
# 消息输出
function Print-Msg ($msg) {
Write-Host "[$(Get-Date -Format "yyyy-MM-dd HH:mm:ss")]" -ForegroundColor Yellow -NoNewline
Write-Host "[Fooocus Installer]" -ForegroundColor Cyan -NoNewline
Write-Host ":: " -ForegroundColor Blue -NoNewline
Write-Host "$msg"
}
# 显示 Fooocus Installer 版本
function Get-Fooocus-Installer-Version {
$ver = $([string]$FOOOCUS_INSTALLER_VERSION).ToCharArray()
$major = ($ver[0..($ver.Length - 3)])
$minor = $ver[-2]
$micro = $ver[-1]
Print-Msg "Fooocus Installer 版本: v${major}.${minor}.${micro}"
}
# Pip 镜像源状态
function Pip-Mirror-Status {
if ($USE_PIP_MIRROR) {
Print-Msg "使用 Pip 镜像源"
} else {
Print-Msg "检测到 disable_pip_mirror.txt 配置文件 / 命令行参数 -DisablePipMirror, 已将 Pip 源切换至官方源"
}
}
# 代理配置
function Set-Proxy {
$Env:NO_PROXY = "localhost,127.0.0.1,::1"
# 检测是否禁用自动设置镜像源
if ((Test-Path "$PSScriptRoot/disable_proxy.txt") -or ($DisableProxy)) {
Print-Msg "检测到本地存在 disable_proxy.txt 代理配置文件 / 命令行参数 -DisableProxy, 禁用自动设置代理"
return
}
$internet_setting = Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
if ((Test-Path "$PSScriptRoot/proxy.txt") -or ($UseCustomProxy -ne "")) { # 本地存在代理配置
if ($UseCustomProxy -ne "") {
$proxy_value = $UseCustomProxy
} else {
$proxy_value = Get-Content "$PSScriptRoot/proxy.txt"
}
$Env:HTTP_PROXY = $proxy_value
$Env:HTTPS_PROXY = $proxy_value
Print-Msg "检测到本地存在 proxy.txt 代理配置文件 / 命令行参数 -UseCustomProxy, 已读取代理配置文件并设置代理"
} elseif ($internet_setting.ProxyEnable -eq 1) { # 系统已设置代理
$proxy_addr = $($internet_setting.ProxyServer)
# 提取代理地址
if (($proxy_addr -match "http=(.*?);") -or ($proxy_addr -match "https=(.*?);")) {
$proxy_value = $matches[1]
# 去除 http / https 前缀
$proxy_value = $proxy_value.ToString().Replace("http://", "").Replace("https://", "")
$proxy_value = "http://${proxy_value}"
} elseif ($proxy_addr -match "socks=(.*)") {
$proxy_value = $matches[1]
# 去除 socks 前缀
$proxy_value = $proxy_value.ToString().Replace("http://", "").Replace("https://", "")
$proxy_value = "socks://${proxy_value}"
} else {
$proxy_value = "http://${proxy_addr}"
}
$Env:HTTP_PROXY = $proxy_value
$Env:HTTPS_PROXY = $proxy_value
Print-Msg "检测到系统设置了代理, 已读取系统中的代理配置并设置代理"
}
}
# 设置 uv 的使用状态
function Set-uv {
if ((Test-Path "$PSScriptRoot/disable_uv.txt") -or ($DisableUV)) {
Print-Msg "检测到 disable_uv.txt 配置文件 / 命令行参数 -DisableUV, 已禁用 uv, 使用 Pip 作为 Python 包管理器"
$Global:USE_UV = $false
} else {
Print-Msg "默认启用 uv 作为 Python 包管理器, 加快 Python 软件包的安装速度"
Print-Msg "当 uv 安装 Python 软件包失败时, 将自动切换成 Pip 重试 Python 软件包的安装"
$Global:USE_UV = $true
}
}
# 检查 uv 是否需要更新
function Check-uv-Version {
$content = "
import re
from importlib.metadata import version
def compare_versions(version1, version2) -> int:
try:
nums1 = re.sub(r'[a-zA-Z]+', '', version1).replace('-', '.').replace('+', '.').split('.')
nums2 = re.sub(r'[a-zA-Z]+', '', version2).replace('-', '.').replace('+', '.').split('.')
except:
return 0
for i in range(max(len(nums1), len(nums2))):
num1 = int(nums1[i]) if i < len(nums1) else 0
num2 = int(nums2[i]) if i < len(nums2) else 0
if num1 == num2:
continue
elif num1 > num2:
return 1
else:
return -1
return 0
def is_uv_need_update() -> bool:
try:
uv_ver = version('uv')
except:
return True
if compare_versions(uv_ver, uv_minimum_ver) == -1:
return True
else:
return False
uv_minimum_ver = '$UV_MINIMUM_VER'
print(is_uv_need_update())
"
Print-Msg "检测 uv 是否需要更新"
$status = $(python -c "$content")
if ($status -eq "True") {
Print-Msg "更新 uv 中"
python -m pip install -U "uv>=$UV_MINIMUM_VER"
if ($?) {
Print-Msg "uv 更新成功"
} else {
Print-Msg "uv 更新失败, 可能会造成 uv 部分功能异常"
}
} else {
Print-Msg "uv 无需更新"
}
}
# 下载并解压 Python
function Install-Python {
$url = "https://modelscope.cn/models/licyks/invokeai-core-model/resolve/master/pypatchmatch/python-3.10.15-amd64.zip"
$cache_path = "$Env:CACHE_HOME/python_tmp"
$path = "$InstallPath/python"
# 下载 Python
Print-Msg "正在下载 Python"
Invoke-WebRequest -Uri $url -OutFile "$Env:CACHE_HOME/python-3.10.15-amd64.zip"
if ($?) { # 检测是否下载成功并解压
if (Test-Path "$cache_path") {
Remove-Item -Path "$cache_path" -Force -Recurse
}
# 解压 Python
Print-Msg "正在解压 Python"
Expand-Archive -Path "$Env:CACHE_HOME/python-3.10.15-amd64.zip" -DestinationPath "$cache_path" -Force
# 清理空文件夹
if (Test-Path "$path") {
$random_string = [Guid]::NewGuid().ToString().Substring(0, 18)
Move-Item -Path "$path" -Destination "$Env:CACHE_HOME/$random_string" -Force
}
New-Item -ItemType Directory -Path "$([System.IO.Path]::GetDirectoryName($path))" -Force > $null
Move-Item -Path "$cache_path" -Destination "$path" -Force
Remove-Item -Path "$Env:CACHE_HOME/python-3.10.15-amd64.zip" -Force -Recurse
Print-Msg "Python 安装成功"
} else {
Print-Msg "Python 安装失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Read-Host | Out-Null
exit 1
}
}
# 下载并解压 Git
function Install-Git {
$url = "https://modelscope.cn/models/licyks/invokeai-core-model/resolve/master/pypatchmatch/PortableGit.zip"
$cache_path = "$Env:CACHE_HOME/git_tmp"
$path = "$InstallPath/git"
Print-Msg "正在下载 Git"
Invoke-WebRequest -Uri $url -OutFile "$Env:CACHE_HOME/PortableGit.zip"
if ($?) { # 检测是否下载成功并解压
if (Test-Path "$cache_path") {
Remove-Item -Path "$cache_path" -Force -Recurse
}
# 解压 Git
Print-Msg "正在解压 Git"
Expand-Archive -Path "$Env:CACHE_HOME/PortableGit.zip" -DestinationPath "$cache_path" -Force
# 清理空文件夹
if (Test-Path "$path") {
$random_string = [Guid]::NewGuid().ToString().Substring(0, 18)
Move-Item -Path "$path" -Destination "$Env:CACHE_HOME/$random_string" -Force
}
New-Item -ItemType Directory -Path "$([System.IO.Path]::GetDirectoryName($path))" -Force > $null
Move-Item -Path "$cache_path" -Destination "$path" -Force
Remove-Item -Path "$Env:CACHE_HOME/PortableGit.zip" -Force -Recurse
Print-Msg "Git 安装成功"
} else {
Print-Msg "Git 安装失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Read-Host | Out-Null
exit 1
}
}
# 下载 Aria2
function Install-Aria2 {
$url = "https://modelscope.cn/models/licyks/invokeai-core-model/resolve/master/pypatchmatch/aria2c.exe"
Print-Msg "正在下载 Aria2"
Invoke-WebRequest -Uri $url -OutFile "$Env:CACHE_HOME/aria2c.exe"
if ($?) {
Move-Item -Path "$Env:CACHE_HOME/aria2c.exe" -Destination "$InstallPath/git/bin/aria2c.exe" -Force
Print-Msg "Aria2 下载成功"
} else {
Print-Msg "Aria2 下载失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Read-Host | Out-Null
exit 1
}
}
# 下载 uv
function Install-uv {
Print-Msg "正在下载 uv"
python -m pip install uv
if ($?) {
Print-Msg "uv 下载成功"
} else {
Print-Msg "uv 下载失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Read-Host | Out-Null
exit 1
}
}
# Github 镜像测试
function Test-Github-Mirror {
$Env:GIT_CONFIG_GLOBAL = "$InstallPath/.gitconfig" # 设置 Git 配置文件路径
if (Test-Path "$InstallPath/.gitconfig") {
Remove-Item -Path "$InstallPath/.gitconfig" -Force -Recurse
}
# 默认 Git 配置
git config --global --add safe.directory "*"
git config --global core.longpaths true
if ((Test-Path "$PSScriptRoot/disable_gh_mirror.txt") -or ($DisableGithubMirror)) { # 禁用 Github 镜像源
Print-Msg "检测到本地存在 disable_gh_mirror.txt Github 镜像源配置文件 / 命令行参数 -DisableGithubMirror, 禁用 Github 镜像源"
return
}
# 使用自定义 Github 镜像源
if ((Test-Path "$PSScriptRoot/gh_mirror.txt") -or ($UseCustomGithubMirror -ne "")) {
if ($UseCustomGithubMirror -ne "") {
$github_mirror = $UseCustomGithubMirror
} else {
$github_mirror = Get-Content "$PSScriptRoot/gh_mirror.txt"
}
git config --global url."$github_mirror".insteadOf "https://github.com"
Print-Msg "检测到本地存在 gh_mirror.txt Github 镜像源配置文件 / 命令行参数 -UseCustomGithubMirror, 已读取 Github 镜像源配置文件并设置 Github 镜像源"
return
}
# 自动检测可用镜像源并使用
$status = 0
ForEach($i in $GITHUB_MIRROR_LIST) {
Print-Msg "测试 Github 镜像源: $i"
if (Test-Path "$Env:CACHE_HOME/github-mirror-test") {
Remove-Item -Path "$Env:CACHE_HOME/github-mirror-test" -Force -Recurse
}
git clone "$i/licyk/empty" "$Env:CACHE_HOME/github-mirror-test" --quiet
if ($?) {
Print-Msg "该 Github 镜像源可用"
$github_mirror = $i
$status = 1
break
} else {
Print-Msg "镜像源不可用, 更换镜像源进行测试"
}
}
if (Test-Path "$Env:CACHE_HOME/github-mirror-test") {
Remove-Item -Path "$Env:CACHE_HOME/github-mirror-test" -Force -Recurse
}
if ($status -eq 0) {
Print-Msg "无可用 Github 镜像源, 取消使用 Github 镜像源"
} else {
Print-Msg "设置 Github 镜像源"
git config --global url."$github_mirror".insteadOf "https://github.com"
}
}
# Git 仓库下载
function Git-CLone {
param (
[String]$url,
[String]$path
)
$name = [System.IO.Path]::GetFileNameWithoutExtension("$url")
$folder_name = [System.IO.Path]::GetFileName("$path")
Print-Msg "检测 $name 是否已安装"
$status = 0
if (!(Test-Path "$path")) {
$status = 1
} else {
$items = Get-ChildItem "$path" -Recurse
if ($items.Count -eq 0) {
$status = 1
}
}
if ($status -eq 1) {
Print-Msg "正在下载 $name"
$cache_path = "$Env:CACHE_HOME/${folder_name}_tmp"
# 清理缓存路径
if (Test-Path "$cache_path") {
Remove-Item -Path "$cache_path" -Force -Recurse
}
git clone --recurse-submodules $url "$cache_path"
if ($?) { # 检测是否下载成功
# 清理空文件夹
if (Test-Path "$path") {
$random_string = [Guid]::NewGuid().ToString().Substring(0, 18)
Move-Item -Path "$path" -Destination "$Env:CACHE_HOME/$random_string" -Force
}
# 将下载好的文件从缓存文件夹移动到指定路径
New-Item -ItemType Directory -Path "$([System.IO.Path]::GetDirectoryName($path))" -Force > $null
Move-Item -Path "$cache_path" -Destination "$path" -Force
Print-Msg "$name 安装成功"
} else {
Print-Msg "$name 安装失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Read-Host | Out-Null
exit 1
}
} else {
Print-Msg "$name 已安装"
}
}
# 安装 PyTorch
function Install-PyTorch {
Print-Msg "检测是否需要安装 PyTorch"
python -m pip show torch --quiet 2> $null
if (!($?)) {
Print-Msg "安装 PyTorch 中"
if ($USE_UV) {
uv pip install $PYTORCH_VER.ToString().Split()
if (!($?)) {
Print-Msg "检测到 uv 安装 Python 软件包失败, 尝试回滚至 Pip 重试 Python 软件包安装"
python -m pip install $PYTORCH_VER.ToString().Split()
}
} else {
python -m pip install $PYTORCH_VER.ToString().Split()
}
if ($?) {
Print-Msg "PyTorch 安装成功"
} else {
Print-Msg "PyTorch 安装失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Read-Host | Out-Null
exit 1
}
} else {
Print-Msg "PyTorch 已安装, 无需再次安装"
}
Print-Msg "检测是否需要安装 xFormers"
python -m pip show xformers --quiet 2> $null
if (!($?)) {
Print-Msg "安装 xFormers 中"
if ($USE_UV) {
uv pip install $XFORMERS_VER --no-deps
if (!($?)) {
Print-Msg "检测到 uv 安装 Python 软件包失败, 尝试回滚至 Pip 重试 Python 软件包安装"
python -m pip install $XFORMERS_VER --no-deps
}
} else {
python -m pip install $XFORMERS_VER --no-deps
}
if ($?) {
Print-Msg "xFormers 安装成功"
} else {
Print-Msg "xFormers 安装失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Read-Host | Out-Null
exit 1
}
} else {
Print-Msg "xFormers 已安装, 无需再次安装"
}
}
# 安装 Fooocus 依赖
function Install-Fooocus-Dependence {
# 记录脚本所在路径
$current_path = $(Get-Location).ToString()
Set-Location "$InstallPath/Fooocus"
$dep_path = "$InstallPath/Fooocus/requirements_versions.txt"
Print-Msg "安装 Fooocus 依赖中"
if ($USE_UV) {
uv pip install -r "$dep_path"
if (!($?)) {
Print-Msg "检测到 uv 安装 Python 软件包失败, 尝试回滚至 Pip 重试 Python 软件包安装"
python -m pip install -r "$dep_path"
}
} else {
python -m pip install -r "$dep_path"
}
if ($?) {
Print-Msg "Fooocus 依赖安装成功"
} else {
Print-Msg "Fooocus 依赖安装失败, 终止 Fooocus 安装进程, 可尝试重新运行 Fooocus Installer 重试失败的安装"
Set-Location "$current_path"
Read-Host | Out-Null
exit 1
}
Set-Location "$current_path"
}
# 模型预下载
function Pre-Donwload-Model ($download_task) {
ForEach ($task in $download_task) {
$url = $task[0]
$path = $task[1]
$filename = $task[2]
if (Test-Path "$path/$filename") {
Print-Msg "$filename 已下载, 路径: $path/$filename"
} else {
Print-Msg "下载 $filename 中, 路径: $path/$filename"
aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x 16 -k 1M "$url" -d "$path" -o "$filename"
if ($?) {
Print-Msg "$filename 下载成功"
} else {
Print-Msg "$filename 下载失败"
}
}
}
}
# 更新 Fooocus 预设文件
function Update-Fooocus-Preset {
$fooocus_preset_json_content = @{
"default_model" = "Illustrious-XL-v0.1.safetensors"
"default_refiner" = "None"
"default_refiner_switch" = 0.8
"default_loras" = @(
@("None", 1.0),
@("None", 1.0),
@("None", 1.0),
@("None", 1.0),
@("None", 1.0)
)
"default_cfg_scale" = 5.0
"default_sample_sharpness" = 2.0
"default_sampler" = "dpmpp_2m_sde_gpu"
"default_scheduler" = "sgm_uniform"
"default_performance" = "Speed"
"default_prompt" = "`nmasterpiece,best quality,newest,"
"default_prompt_negative" = "low quality,worst quality,normal quality,text,signature,jpeg artifacts,bad anatomy,old,early,copyright name,watermark,artist name,signature,"
"default_styles" = @()
"default_image_number" = 1
"default_aspect_ratio" = "1344*1008"
"checkpoint_downloads" = @{
"Illustrious-XL-v0.1.safetensors" = "https://modelscope.cn/models/licyks/sd-model/resolve/master/sdxl_1.0/Illustrious-XL-v0.1.safetensors"
}
"embeddings_downloads" = @{}
"lora_downloads" = @{}
"available_aspect_ratios" = @(
"704*1408", "704*1344", "768*1344", "768*1280", "832*1216", "1216*832", "832*1152", "896*1152", "896*1088", "960*1088",
"960*1024", "1024*1024", "1024*960", "1088*960", "1088*896", "1152*896", "1152*832", "1216*832", "1280*768", "1344*768",
"1344*704", "1408*704", "1472*704", "1536*640", "1600*640", "1664*576", "1728*576", "1920*1080", "1080*1920", "576*1024",
"768*1024", "1024*576", "1024*768", "1024*1024", "2048*2048", "1536*864", "864*1536", "1472*828", "828*1472", "1344*756",
"756*1344", "1344*1008", "1008*1344", "1536*1152", "1152*1536", "1472*1104", "1104*1472", "1920*640", "1920*824", "824*1920",
"1920*768", "1536*768", "1488*640", "1680*720"
)
"default_save_metadata_to_images" = $true
"default_metadata_scheme" = "a1111"
"default_clip_skip" = 2
"default_black_out_nsfw" = $false
"metadata_created_by" = "Fooocus"
}
$fooocus_language_zh_json_content = @{
"Preview" = "预览"
"Gallery" = "相册"
"Generate" = "生成"
"Skip" = "跳过"
"Stop" = "停止"
"Input Image" = "图生图"
"Advanced" = "高级设置"
"Upscale or Variation" = "放大或重绘"
"Image Prompt" = "参考图"
"Inpaint or Outpaint (beta)" = "内部重绘或外部扩展(测试版)"
"Drag above image to here" = "将图像拖到这里"
"Upscale or Variation:" = "放大或重绘:"
"Disabled" = "禁用"
"Vary (Subtle)" = "变化(微妙)"
"Vary (Strong)" = "变化(强烈)"
"Upscale (1.5x)" = "放大(1.5 倍)"
"Upscale (2x)" = "放大(2 倍)"
"Upscale (Fast 2x)" = "快速放大(2 倍)"
"📔 Document" = "📔 说明文档"
"Image" = "图像"
"Stop At" = "停止于"
"Weight" = "权重"
"Type" = "类型"
"PyraCanny" = "边缘检测"
"CPDS" = "深度结构检测"
"* `"Image Prompt`" is powered by Fooocus Image Mixture Engine (v1.0.1)." = "* `“图生图`”由 Fooocus 图像混合引擎提供支持(v1.0.1)。"
"The scaler multiplied to positive ADM (use 1.0 to disable)." = "正向 ADM 的缩放倍数(使用 1.0 禁用)。"
"The scaler multiplied to negative ADM (use 1.0 to disable)." = "反向 ADM 的缩放倍数(使用 1.0 禁用)。"
"When to end the guidance from positive/negative ADM." = "何时结束来自正向 / 反向 ADM 的指导。"
"Similar to the Control Mode in A1111 (use 0.0 to disable)." = "类似于 SD WebUI 中的控制模式(使用 0.0 禁用)。"
"Outpaint Expansion (" = "外部扩展 ("
"Outpaint" = "外部重绘"
"Left" = "向左扩展"
"Right" = "向右扩展"
"Top" = "向上扩展"
"Bottom" = "向下扩展"
"* `"Inpaint or Outpaint`" is powered by the sampler `"DPMPP Fooocus Seamless 2M SDE Karras Inpaint Sampler`" (beta)" = "* `“内部填充或外部填充`”由`“DPMPP Fooocus Seamless 2M SDE Karras Inpaint Sampler`”(测试版)采样器提供支持"
"Setting" = "设置"
"Style" = "样式"
"Performance" = "性能"
"Speed" = "均衡"
"Quality" = "质量"
"Extreme Speed" = "LCM 加速"
"Lightning" = "SDXL Lightning 加速"
"Hyper-SD" = "Hyper SD 加速"
"Aspect Ratios" = "宽高比"
"896×1152" = "896×1152"
"width × height" = "宽 × 高"
"704×1408" = "704×1408"
"704×1344" = "704×1344"
"768×1344" = "768×1344"
"768×1280" = "768×1280"
"832×1216" = "832×1216"
"832×1152" = "832×1152"
"896×1088" = "896×1088"
"960×1088" = "960×1088"
"960×1024" = "960×1024"
"1024×1024" = "1024×1024"
"1024×960" = "1024×960"
"1088×960" = "1088×960"
"1088×896" = "1088×896"
"1152×832" = "1152×832"
"1216×832" = "1216×832"
"1280×768" = "1280×768"
"1344×768" = "1344×768"
"1344×704" = "1344×704"
"1408×704" = "1408×704"
"1472×704" = "1472×704"
"1536×640" = "1536×640"
"1600×640" = "1600×640"
"1664×576" = "1664×576"
"1728×576" = "1728×576"
"Image Number" = "出图数量"
"Negative Prompt" = "反向提示词"
"Describing what you do not want to see." = "描述你不想看到的内容。"
"Random" = "随机种子"
"Seed" = "种子"
"📚 History Log" = "📚 历史记录"
"Image Style" = "图像风格"
"Fooocus V2" = "Fooocus V2 风格"
"Default (Slightly Cinematic)" = "默认(轻微的电影感)"
"Fooocus Masterpiece" = "Fooocus - 杰作"
"Random Style" = "随机风格"
"Fooocus Photograph" = "Fooocus - 照片"
"Fooocus Negative" = "Fooocus - 反向提示词"
"SAI 3D Model" = "SAI - 3D模型"
"SAI Analog Film" = "SAI - 模拟电影"
"SAI Anime" = "SAI - 动漫"
"SAI Cinematic" = "SAI - 电影片段"
"SAI Comic Book" = "SAI - 漫画"
"SAI Craft Clay" = "SAI - 工艺粘土"
"SAI Digital Art" = "SAI - 数字艺术"
"SAI Enhance" = "SAI - 增强"
"SAI Fantasy Art" = "SAI - 奇幻艺术"
"SAI Isometric" = "SAI - 等距风格"
"SAI Line Art" = "SAI - 线条艺术"
"SAI Lowpoly" = "SAI - 低多边形"
"SAI Neonpunk" = "SAI - 霓虹朋克"
"SAI Origami" = "SAI - 折纸"
"SAI Photographic" = "SAI - 摄影"
"SAI Pixel Art" = "SAI - 像素艺术"
"SAI Texture" = "SAI - 纹理"
"MRE Cinematic Dynamic" = "MRE - 史诗电影"
"MRE Spontaneous Picture" = "MRE - 自发图片"
"MRE Artistic Vision" = "MRE - 艺术视觉"
"MRE Dark Dream" = "MRE - 黑暗梦境"
"MRE Gloomy Art" = "MRE - 阴郁艺术"
"MRE Bad Dream" = "MRE - 噩梦"
"MRE Underground" = "MRE - 阴森地下"
"MRE Surreal Painting" = "MRE - 超现实主义绘画"
"MRE Dynamic Illustration" = "MRE - 动态插画"
"MRE Undead Art" = "MRE - 遗忘艺术家作品"
"MRE Elemental Art" = "MRE - 元素艺术"
"MRE Space Art" = "MRE - 空间艺术"
"MRE Ancient Illustration" = "MRE - 古代插图"
"MRE Brave Art" = "MRE - 勇敢艺术"
"MRE Heroic Fantasy" = "MRE - 英雄幻想"
"MRE Dark Cyberpunk" = "MRE - 黑暗赛博朋克"
"MRE Lyrical Geometry" = "MRE - 抒情几何抽象画"
"MRE Sumi E Symbolic" = "MRE - 墨绘长笔画"
"MRE Sumi E Detailed" = "MRE - 精细墨绘画"
"MRE Manga" = "MRE - 日本漫画"
"MRE Anime" = "MRE - 日本动画片"
"MRE Comic" = "MRE - 成人漫画书插画"
"Ads Advertising" = "广告 - 广告"
"Ads Automotive" = "广告 - 汽车"
"Ads Corporate" = "广告 - 企业品牌"
"Ads Fashion Editorial" = "广告 - 时尚编辑"
"Ads Food Photography" = "广告 - 美食摄影"
"Ads Gourmet Food Photography" = "广告 - 美食摄影"
"Ads Luxury" = "广告 - 奢侈品"
"Ads Real Estate" = "广告 - 房地产"
"Ads Retail" = "广告 - 零售"
"Artstyle Abstract" = "艺术风格 - 抽象"
"Artstyle Abstract Expressionism" = "艺术风格 - 抽象表现主义"
"Artstyle Art Deco" = "艺术风格 - 装饰艺术"
"Artstyle Art Nouveau" = "艺术风格 - 新艺术"
"Artstyle Constructivist" = "艺术风格 - 构造主义"
"Artstyle Cubist" = "艺术风格 - 立体主义"
"Artstyle Expressionist" = "艺术风格 - 表现主义"
"Artstyle Graffiti" = "艺术风格 - 涂鸦"
"Artstyle Hyperrealism" = "艺术风格 - 超写实主义"
"Artstyle Impressionist" = "艺术风格 - 印象派"
"Artstyle Pointillism" = "艺术风格 - 点彩派"
"Artstyle Pop Art" = "艺术风格 - 波普艺术"
"Artstyle Psychedelic" = "艺术风格 - 迷幻"
"Artstyle Renaissance" = "艺术风格 - 文艺复兴"
"Artstyle Steampunk" = "艺术风格 - 蒸汽朋克"
"Artstyle Surrealist" = "艺术风格 - 超现实主义"
"Artstyle Typography" = "艺术风格 - 字体设计"
"Artstyle Watercolor" = "艺术风格 - 水彩"
"Futuristic Biomechanical" = "未来主义 - 生物机械"
"Futuristic Biomechanical Cyberpunk" = "未来主义 - 生物机械 - 赛博朋克"
"Futuristic Cybernetic" = "未来主义 - 人机融合"
"Futuristic Cybernetic Robot" = "未来主义 - 人机融合 - 机器人"
"Futuristic Cyberpunk Cityscape" = "未来主义 - 赛博朋克城市"
"Futuristic Futuristic" = "未来主义 - 未来主义"
"Futuristic Retro Cyberpunk" = "未来主义 - 复古赛博朋克"
"Futuristic Retro Futurism" = "未来主义 - 复古未来主义"
"Futuristic Sci Fi" = "未来主义 - 科幻"
"Futuristic Vaporwave" = "未来主义 - 蒸汽波"
"Game Bubble Bobble" = "游戏 - 泡泡龙"
"Game Cyberpunk Game" = "游戏 - 赛博朋克游戏"
"Game Fighting Game" = "游戏 - 格斗游戏"
"Game Gta" = "游戏 - 侠盗猎车手"
"Game Mario" = "游戏 - 马里奥"
"Game Minecraft" = "游戏 - 我的世界"
"Game Pokemon" = "游戏 - 宝可梦"
"Game Retro Arcade" = "游戏 - 复古街机"
"Game Retro Game" = "游戏 - 复古游戏"
"Game Rpg Fantasy Game" = "游戏 - 角色扮演幻想游戏"
"Game Strategy Game" = "游戏 - 策略游戏"
"Game Streetfighter" = "游戏 - 街头霸王"
"Game Zelda" = "游戏 - 塞尔达传说"
"Misc Architectural" = "其他 - 建筑"
"Misc Disco" = "其他 - 迪斯科"
"Misc Dreamscape" = "其他 - 梦境"
"Misc Dystopian" = "其他 - 反乌托邦"
"Misc Fairy Tale" = "其他 - 童话故事"
"Misc Gothic" = "其他 - 哥特风"
"Misc Grunge" = "其他 - 垮掉的"
"Misc Horror" = "其他 - 恐怖"
"Misc Kawaii" = "其他 - 可爱"
"Misc Lovecraftian" = "其他 - 洛夫克拉夫特"
"Misc Macabre" = "其他 - 恐怖"
"Misc Manga" = "其他 - 漫画"
"Misc Metropolis" = "其他 - 大都市"
"Misc Minimalist" = "其他 - 极简主义"
"Misc Monochrome" = "其他 - 单色"
"Misc Nautical" = "其他 - 航海"
"Misc Space" = "其他 - 太空"
"Misc Stained Glass" = "其他 - 彩色玻璃"
"Misc Techwear Fashion" = "其他 - 科技时尚"
"Misc Tribal" = "其他 - 部落"
"Misc Zentangle" = "其他 - 禅绕画"
"Papercraft Collage" = "手工艺 - 拼贴"
"Papercraft Flat Papercut" = "手工艺 - 平面剪纸"
"Papercraft Kirigami" = "手工艺 - 切纸"
"Papercraft Paper Mache" = "手工艺 - 纸浆塑造"
"Papercraft Paper Quilling" = "手工艺 - 纸艺卷轴"
"Papercraft Papercut Collage" = "手工艺 - 剪纸拼贴"
"Papercraft Papercut Shadow Box" = "手工艺 - 剪纸影箱"
"Papercraft Stacked Papercut" = "手工艺 - 层叠剪纸"
"Papercraft Thick Layered Papercut" = "手工艺 - 厚层剪纸"
"Photo Alien" = "摄影 - 外星人"
"Photo Film Noir" = "摄影 - 黑色电影"
"Photo Glamour" = "摄影 - 魅力"
"Photo Hdr" = "摄影 - 高动态范围"
"Photo Iphone Photographic" = "摄影 - 苹果手机摄影"
"Photo Long Exposure" = "摄影 - 长曝光"
"Photo Neon Noir" = "摄影 - 霓虹黑色"
"Photo Silhouette" = "摄影 - 轮廓"
"Photo Tilt Shift" = "摄影 - 移轴"
"Cinematic Diva" = "电影女主角"
"Abstract Expressionism" = "抽象表现主义"
"Academia" = "学术"
"Action Figure" = "动作人偶"
"Adorable 3D Character" = "可爱的3D角色"
"Adorable Kawaii" = "可爱的卡哇伊"
"Art Deco" = "装饰艺术"
"Art Nouveau" = "新艺术,美丽艺术"
"Astral Aura" = "星体光环"
"Avant Garde" = "前卫"
"Baroque" = "巴洛克"
"Bauhaus Style Poster" = "包豪斯风格海报"
"Blueprint Schematic Drawing" = "蓝图示意图"
"Caricature" = "漫画"
"Cel Shaded Art" = "卡通渲染"
"Character Design Sheet" = "角色设计表"
"Classicism Art" = "古典主义艺术"
"Color Field Painting" = "色彩领域绘画"
"Colored Pencil Art" = "彩色铅笔艺术"
"Conceptual Art" = "概念艺术"
"Constructivism" = "建构主义"
"Cubism" = "立体主义"
"Dadaism" = "达达主义"
"Dark Fantasy" = "黑暗奇幻"
"Dark Moody Atmosphere" = "黑暗忧郁气氛"
"Dmt Art Style" = "迷幻艺术风格"
"Doodle Art" = "涂鸦艺术"
"Double Exposure" = "双重曝光"
"Dripping Paint Splatter Art" = "滴漆飞溅艺术"
"Expressionism" = "表现主义"
"Faded Polaroid Photo" = "褪色的宝丽来照片"
"Fauvism" = "野兽派"
"Flat 2d Art" = "平面 2D 艺术"
"Fortnite Art Style" = "堡垒之夜艺术风格"
"Futurism" = "未来派"
"Glitchcore" = "故障核心"
"Glo Fi" = "光明高保真"
"Googie Art Style" = "古吉艺术风格"
"Graffiti Art" = "涂鸦艺术"
"Harlem Renaissance Art" = "哈莱姆文艺复兴艺术"
"High Fashion" = "高级时装"
"Idyllic" = "田园诗般"
"Impressionism" = "印象派"
"Infographic Drawing" = "信息图表绘图"
"Ink Dripping Drawing" = "滴墨绘画"
"Japanese Ink Drawing" = "日式水墨画"
"Knolling Photography" = "规律摆放摄影"
"Light Cheery Atmosphere" = "轻松愉快的气氛"
"Logo Design" = "标志设计"
"Luxurious Elegance" = "奢华优雅"
"Macro Photography" = "微距摄影"
"Mandola Art" = "曼陀罗艺术"
"Marker Drawing" = "马克笔绘图"
"Medievalism" = "中世纪主义"
"Minimalism" = "极简主义"
"Neo Baroque" = "新巴洛克"
"Neo Byzantine" = "新拜占庭"
"Neo Futurism" = "新未来派"
"Neo Impressionism" = "新印象派"
"Neo Rococo" = "新洛可可"
"Neoclassicism" = "新古典主义"
"Op Art" = "欧普艺术"
"Ornate And Intricate" = "华丽而复杂"
"Pencil Sketch Drawing" = "铅笔素描"
"Pop Art 2" = "流行艺术2"
"Rococo" = "洛可可"
"Silhouette Art" = "剪影艺术"
"Simple Vector Art" = "简单矢量艺术"
"Sketchup" = "草图"
"Steampunk 2" = "赛博朋克2"
"Surrealism" = "超现实主义"
"Suprematism" = "至上主义"
"Terragen" = "地表风景"
"Tranquil Relaxing Atmosphere" = "宁静轻松的氛围"
"Sticker Designs" = "贴纸设计"
"Vibrant Rim Light" = "生动的边缘光"
"Volumetric Lighting" = "体积照明"
"Watercolor 2" = "水彩2"
"Whimsical And Playful" = "异想天开、俏皮"
"Fooocus Cinematic" = "Fooocus - 电影"
"Fooocus Enhance" = "Fooocus - 增强"
"Fooocus Sharp" = "Fooocus - 锐化"
"Mk Chromolithography" = "MK - 彩色平版印刷"
"Mk Cross Processing Print" = "MK - 交叉处理"
"Mk Dufaycolor Photograph" = "MK - 杜菲色"
"Mk Herbarium" = "MK - 标本"
"Mk Punk Collage" = "MK - 拼贴朋克"
"Mk Mosaic" = "MK - 马赛克"
"Mk Van Gogh" = "MK - 梵高"
"Mk Coloring Book" = "MK - 简笔画"
"Mk Singer Sargent" = "MK - 辛格·萨金特"
"Mk Pollock" = "MK - 波洛克"
"Mk Basquiat" = "MK - 巴斯奇亚"
"Mk Andy Warhol" = "MK - 安迪·沃霍尔"
"Mk Halftone Print" = "MK - 半色调"
"Mk Gond Painting" = "MK - 贡德艺术"
"Mk Albumen Print" = "MK - 蛋白银印相"
"Mk Inuit Carving" = "MK - 因纽特雕塑艺术"
"Mk Bromoil Print" = "MK - 溴油印"
"Mk Calotype Print" = "MK - 卡洛型"
"Mk Color Sketchnote" = "MK - 涂鸦"
"Mk Cibulak Porcelain" = "MK - 蓝洋葱"
"Mk Alcohol Ink Art" = "MK - 墨画"
"Mk One Line Art" = "MK - 单线艺术"
"Mk Blacklight Paint" = "MK - 黑白艺术"
"Mk Carnival Glass" = "MK - 彩虹色玻璃"
"Mk Cyanotype Print" = "MK - 蓝晒"
"Mk Cross Stitching" = "MK - 十字绣"
"Mk Encaustic Paint" = "MK - 热蜡画"
"Mk Embroidery" = "MK - 刺绣"
"Mk Gyotaku" = "MK - 鱼拓"
"Mk Luminogram" = "MK - 发光图"
"Mk Lite Brite Art" = "MK - 灯光创意"
"Mk Mokume Gane" = "MK - 木目金"
"Pebble Art" = "鹅卵石艺术"
"Mk Palekh" = "MK - 缩影"
"Mk Suminagashi" = "MK - 漂浮墨水"
"Mk Scrimshaw" = "MK - 斯克林肖"
"Mk Shibori" = "MK - 手工扎染"
"Mk Vitreous Enamel" = "MK - 搪瓷"
"Mk Ukiyo E" = "MK - 浮世绘"
"Mk Vintage Airline Poster" = "MK - 复古艺术"
"Mk Vintage Travel Poster" = "MK - 复古艺术旅行"
"Mk Bauhaus Style" = "MK - 包豪斯设计风格"
"Mk Afrofuturism" = "MK - 未来主义"
"Mk Atompunk" = "MK - 原子朋克"
"Mk Constructivism" = "MK - 建构"
"Mk Chicano Art" = "MK - 奇卡诺艺术"
"Mk De Stijl" = "MK - 荷兰风格"
"Mk Dayak Art" = "MK - 达雅克艺术"
"Mk Fayum Portrait" = "MK - 法尤姆风格"
"Mk Illuminated Manuscript" = "MK - 泥金装饰手抄"
"Mk Kalighat Painting" = "MK - 卡利加特绘画"
"Mk Madhubani Painting" = "MK - 马杜巴尼艺术"
"Mk Pictorialism" = "MK - 绘画摄影"
"Mk Pichwai Painting" = "MK - 皮切瓦伊"
"Mk Patachitra Painting" = "MK - 粘土艺术"
"Mk Samoan Art Inspired" = "MK - 萨摩亚艺术"
"Mk Tlingit Art" = "MK - 特林吉特艺术"
"Mk Adnate Style" = "MK - 具象艺术"
"Mk Ron English Style" = "MK - 罗恩·英格利斯"
"Mk Shepard Fairey Style" = "MK - 街头艺术"
"Fooocus Semi Realistic" = "Fooocus - 半现实风格"
"Mk Anthotype Print" = "MK - 花汁印相"
"Mk Aquatint Print" = "MK - 飞尘腐蚀版画"
"Model" = "模型"
"Base Model (SDXL only)" = "基础模型(只支持 SDXL)"
"Refiner (SDXL or SD 1.5)" = "精修模型 (支持 SDXL 或 SD 1.5)"
"None" = "无"
"LoRAs" = "LoRAs 模型"
"SDXL LoRA 1" = "SDXL LoRA 模型 1"
"SDXL LoRA 2" = "SDXL LoRA 模型 2"
"SDXL LoRA 3" = "SDXL LoRA 模型 3"
"SDXL LoRA 4" = "SDXL LoRA 模型 4"
"SDXL LoRA 5" = "SDXL LoRA 模型 5"
"LoRA 1" = "LoRA 模型 1"
"LoRA 2" = "LoRA 模型 2"
"LoRA 3" = "LoRA 模型 3"
"LoRA 4" = "LoRA 模型 4"
"LoRA 5" = "LoRA 模型 5"
"Refresh" = "Refresh"
"🔄 Refresh All Files" = "🔄 刷新全部文件"
"Sampling Sharpness" = "采样清晰度"
"Higher value means image and texture are sharper." = "值越大,图像和纹理越清晰。"
"Guidance Scale" = "提示词引导系数"
"Higher value means style is cleaner, vivider, and more artistic." = "提示词作用的强度,值越大,风格越干净、生动、更具艺术感。"
"Developer Debug Mode" = "开发者调试模式"
"Developer Debug Tools" = "开发者调试工具"
"Positive ADM Guidance Scaler" = "正向 ADM 引导系数"
"The scaler multiplied to positive ADM (use 1.0 to disable). " = "正向 ADM 引导的倍率 (使用 1.0 以禁用)。 "
"Negative ADM Guidance Scaler" = "负向 ADM 引导系数"
"The scaler multiplied to negative ADM (use 1.0 to disable). " = "负向 ADM 引导的倍率(使用 1.0 以禁用)。 "
"ADM Guidance End At Step" = "ADM 引导结束步长"
"When to end the guidance from positive/negative ADM. " = "正向 / 负向 ADM 结束引导的时间。 "
"Refiner swap method" = "Refiner 精炼模型交换方式"
"joint" = "joint 联合"
"separate" = "separate 分离"
"CFG Mimicking from TSNR" = "从 TSNR 模拟 CFG"
"Enabling Fooocus's implementation of CFG mimicking for TSNR (effective when real CFG > mimicked CFG)." = "启用 Fooocus 的 TSNR 模拟 CFG 的功能(当真实的 CFG 大于模拟的 CFG 时生效)。"
"Sampler" = "采样器"
"dpmpp_2m_sde_gpu" = "dpmpp_2m_sde_gpu"
"Only effective in non-inpaint mode." = "仅在非重绘模式下有效。"
"euler" = "euler"
"euler_ancestral" = "euler_ancestral"
"heun" = "heun"
"dpm_2" = "dpm_2"
"dpm_2_ancestral" = "dpm_2_ancestral"
"lms" = "lms"
"dpm_fast" = "dpm_fast"
"dpm_adaptive" = "dpm_adaptive"
"dpmpp_2s_ancestral" = "dpmpp_2s_ancestral"
"dpmpp_sde" = "dpmpp_sde"
"dpmpp_sde_gpu" = "dpmpp_sde_gpu"
"dpmpp_2m" = "dpmpp_2m"
"dpmpp_2m_sde" = "dpmpp_2m_sde"