Part of the generative visual computing notes.
A shared scene
Let describe a scene and let render it from camera . Score distillation sampling uses a pretrained image diffusion model to guide changes to through rendered images.
This differs from ordinary image sampling. A reverse diffusion sampler updates an image state. SDS updates parameters that generate images. Different camera views share the same scene parameters, which couples their updates.
A surface that has no effect on the current image receives no gradient through that view. More noise samples from the same camera do not fix missing visibility. The camera distribution must expose the relevant scene structure.
The update
Render and corrupt it using . Let the frozen teacher predict for prompt . A standard SDS update uses
The time-dependent weight absorbs the chosen scaling convention. The renderer Jacobian converts an image-space correction into a scene-space gradient. Gradient descent moves opposite this gradient.
For a scalar example, take , , residual , and weight two. The gradient is . A learning rate of changes to , so the rendered value decreases from four to .
Camera corrections must be mapped through their own Jacobians before averaging. Equal image residuals can produce opposite parameter gradients when the views depend differently on the scene.
Freezing and stopping gradients
Freezing the teacher’s weights does not remove derivatives with respect to its input. Standard SDS treats its residual as a supplied gradient. A surrogate implementation is
x = render(theta, camera)
xt = a * x + sigma * noise
residual = (teacher(xt, t, prompt) - noise).detach()
loss = weight * (residual * x).sum()
loss.backward()
The renderer remains on the backward path. Replacing this surrogate with the squared noise-prediction error introduces a derivative through the teacher and gives a different update.
Why subtract the sampled noise
For fixed scene, camera, and time, the renderer Jacobian is independent of the fresh Gaussian noise. Subtracting zero-mean noise can leave the expected update unchanged while changing its variance.
Consider with . The raw prediction has variance . The residual has variance . Subtraction reduces variance when and increases it when . Zero mean alone does not establish a variance reduction.
Geometry and diversity
A plausible image prior does not guarantee consistent 3D geometry. Different views may each favor familiar frontal features, producing repeated faces or heads. Inspecting a held-out camera orbit helps expose these failures. Textureless and depth renders help distinguish geometry from painted appearance.
Variational score distillation represents multiple candidate scenes and learns an auxiliary model of their noisy renders. Scene updates compare the teacher’s prediction with that auxiliary prediction. The auxiliary model and the scene particles are trained in alternating steps. LoRA can reduce the number of parameters used to adapt the auxiliary network.
Varying the camera around one scene measures view consistency. Varying the scene at a fixed camera measures diversity across candidates. They answer different questions and should be reported separately.
Worked example: a renderer distributes the gradient
Consider a toy renderer with two outputs, and . Suppose the weighted image-space residual supplied by the frozen diffusion model is . Multiplying by the transpose of the renderer Jacobian gives the scene gradient . The two residuals cancel for and reinforce each other for .
This example separates two roles. The diffusion model provides an image-space direction, while the renderer determines how that direction changes the scene. A useful image prior does not by itself resolve ambiguity between views. Camera sampling and scene representation still matter.
Further reading
DreamFusion introduces score distillation for text-to-3D optimization. ProlificDreamer develops variational score distillation. Compare their treatment of a single scene estimate and a distribution of scene parameters.