mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
refactor: centralize runner weight staging and cleanup (#1644)
This commit is contained in:
1 parent
3a54597776
commit
563137a592
43 files changed
+2335
-1729
No files matched your search
@@ -172,8 +172,8 @@ namespace sd::guidance {
|
||||
momentum_buffer_ = deltas;
|
||||
}
|
||||
|
||||
float diff_norm = 0.0f;
|
||||
const int standard_res = 2 * 1024 / 8; // Use SDXL as the standard resolution (1024x1024, 8x8 patches, 4=2x2 channels)
|
||||
float diff_norm = 0.0f;
|
||||
const int standard_res = 2 * 1024 / 8; // Use SDXL as the standard resolution (1024x1024, 8x8 patches, 4=2x2 channels)
|
||||
if (params_.norm_threshold > 0.0f) {
|
||||
diff_norm = std::sqrt((deltas * deltas).sum()) * standard_res / std::sqrt(static_cast<float>(deltas.numel()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user