mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-01-26 16:39:47 +00:00
Work on ipadapters and custom adapters
This commit is contained in:
@@ -940,6 +940,11 @@ class BaseSDTrainProcess(BaseTrainProcess):
|
||||
batch.mask_tensor = double_up_tensor(batch.mask_tensor)
|
||||
batch.control_tensor = double_up_tensor(batch.control_tensor)
|
||||
|
||||
noisy_latent_multiplier = self.train_config.noisy_latent_multiplier
|
||||
|
||||
if noisy_latent_multiplier != 1.0:
|
||||
noisy_latents = noisy_latents * noisy_latent_multiplier
|
||||
|
||||
# remove grads for these
|
||||
noisy_latents.requires_grad = False
|
||||
noisy_latents = noisy_latents.detach()
|
||||
|
||||
Reference in New Issue
Block a user