Skip to content

generate image cannot set resolution or aspectRatio (generate video can) #2

Description

@caskland-hue

openart generate video accepts --aspect-ratio and --resolution. openart generate image accepts only --model, --image, -o/--output, --async and --timeout, so there is no way to set a model's image parameters from the CLI.

The models do expose them:

$ openart model form byte-plus-seedream-5-lite text2image
  resolution:  default "2K", enum ["2K","3K"]
  aspectRatio: default "4:3", enum ["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]
  imageCount:  default 1

But --dry-run shows the request body carries only the prompt:

$ openart generate image "a red fox in the snow" --model byte-plus-seedream-5-lite --dry-run
{
  "body": {
    "model": "byte-plus-seedream-5-lite",
    "media": "image",
    "mode": "text2image",
    "params": { "prompt": "a red fox in the snow" }
  },
  "endpoint": "POST /api/cli/v1/generate"
}

So every CLI image generation returns the server defaults - for this model 2K / 4:3, i.e. 2848x1600. openart model cost quotes 2K and 3K at the same 15 credits, so the CLI cannot reach the larger output at any price, and 16:9 is unreachable entirely.

That makes the CLI unusable for batch image work, which is a shame because --async plus creation list is otherwise a very good batch story. Passing the flags anyway fails with error: unknown flag: --aspect-ratio, and there is no --param-style escape hatch, no config file, and no project- or workspace-level default.

Either of these would fix it:

  • wire the existing --aspect-ratio / --resolution flags into generate image as well, or
  • add a generic --param key=value (repeatable) validated against model form, which would also cover imageCount, quality, outputFormat and the other per-model fields.

Environment: CLI v0.1.1, macOS arm64 (installed via install.sh).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions