mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
Use ones_like
This commit is contained in:
@@ -423,7 +423,7 @@ def get_noisy_model_input_and_timesteps(
|
|||||||
else:
|
else:
|
||||||
ip_noise = args.ip_noise_gamma * torch.randn_like(latents)
|
ip_noise = args.ip_noise_gamma * torch.randn_like(latents)
|
||||||
else:
|
else:
|
||||||
ip_noise = torch.zeros_like(latents)
|
ip_noise = torch.ones_like(latents)
|
||||||
|
|
||||||
if args.timestep_sampling == "uniform" or args.timestep_sampling == "sigmoid":
|
if args.timestep_sampling == "uniform" or args.timestep_sampling == "sigmoid":
|
||||||
# Simple random t-based noise sampling
|
# Simple random t-based noise sampling
|
||||||
|
|||||||
Reference in New Issue
Block a user