Skip to content

Commit

Permalink
fix type after model.float() (dptech-corp#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
teslacool authored Jan 12, 2023
1 parent ab4b89a commit 413c78b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unifold/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def half(self):
def bfloat16(self):
self.model = self.model.bfloat16()
return self

def float(self):
self.model = self.model.float()
return self

@classmethod
def build_model(cls, args, task):
Expand Down
5 changes: 5 additions & 0 deletions unifold/modules/alphafold.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ def bfloat16(self):
self.__make_input_float__()
self.dtype = torch.bfloat16
return self

def float(self):
super().float()
self.dtype = torch.float
return self

def alphafold_original_mode(self):
def set_alphafold_original_mode(module):
Expand Down

0 comments on commit 413c78b

Please sign in to comment.