Files
2024-04-07 14:40:09 -06:00

18 lines
398 B
Python

def isinstance_str(x: object, cls_name: str):
for _cls in x.__class__.__mro__:
if _cls.__name__ == cls_name:
return True
return False
def is_temporal_block(module):
return isinstance_str(module, 'TemporalTransformerBlock')
def is_named_module_transformer_block(named_module):
if is_temporal_block(named_module[1]):
return True
return False