-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(video-gen): add endpoint for video generation #5247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for localai ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
router.Static("/generated-images", application.ApplicationConfig().ImageDir) | ||
} | ||
if application.ApplicationConfig().GeneratedContentDir != "" { | ||
os.MkdirAll(application.ApplicationConfig().GeneratedContentDir, 0750) |
Check warning
Code scanning / gosec
Errors unhandled Warning
imagePath := filepath.Join(application.ApplicationConfig().GeneratedContentDir, "images") | ||
videoPath := filepath.Join(application.ApplicationConfig().GeneratedContentDir, "videos") | ||
|
||
os.MkdirAll(audioPath, 0750) |
Check warning
Code scanning / gosec
Errors unhandled Warning
videoPath := filepath.Join(application.ApplicationConfig().GeneratedContentDir, "videos") | ||
|
||
os.MkdirAll(audioPath, 0750) | ||
os.MkdirAll(imagePath, 0750) |
Check warning
Code scanning / gosec
Errors unhandled Warning
|
||
os.MkdirAll(audioPath, 0750) | ||
os.MkdirAll(imagePath, 0750) | ||
os.MkdirAll(videoPath, 0750) |
Check warning
Code scanning / gosec
Errors unhandled Warning
|
||
func downloadFile(url string) (string, error) { | ||
// Get the data | ||
resp, err := http.Get(url) |
Check failure
Code scanning / gosec
Potential HTTP request made with variable url Error
} | ||
defer os.RemoveAll(out) | ||
|
||
fileData, err = os.ReadFile(out) |
Check failure
Code scanning / gosec
Potential file inclusion via variable Error
writer := bufio.NewWriter(outputFile) | ||
_, err = writer.Write(fileData) | ||
if err != nil { | ||
outputFile.Close() |
Check warning
Code scanning / gosec
Errors unhandled Warning
outputFile.Close() | ||
return err | ||
} | ||
outputFile.Close() |
Check warning
Code scanning / gosec
Errors unhandled Warning
|
||
if b64JSON { | ||
defer os.RemoveAll(output) | ||
data, err := os.ReadFile(output) |
Check failure
Code scanning / gosec
Potential file inclusion via variable Error
Signed-off-by: Ettore Di Giacinto <[email protected]>
ee740ea
to
a420fca
Compare
Description
This PR adds endpoint and grpc methods to handle video generation. Preparation needed for https://github.com/lllyasviel/FramePack
Notes for Reviewers
This PR also refactors directory where we store generated content: we know default to a directory which contains all the formats (audio, video, images, ...)
Part of #5248
Signed commits