This repository was archived by the owner on Aug 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,27 @@ echo echo [34mDownloading model 1.4[0m
147147echo set model_link^ =https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/GFPGANv1.4.pth
148148echo set /p model_link^ =" [35mIf you want to download another model, paste the link here, otherwise press [ENTER]: [0m"
149149echo wget %% model_link%% -P experiments/pretrained_models
150+
151+ echo set " filepath=%localappdata% \Programs\Python\Python310\Lib\site-packages\basicsr\data\degradations.py"
152+ echo set " tempfile=%localappdata% \Programs\Python\Python310\Lib\site-packages\basicsr\data\degradations_temp.py"
153+ echo if not exist " %filepath% " (
154+ echo echo File not found: %filepath%
155+ echo exit /b 1
156+ echo )
157+ echo set /a counter=0
158+ echo for /f " delims=" %% i in ('findstr /n " ^" " %filepath% " ') do (
159+ echo set /a counter+=1
160+ echo if !counter! equ 8 (
161+ echo echo from torchvision.transforms.functional import rgb_to_grayscale>> " %tempfile% "
162+ echo ) else (
163+ echo echo %% i>> " %tempfile% "
164+ echo )
165+ echo )
166+ echo move /y " %tempfile% " " %filepath% "
167+
168+
169+
170+
150171echo del " %AppData% \Microsoft\Windows\Start Menu\Programs\Startup\autostart_gfpgan.bat"
151172echo .
152173echo cd ..
@@ -185,4 +206,4 @@ echo Cleaning up...
185206del preinstall.bat
186207del starter.bat
187208del install.bat
188- exit
209+ exit
You can’t perform that action at this time.
0 commit comments