Skip to content

Commit

Permalink
stylized slider
Browse files Browse the repository at this point in the history
  • Loading branch information
jwang23-sc committed Jun 12, 2024
1 parent 0207793 commit 733d506
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="Interpreting the Weight Space of Customized Diffusion Models.">
<meta name="keywords" content="Nerfies, D-NeRF, NeRF">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>weights2weights</title>

<!-- Global site tag (gtag.js) - Google Analytics -->
Expand Down Expand Up @@ -186,15 +186,15 @@ <h2 class="title is-3">Video</h2>
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
</style>
<div class="columns is-centered has-text-centered">
<h2 class="title is-3">Creating <em>weights2weights</em> Space</h2>
</div>
<div class="content has-text-justified" >
<!-- <h3 class="title is-3">Key idea</h3> -->
<img src="./images/w2w_scheme.jpg" alt="scheme" style="border: 2px solid gray; border-radius: 15px; box-shadow: 0px 0px 10px #999; padding: 5px;">
We create a dataset of model weights where each model is finetuned to encode a specific identity using low-rank updates (LoRA). These model weights lie on a weights manifold that we further project into a lower-dimensional subspace spanned by its principal components. We term the resulting space <em>weighst2weights</em> (<em>w2w</em>), in which operations transform one set of valid identity-encoding weights into another. We train linear classifiers to find separating hyperplanes in this space for semantic attributes. These define disentangled edit directions for an identity-encoding model in weight space.

</div>
</div>
</div>
Expand Down Expand Up @@ -226,14 +226,14 @@ <h2 class="title is-3">Creating <em>weights2weights</em> Space</h2>
text-align: center;
}
</style>

<div class="columns is-centered has-text-centered">
<h2 class="title is-3">Identity Editing</h2>
</div >
<div class="content has-text-justified" >
Given an identity parameterized by weights, we can manipulate attributes by traversing semantic directions in the <em>w2w</em> weight subspace. The edited weights result in a new model, where the subject has different attributes while still maintaining as much of the prior identity. These edits are <b>not</b> image-specific, and persist in appearance across different generation seeds and prompts. Additionally, as we operate on an identity weight manifold, minimal changes are made to other concepts, such as scene layout or other people. Try out the sliders below to demonstrate edits in <em>w2w</em> space.
</div>

<h3 class="title is-4">Slide the bars to edit the identity.</h2>
<div class="content" style="border: 2px solid gray; border-radius: 15px; box-shadow: 0px 0px 10px #999; padding: 20px;">
<div id="imageContainer">
Expand All @@ -242,7 +242,7 @@ <h3 class="title is-4">Slide the bars to edit the identity.</h2>


<label for="sliderA">Curly Hair:</label>
<input type="range" id="sliderA" class="slider" name="sliderA" min="0" max="4" value="0" oninput="updateImage()">
<input type="range" id="sliderA" class="slider is-large is-info" name="sliderA" min="0" max="4" value="0" oninput="updateImage()">

<!-- <input type="range" id="sliderA" name="sliderA" min="0" max="4" value="0"> -->
<span id="valueA">0</span>
Expand All @@ -251,15 +251,15 @@ <h3 class="title is-4">Slide the bars to edit the identity.</h2>

<label for="sliderB">Pointy Nose:</label>
<!-- <input type="range" id="sliderB" name="sliderB" min="0" max="4" value="0"> -->
<input type="range" id="sliderB" class="slider" name="sliderB" min="0" max="4" value="0" oninput="updateImage()">
<input type="range" id="sliderB" class="slider is-large is-info" name="sliderB" min="0" max="4" value="0" oninput="updateImage()">

<span id="valueB">0</span>

<br>

<label for="sliderC">Narrow Eyes:</label>
<!-- <input type="range" id="sliderC" name="sliderC" min="0" max="4" value="0"> -->
<input type="range" id="sliderC" class="slider" name="sliderC" min="0" max="4" value="0" oninput="updateImage()">
<input type="range" id="sliderC" class="slider is-large is-info" name="sliderC" min="0" max="4" value="0" oninput="updateImage()">

<span id="valueC">0</span>

