Commit 6b028bfe by feitianbubu

feat: 支持即梦视频3.0,新增10s(frames=241)支持

parent 5fd74c34
...@@ -36,6 +36,7 @@ type requestPayload struct { ...@@ -36,6 +36,7 @@ type requestPayload struct {
Prompt string `json:"prompt,omitempty"` Prompt string `json:"prompt,omitempty"`
Seed int64 `json:"seed"` Seed int64 `json:"seed"`
AspectRatio string `json:"aspect_ratio"` AspectRatio string `json:"aspect_ratio"`
Frames int `json:"frames,omitempty"`
} }
type responsePayload struct { type responsePayload struct {
...@@ -311,10 +312,15 @@ func hmacSHA256(key []byte, data []byte) []byte { ...@@ -311,10 +312,15 @@ func hmacSHA256(key []byte, data []byte) []byte {
func (a *TaskAdaptor) convertToRequestPayload(req *relaycommon.TaskSubmitReq) (*requestPayload, error) { func (a *TaskAdaptor) convertToRequestPayload(req *relaycommon.TaskSubmitReq) (*requestPayload, error) {
r := requestPayload{ r := requestPayload{
ReqKey: "jimeng_vgfm_i2v_l20", ReqKey: req.Model,
Prompt: req.Prompt, Prompt: req.Prompt,
AspectRatio: "16:9", // Default aspect ratio }
Seed: -1, // Default to random
switch req.Duration {
case 10:
r.Frames = 241 // 24*10+1 = 241
default:
r.Frames = 121 // 24*5+1 = 121
} }
// Handle one-of image_urls or binary_data_base64 // Handle one-of image_urls or binary_data_base64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment