You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: project-5/proj5.html
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ <h3>Campanile at Different Noise Levels</h3>
201
201
<sectionid="part-1-2">
202
202
<h2>Part 1.2 – Classical Denoising</h2>
203
203
204
-
In order to try to revert the image with noise, we can try the classical method for denoising, namely Gaussian filtering. However, with high noise the effect is limited:
204
+
In order to try to revert the image with noise, we can attempt the classical method for denoising. Namely, Gaussian filtering. However, with high noise, the effect is limited:
205
205
206
206
<divclass="subsection">
207
207
<h3>Noisy vs Gaussian-Denoised Campanile</h3>
@@ -247,12 +247,12 @@ <h3>Noisy vs Gaussian-Denoised Campanile</h3>
247
247
<sectionid="part-1-3">
248
248
<h2>Part 1.3 – Implementing One Step Denoising</h2>
249
249
250
-
A more effective method is to use a pretrained diffusion model. Using <code>stage_1.unet</code>, we can estimate the amount of noise in the noisy image. With the forward equation above, we can solve for <code>x<sub>0</sub></code> (the original image) given the timestamp <code>t</code>:
250
+
A more effective method is to use a pretrained diffusion model. Using <code>stage_1.unet</code>, we can estimate the amount of noise in the noisy image. With the forward process defined above, we can solve for <code>x<sub>0</sub></code> (the original image) given <code>x<sub>t</sub></code> (the noisy image) at timestamp <code>t</code>:
Below are a comparison the original, noisy, and the estimate of the original image for <code>t</code> ∈ [250, 500, 750]:
255
+
This method of estimating the clean image given a noisy image is known as <strong>one-step denoising</strong>. Below is a comparison of the original, noisy, and the estimate of the original image for <code>t</code> ∈ [250, 500, 750]:
Instead of using onestep, we can obtain better results by iteratively denoising from step <code>t</code> until step 0. However, this means running the diffusion model 1000 times in the worst case, which is slow and costly. Fortunately, we can speed up the computation by first defining a series of strided timestamps, starting at close to 1000 and ending at 0. For the examples below, we will use <code>strided_timestamps = [990, 960, ..., 30, 0]</code>. Then, we can use the formula
316
+
Instead of using one-step, we can obtain better results by iteratively denoising from step <code>t</code> until step 0. However, this means running the diffusion model 1000 times in the worst case, which is slow and costly. Fortunately, we can speed up the computation by first defining a series of strided timestamps, starting at close to 1000 and ending at 0. For the examples below, we will use <code>strided_timestamps = [990, 960, ..., 30, 0]</code>. Then, we can use the formula
Then, we can get an approximation of <code>x<sub>0</sub></code> by using the one-step estimate. The estimated variance will be computed along with the noise estimate, so we can now compute <code>x<sub>T</sub></code> by using the formula above and obtain the image estimate for the next step. Below are some visualizations for the iterative denoising process:
331
+
Then, we can get an approximation of <code>x<sub>0</sub></code> by using the one-step estimate. The estimated variance will be computed along with the noise estimate, allowing us to calculate <code>x<sub>T</sub></code> using the formula above and obtain the image estimate for the next step. Below are some visualizations for the iterative denoising process:
These settings (γ = 7 and the uncondtional prompt being <code>''</code>) will be used in all future usage of the CFG iterative denoise function.
457
+
These settings (γ = 7 and the unconditional prompt being <code>''</code>) will be used in all future usage of the CFG iterative denoise function.
0 commit comments