mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-17 21:31:52 +01:00
close files before remove
This commit is contained in:
parent
692eb6f38b
commit
dafdd3d9d8
@ -91,9 +91,11 @@ def check_server_status(jobID, address) -> str | pd.DataFrame:
|
||||
elif content_type == 'video/mp4':
|
||||
with open('./outputs/video.mp4', 'wb') as f:
|
||||
f.write(response.content)
|
||||
f.close()
|
||||
clip = VideoFileClip("./outputs/video.mp4")
|
||||
clip.write_videofile("./outputs/video2.mp4")
|
||||
result = upload_media_to_hoster("./outputs/video2.mp4")
|
||||
clip.close()
|
||||
os.remove("./outputs/video.mp4")
|
||||
os.remove("./outputs/video2.mp4")
|
||||
return result
|
||||
|
@ -40,7 +40,7 @@ class VideoGenerationSVD(DVMTaskInterface):
|
||||
request_form["trainerFilePath"] = r'modules\stablevideodiffusion\stablevideodiffusion.trainer'
|
||||
|
||||
url = ""
|
||||
frames = 14 # 25
|
||||
frames = 7 # 25
|
||||
model = "stabilityai/stable-video-diffusion-img2vid-xt" #,stabilityai/stable-video-diffusion-img2vid
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ class VideoGenerationSVD(DVMTaskInterface):
|
||||
|
||||
options = {
|
||||
"model": model,
|
||||
"fps": 14
|
||||
"fps": frames
|
||||
|
||||
}
|
||||
request_form['options'] = json.dumps(options)
|
||||
|
Loading…
x
Reference in New Issue
Block a user