Adjust signal amplification target. Allow signal amplification strength in config.
This commit is contained in:
1 parent
dcd98dc0d5
commit
0f075fc45e
2 files changed
+3
No files matched your search
@@ -578,6 +578,8 @@ class SDTrainer(BaseSDTrainProcess):
|
||||
raise ValueError("Signal amplification is only supported for flow matching models")
|
||||
with torch.no_grad():
|
||||
nas = 1.0 - (timesteps / 1000).to(noise.device, dtype=noise.dtype)
|
||||
nas = nas * self.train_config.signal_amplification_strength
|
||||
nas = nas.clamp(min=0.1)
|
||||
while len(nas.shape) < len(noise.shape):
|
||||
nas = nas.unsqueeze(-1)
|
||||
aug = batch.latents * nas
|
||||
|
||||
Reference in new issue
Block a user