Use a lot of ignores

This commit is contained in:
henryruhs
2025-03-06 19:42:55 +01:00
parent 6bc44ad3d8
commit c7d55d0d17
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -29,13 +29,13 @@ class DynamicDataset(Dataset[Tensor]):
def __getitem__(self, index : int) -> Batch:
file_path = self.file_paths[index]
if random.random() < self.config.get('batch_ratio'):
if random.random() < self.config.get('batch_ratio'): # type:ignore[operator]
if self.config.get('batch_mode') == 'equal':
return self.prepare_equal_batch(file_path)
return self.prepare_equal_batch(file_path) # type:ignore[arg-type]
if self.config.get('batch_mode') == 'same':
return self.prepare_same_batch(file_path)
return self.prepare_same_batch(file_path) # type:ignore[arg-type]
return self.prepare_different_batch(file_path)
return self.prepare_different_batch(file_path) # type:ignore[arg-type]
def __len__(self) -> int:
return len(self.file_paths)
+1 -1
View File
@@ -21,7 +21,7 @@ def export() -> None:
'opset_version': CONFIG_PARSER.getint('exporting', 'opset_version')
}
os.makedirs(config.get('directory_path'), exist_ok = True)
os.makedirs(config.get('directory_path'), exist_ok = True) # type:ignore[arg-type]
model = FaceSwapperTrainer.load_from_checkpoint(config.get('source_path'), map_location = 'cpu')
model.eval()
model.ir_version = torch.tensor(config.get('ir_version'))