Skip to content

Commit 7d22b7e

Browse files
authored
Update proj5.html
1 parent 7906c47 commit 7d22b7e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

project-5/proj5.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ <h3>Campanile at Different Noise Levels</h3>
201201
<section id="part-1-2">
202202
<h2>Part 1.2 – Classical Denoising</h2>
203203

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:
205205

206206
<div class="subsection">
207207
<h3>Noisy vs Gaussian-Denoised Campanile</h3>
@@ -247,12 +247,12 @@ <h3>Noisy vs Gaussian-Denoised Campanile</h3>
247247
<section id="part-1-3">
248248
<h2>Part 1.3 – Implementing One Step Denoising</h2>
249249

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>:
251251

252252
<pre><code>at_x0 = im_noisy_cpu - (1 - alpha_cumprod).sqrt() * noise_est
253253
original_im = at_x0 / alpha_cumprod.sqrt()</code></pre>
254254

255-
Below are a comparison the original, noisy, and the estimate of the original image for <code>t</code> &isin; [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> &isin; [250, 500, 750]:
256256

257257
<div class="subsection">
258258
<h3>Original, Noisy, One-Step Estimate (t = 250, 500, 750)</h3>
@@ -313,7 +313,7 @@ <h4>t = 750</h4>
313313
<section id="part-1-4">
314314
<h2>Part 1.4 – Iterative Denoising</h2>
315315

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
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
317317

318318
<div align="center">
319319
<figure>
@@ -328,7 +328,7 @@ <h2>Part 1.4 – Iterative Denoising</h2>
328328
alpha_t = alpha_cumprod_t / alpha_cumprod_prev
329329
beta_t = 1 - alpha_t</code></pre>
330330

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, 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:
332332

333333
<div class="subsection">
334334
<h3>Denoising Loop Visualizations (i_start = 10)</h3>
@@ -454,7 +454,7 @@ <h2>Part 1.6 – Classifier-Free Guidance (CFG)</h2>
454454
</div>
455455
</div>
456456

457-
These settings (&gamma; = 7 and the uncondtional prompt being <code>''</code>) will be used in all future usage of the CFG iterative denoise function.
457+
These settings (&gamma; = 7 and the unconditional prompt being <code>''</code>) will be used in all future usage of the CFG iterative denoise function.
458458
</section>
459459

460460
<!-- ========================================================= -->

0 commit comments

Comments
 (0)