Expand Down Expand Up @@ -304,7 +304,7 @@ <h3 class="title is-4">Slide the bars to edit the identity.</h2>
.clickable-area {
cursor: pointer;
}
</style>
</style>
<div class="columns is-centered has-text-centered">
<h2 class="title is-3">Sampling</h2>
</div>
Expand All @@ -317,21 +317,21 @@ <h3 class="title is-4">Click to sample an identity-encoding model.</h2>
<img src="./images/sampling/sample_animation.gif" alt="sampling" usemap="#workmap" id="mainImage" style="border: 2px solid gray; border-radius: 15px; box-shadow: 0px 0px 10px #999; padding: 0px;" >

<map name="workmap" id="workmap">
<area id="rect1" shape="rect" coords="1866,754,2225,871" alt="rect1" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part19.jpg')">
<area id="rect2" shape="rect" coords="2282,731,2643,847" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part20.jpg')">
<area id="rect3" shape="rect" coords="1523,571,1884,687" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part21.jpg')">
<area id="rect4" shape="rect" coords="1287,790,1648,905" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part22.jpg')">
<area id="rect4" shape="rect" coords="888,687,1250,802" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part23.jpg')">
<area id="rect1" shape="rect" coords="1866,754,2225,871" alt="rect1" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part19.jpg')">
<area id="rect2" shape="rect" coords="2282,731,2643,847" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part20.jpg')">
<area id="rect3" shape="rect" coords="1523,571,1884,687" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part21.jpg')">
<area id="rect4" shape="rect" coords="1287,790,1648,905" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part22.jpg')">
<area id="rect4" shape="rect" coords="888,687,1250,802" alt="rect2" title="click" class="clickable-area" onclick="changeImage('./images/sampling/sampling_Part23.jpg')">
</map>

<script>

function changeImage(im_name) {
document.getElementById('mainImage').src = im_name;
document.getElementById('mainImage').src = im_name;

}
</script>

</div>
</div>
</div>
Expand Down Expand Up @@ -359,7 +359,7 @@ <h2 class="title is-3">Inversion</h2>
<h3 class="title is-4">Click on an image to invert it into a model.</h2>
<div class="content">
<!-- <h3 class="title is-3">Key idea</h3> -->
<img src="./images/inversion/inversion_animation.gif" alt="inversion" usemap="#workmapb" id="mainImageb" style="border: 2px solid gray; border-radius: 15px; box-shadow: 0px 0px 10px #999;">
<img src="./images/inversion/inversion_animation.gif" alt="inversion" usemap="#workmapb" id="mainImageb" style="border: 2px solid gray; border-radius: 15px; box-shadow: 0px 0px 10px #999;">
<!-- style="transform: translate(45px,0px);" -->
<map name="workmapb">
<area id="rect1b" shape="rect" coords="32, 51, 603, 607" alt="rect1b" class="clickable-area" onclick="changeImage2('./images/inversion/inversion_Part21.jpg')">
Expand All @@ -369,11 +369,11 @@ <h3 class="title is-4">Click on an image to invert it into a model.</h2>

<script>
function changeImage2(im_name) {
document.getElementById('mainImageb').src = im_name;
document.getElementById('mainImageb').src = im_name;

}
</script>

</div>
</div>
</div>
Expand All @@ -392,13 +392,13 @@ <h3 class="title is-4">Click on an image to invert it into a model.</h2>
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
</style>
<div class="columns is-centered has-text-centered">
<h2 class="title is-3">Connection to Generative Latent Spaces</h2>
</div>
<div class="content has-text-justified">
<img src="./images/w2w_vs_GAN.jpg" alt="w2w_vs_gan">
As seen from the interactive examples above, <em>weights2weights</em> space enables applications analogous to those of a traditional generative latent space–-inversion, editing, and sampling–-but producing model weights rather than images. With generative models such as GANs, the instance is a latent mapping to an image, whereas the instance with <em>weights2weights</em> is a set of identity-encoding weights.
As seen from the interactive examples above, <em>weights2weights</em> space enables applications analogous to those of a traditional generative latent space–-inversion, editing, and sampling–-but producing model weights rather than images. With generative models such as GANs, the instance is a latent mapping to an image, whereas the instance with <em>weights2weights</em> is a set of identity-encoding weights.
</section>


Expand Down Expand Up @@ -475,10 +475,10 @@ <h2 class="title">BibTeX</h2>
</div>
</footer>

<script src="./static/resize/imageMapResizer.min.js"></script>
<script src="./static/resize/imageMapResizer.min.js"></script>
<script>
imageMapResize();
</script>
</script>

</body>
</html>

0 comments on commit 733d506

Please sign in to comment.