Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/modules/diffusions/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def sigma_schedule(schedule='cosine',
def linear_schedule(num_timesteps, init_beta, last_beta, **kwargs):
scale = 1000.0 / num_timesteps
init_beta = init_beta or scale * 0.0001
ast_beta = last_beta or scale * 0.02
last_beta = last_beta or scale * 0.02
return torch.linspace(init_beta, last_beta, num_timesteps, dtype=torch.float64)

def logsnr_cosine_interp_schedule(
Expand Down
2 changes: 1 addition & 1 deletion tools/modules/unet/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def __init__(self, in_channels, n_heads, d_head,
stride=1,
padding=0))
else:
self.proj_out = zero_module(nn.Linear(in_channels, inner_dim))
self.proj_out = zero_module(nn.Linear(inner_dim, in_channels))
self.use_linear = use_linear

def forward(self, x, context=None):
Expand Down
6 changes: 3 additions & 3 deletions utils/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def reduce_dict(input_dict, group=None, reduction='mean', **kwargs):

# ensure that the orders of keys are consistent across processes
if isinstance(input_dict, OrderedDict):
keys = list(input_dict.keys)
keys = list(input_dict.keys())
else:
keys = sorted(input_dict.keys())
vals = [input_dict[key] for key in keys]
Expand Down Expand Up @@ -337,9 +337,9 @@ def symbolic(graph, input):
return _split(input)

@staticmethod
def symbolic(ctx, input):
def forward(ctx, input):
return _split(input)

@staticmethod
def backward(ctx, grad_output):
return _all_gather(grad_output)
Expand Down