Commit f3087e31 authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Merge branch 'main' of github.com:aqlaboratory/openfold into main

parents a89d43e4 ecd5a7ed
......@@ -96,6 +96,7 @@ def identity_rot_mats(
)
rots = rots.view(*((1,) * len(batch_dims)), 3, 3)
rots = rots.expand(*batch_dims, -1, -1)
rots = rots.contiguous()
return rots
......
......@@ -109,8 +109,9 @@ def round_up_seqlen(seqlen):
def run_model(model, batch, tag, args):
with torch.no_grad():
# Disable templates if there aren't any in the batch
model.config.template.enabled = model.config.template.enabled and any([
# Temporarily disable templates if there aren't any in the batch
template_enabled = model.config.template.enabled
model.config.template.enabled = template_enabled and any([
"template_" in k for k in batch
])
......@@ -120,6 +121,8 @@ def run_model(model, batch, tag, args):
inference_time = time.perf_counter() - t
logger.info(f"Inference time: {inference_time}")
model.config.template.enabled = template_enabled
return out
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment