File tree 3 files changed +84
-0
lines changed
3 files changed +84
-0
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ set " filePath = %cd% \webui-user.bat"
4
+
5
+
6
+ (
7
+ echo @echo off
8
+ echo .
9
+ echo set GIT=
10
+ echo set VENV_DIR=
11
+ echo set COMMANDLINE_ARGS=--skip-torch-cuda-test --precision full --no-half
12
+ echo set PYTORCH_TRACING_MODE=TORCHFX
13
+ echo .
14
+ echo call webui.bat
15
+
16
+ ) > %filepath%
17
+
18
+
19
+ call webui-user.bat
20
+
21
+ pause
Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+
4
+ start /wait cmd /k " %cd% \venv\Scripts\activate && pip install %cd% \torch-2.1.0.dev20230713+cpu-cp310-cp310-win_amd64.whl && exit"
5
+
6
+ echo torch 2.1.0 dev installation completed.
7
+
8
+ powershell -executionpolicy bypass .\torch-install.ps1
9
+
10
+
11
+ echo eval_frame.py modification completed. press any key to exit
12
+ pause
Original file line number Diff line number Diff line change
1
+ $scriptDirectory = $PSScriptRoot
2
+ Set-Location $scriptDirectory
3
+
4
+ # # modify webui-user.bat
5
+ $filePath = $pwd.Path + " \webui-user.bat"
6
+
7
+ $newContent = @"
8
+
9
+ @echo off
10
+
11
+ set PYTHON=
12
+ set GIT=
13
+ set VENV_DIR=
14
+ set COMMANDLINE_ARGS=--skip-torch-cuda-test --precision full --no-half --skip-prepare-environment
15
+ set PYTORCH_TRACING_MODE=TORCHFX
16
+
17
+ call webui.bat
18
+
19
+ "@
20
+ $newContent | Set-Content - Path $filePath
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+ # ## modify eval_frame
29
+
30
+ $eval_filePath = $pwd.Path + " \venv\Lib\site-packages\torch\_dynamo\eval_frame.py"
31
+
32
+
33
+
34
+ # comment out the two lines to test torch.compile on windows
35
+ $replacements = @ {
36
+ " if sys.platform == `" win32`" :" = " # if sys.platform == `" win32`" :"
37
+ " raise RuntimeError(`" Windows not yet supported for torch.compile`" )" = " # raise RuntimeError(`" Windows not yet supported for torch.compile`" )"
38
+ }
39
+
40
+
41
+ $lines = Get-Content - Path $eval_filePath
42
+
43
+ foreach ($search_Text in $replacements.Keys ){
44
+ $replaceText = $replacements [$search_text ]
45
+ $lines = $lines.Replace ($search_Text , $replaceText )
46
+ }
47
+
48
+
49
+ # write content back to file
50
+ $lines | Set-Content - Path $eval_filePath
51
+
You can’t perform that action at this time.
0 commit comments