mirror of
https://github.com/facefusion/facefusion-labs.git
synced 2026-05-22 23:59:40 +02:00
Use a lot of ignores
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user