Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VisionXLab/OF-Diff
/ spatial_norm_thresholding
Function
spatial_norm_thresholding
ldm/models/diffusion/sampling_util.py:19–22 ·
view source on GitHub ↗
(x0, value)
Source
from the content-addressed store, hash-verified
17
18
19
def
spatial_norm_thresholding(x0, value):
20
# b c h w
21
s = x0.pow(2).mean(1, keepdim=True).sqrt().clamp(min=value)
22
return
x0 * (value / s)
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected