MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / generate_unique_path

Function generate_unique_path

lightx2v/shot_runner/utils.py:200–209  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

198
199
200def generate_unique_path(path):
201 if not os.path.exists(path):
202 return path
203 root, ext = os.path.splitext(path)
204 index = 1
205 new_path = f"{root}-{index}{ext}"
206 while os.path.exists(new_path):
207 index += 1
208 new_path = f"{root}-{index}{ext}"
209 return new_path
210
211
212def save_to_video(gen_lvideo, out_path, target_fps):

Callers 1

save_to_videoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected