class

Arcana::AI::Image::Runware

Inherits Arcana::AI::Image::Provider < Arcana::AI::Traceable < Reference < Object

Constants

ENDPOINT = "https://api.runware.ai/v1"
FIXED_DIMENSION_MODELS = [FLUX_DEV, FLUX_SCHNELL]
FLUX1_DIMENSIONS = [{1568, 672}, {1504, 688}, {1456, 720}, {1392, 752}, {1328, 800}, {1248, 832}, {1184, 880}, {1104, 944}, {1024, 1024}, {944, 1104}, {880, 1184}, {832, 1248}, {800, 1328}, {752, 1392}, {720, 1456}, {688, 1504}, {672, 1568}]
FLUX_DEV = "runware:101@1"

Runware model AIR IDs

FLUX_FILL = "runware:102@1"
FLUX_SCHNELL = "runware:100@1"
FLUX_UNION_MODEL = "runware:110@1"
SD15_OPENPOSE_MODEL = "civitai:38784@44811"

Constructors

new(api_key : String, model : String = FLUX_DEV, steps : Int32 = 20, cfg_scale : Float64 = 14.0, trace : Proc(String, Nil) | Nil = nil)
Source

Class methods

snap_dimensions(width : Int32, height : Int32, model : String = FLUX_DEV) : Tuple(Int32, Int32)

Snap dimensions to valid FLUX.1 pairs if needed.

Source

Instance methods

cfg_scale
Source
generate(request : Request, output_path : String) : Result
Source
model
Source
name
Source
preprocess_pose(image_uuid : String, width : Int32, height : Int32) : Tuple(String, String)

Extract OpenPose skeleton via ControlNet preprocessing. Returns {guide_uuid, guide_url}.

Source
steps
Source
upload_image(file_path : String) : String

Upload an image to Runware, returns a reusable UUID.

Source