Remove dead code. (#13251)
This commit is contained in:
@@ -3,12 +3,9 @@ from ..diffusionmodules.openaimodel import Timestep
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
class CLIPEmbeddingNoiseAugmentation(ImageConcatWithNoiseAugmentation):
|
class CLIPEmbeddingNoiseAugmentation(ImageConcatWithNoiseAugmentation):
|
||||||
def __init__(self, *args, clip_stats_path=None, timestep_dim=256, **kwargs):
|
def __init__(self, *args, timestep_dim=256, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
if clip_stats_path is None:
|
clip_mean, clip_std = torch.zeros(timestep_dim), torch.ones(timestep_dim)
|
||||||
clip_mean, clip_std = torch.zeros(timestep_dim), torch.ones(timestep_dim)
|
|
||||||
else:
|
|
||||||
clip_mean, clip_std = torch.load(clip_stats_path, map_location="cpu")
|
|
||||||
self.register_buffer("data_mean", clip_mean[None, :], persistent=False)
|
self.register_buffer("data_mean", clip_mean[None, :], persistent=False)
|
||||||
self.register_buffer("data_std", clip_std[None, :], persistent=False)
|
self.register_buffer("data_std", clip_std[None, :], persistent=False)
|
||||||
self.time_embed = Timestep(timestep_dim)
|
self.time_embed = Timestep(timestep_dim)
|
||||||
|
|||||||
Reference in New Issue
Block a user