diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 1d3b54e..9b82524 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -83,6 +83,7 @@ func newGenerateCommand() *ffcli.Command { fs.BoolVar(&cfg.Watermark, "watermark", false, "add watermark (optional)") fs.IntVar(&cfg.Width, "width", 0, "output video width (optional)") fs.IntVar(&cfg.Height, "height", 0, "output video height (optional)") + fs.BoolVar(&cfg.Portrait, "portrait", false, "portrait mode (optional) (only for gen3-turbo)") fs.BoolVar(&cfg.Explore, "explore", false, "explore mode (optional)") fs.BoolVar(&cfg.LastFrame, "last-frame", false, "use source image as the last frame (optional)") fs.IntVar(&cfg.Seconds, "seconds", 10, "duration of the video in seconds (optional)") diff --git a/pkg/cmd/generate/generate.go b/pkg/cmd/generate/generate.go index efef492..f2ffa00 100644 --- a/pkg/cmd/generate/generate.go +++ b/pkg/cmd/generate/generate.go @@ -30,6 +30,7 @@ type Config struct { Watermark bool Width int Height int + Portrait bool Explore bool LastFrame bool Seconds int @@ -88,6 +89,7 @@ func Run(ctx context.Context, cfg *Config) error { Extend: false, Width: cfg.Width, Height: cfg.Height, + Portrait: cfg.Portrait, ExploreMode: cfg.Explore, LastFrame: cfg.LastFrame, Seconds: cfg.Seconds, diff --git a/pkg/runway/runway.go b/pkg/runway/runway.go index f1c87eb..0e0cc45 100644 --- a/pkg/runway/runway.go +++ b/pkg/runway/runway.go @@ -273,6 +273,7 @@ type gen3Options struct { EnhancePrompt bool `json:"enhance_prompt"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` + Flip bool `json:"flip,omitempty"` Resolution string `json:"resolution,omitempty"` InitImage string `json:"init_image,omitempty"` ImageAsEndFrame bool `json:"image_as_end_frame"` @@ -355,6 +356,7 @@ type GenerateRequest struct { Extend bool Width int Height int + Portrait bool ExploreMode bool LastFrame bool Seconds int @@ -426,6 +428,7 @@ func (c *Client) Generate(ctx context.Context, cfg *GenerateRequest) (*Generatio var width, height int var resolution string + var flip bool if len(imageURL) == 0 { width = cfg.Width height = cfg.Height @@ -435,6 +438,7 @@ func (c *Client) Generate(ctx context.Context, cfg *GenerateRequest) (*Generatio } } else { resolution = "720p" + flip = cfg.Portrait } // Create task @@ -522,6 +526,7 @@ func (c *Client) Generate(ctx context.Context, cfg *GenerateRequest) (*Generatio EnhancePrompt: true, Width: width, Height: height, + Flip: flip, InitImage: imageURL, Resolution: resolution, AssetGroupName: c.folder,