Fix whitespace during git apply

This commit is contained in:
cmdr2 2022-11-22 22:21:54 +05:30
parent d9b9f80a93
commit 5af84b8e90
3 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd"
@call git pull
@call git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a
@call git apply --whitespace=nowarn ..\ui\sd_internal\ddim_callback.patch
@call git apply --whitespace=fix ..\ui\sd_internal\ddim_callback.patch
@cd ..
) else (
@ -56,7 +56,7 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd"
@cd stable-diffusion
@call git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a
@call git apply --whitespace=nowarn ..\ui\sd_internal\ddim_callback.patch
@call git apply --whitespace=fix ..\ui\sd_internal\ddim_callback.patch
@cd ..
)

View File

@ -32,7 +32,7 @@ if [ -e "scripts/install_status.txt" ] && [ `grep -c sd_git_cloned scripts/insta
git pull
git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a
git apply --whitespace=nowarn ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed"
git apply --whitespace=fix ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed"
cd ..
else
@ -47,7 +47,7 @@ else
cd stable-diffusion
git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a
git apply --whitespace=nowarn ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed"
git apply --whitespace=fix ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed"
cd ..
fi

View File

@ -39,7 +39,7 @@ index 79058bc..a473411 100644
- if img_callback: img_callback(x_dec, i)
+ if callback: yield from callback(i)
+ if img_callback: yield from img_callback(x_dec, i)
if mask is not None:
- return x0 * mask + (1. - mask) * x_dec
+ x_dec = x0 * mask + (1. - mask) * x_dec
@ -111,7 +111,7 @@ index 79058bc..a473411 100644
- if img_callback: img_callback(x, i)
+ if callback: yield from callback(i)
+ if img_callback: yield from img_callback(x, i)
d = to_d(x, sigma_hat, denoised)
# Midpoint method, where the midpoint is chosen according to a rho=3 Karras schedule
@@ -966,7 +966,7 @@ class UNet(DDPM):