MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / process_file

Method process_file

utils/dataset.py:635–639  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

633 control_file_stems = {path.stem: path for path in self.control_path.glob('*') if path.is_file()} if self.control_path is not None else {}
634
635 def process_file(file):
636 if file.suffix != '.tar':
637 return [(None, str(file))]
638 with tarfile.TarFile(file) as tar_f:
639 return [(str(file), name) for name in tar_f.getnames()]
640
641 captions_json = self.path / CAPTIONS_JSON_FILE
642 has_captions_json = captions_json.exists()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected