MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / search_for_files

Function search_for_files

diffsynth/models/utils.py:135–145  ·  view source on GitHub ↗
(folder, extensions)

Source from the content-addressed store, hash-verified

133
134
135def search_for_files(folder, extensions):
136 files = []
137 if os.path.isdir(folder):
138 for file in sorted(os.listdir(folder)):
139 files += search_for_files(os.path.join(folder, file), extensions)
140 elif os.path.isfile(folder):
141 for extension in extensions:
142 if folder.endswith(extension):
143 files.append(folder)
144 break
145 return files
146
147
148def convert_state_dict_keys_to_single_str(state_dict, with_shape=True):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected