forked from AUTOMATIC1111/stable-diffusion-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AUTOMATIC1111#11 from openvinotoolkit/windows_inst…
…allation Windows installation
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@echo off | ||
|
||
set "filePath=%cd%\webui-user.bat" | ||
|
||
|
||
( | ||
echo @echo off | ||
echo. | ||
echo set GIT= | ||
echo set VENV_DIR= | ||
echo set COMMANDLINE_ARGS=--skip-torch-cuda-test --precision full --no-half | ||
echo set PYTORCH_TRACING_MODE=TORCHFX | ||
echo. | ||
echo call webui.bat | ||
|
||
) > %filepath% | ||
|
||
|
||
call webui-user.bat | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
|
||
|
||
start /wait cmd /k "%cd%\venv\Scripts\activate && pip install %cd%\torch-2.1.0.dev20230713+cpu-cp310-cp310-win_amd64.whl && exit" | ||
|
||
echo torch 2.1.0 dev installation completed. | ||
|
||
powershell -executionpolicy bypass .\torch-install.ps1 | ||
|
||
|
||
echo eval_frame.py modification completed. press any key to exit | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
$scriptDirectory = $PSScriptRoot | ||
Set-Location $scriptDirectory | ||
|
||
## modify webui-user.bat | ||
$filePath = $pwd.Path + "\webui-user.bat" | ||
|
||
$newContent = @" | ||
@echo off | ||
set PYTHON= | ||
set GIT= | ||
set VENV_DIR= | ||
set COMMANDLINE_ARGS=--skip-torch-cuda-test --precision full --no-half --skip-prepare-environment | ||
set PYTORCH_TRACING_MODE=TORCHFX | ||
call webui.bat | ||
"@ | ||
$newContent | Set-Content -Path $filePath | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### modify eval_frame | ||
|
||
$eval_filePath = $pwd.Path + "\venv\Lib\site-packages\torch\_dynamo\eval_frame.py" | ||
|
||
|
||
|
||
#comment out the two lines to test torch.compile on windows | ||
$replacements = @{ | ||
" if sys.platform == `"win32`":" = "# if sys.platform == `"win32`":" | ||
" raise RuntimeError(`"Windows not yet supported for torch.compile`")" = "# raise RuntimeError(`"Windows not yet supported for torch.compile`")" | ||
} | ||
|
||
|
||
$lines = Get-Content -Path $eval_filePath | ||
|
||
foreach ($search_Text in $replacements.Keys){ | ||
$replaceText = $replacements[$search_text] | ||
$lines = $lines.Replace($search_Text , $replaceText) | ||
} | ||
|
||
|
||
#write content back to file | ||
$lines | Set-Content -Path $eval_filePath | ||
|