Class: Roseflow::AI::Models::StabilityAIAdapter

Inherits:
BaseAdapter
  • Object
show all
Includes:
ModelInterface
Defined in:
lib/roseflow/ai/models/stabilityai_adapter.rb

Instance Method Summary collapse

Instance Method Details

#call(operation, options, &block) ⇒ Object



16
17
18
# File 'lib/roseflow/ai/models/stabilityai_adapter.rb', line 16

def call(operation, options, &block)
  @model.call(operation, options, &block)
end

#configurationObject



12
13
14
# File 'lib/roseflow/ai/models/stabilityai_adapter.rb', line 12

def configuration
  @configuration ||= StabilityAI::Model::Configuration.new(engine_id: @model.name)
end

#image_to_image(options = {}) ⇒ Object



24
25
26
# File 'lib/roseflow/ai/models/stabilityai_adapter.rb', line 24

def image_to_image(options = {})
  @model.call(:image_to_image, options)
end

#masking(options = {}) ⇒ Object



32
33
34
# File 'lib/roseflow/ai/models/stabilityai_adapter.rb', line 32

def masking(options = {})
  @model.call(:masking, options)
end

#operationsObject



36
37
38
# File 'lib/roseflow/ai/models/stabilityai_adapter.rb', line 36

def operations
  @model.operations
end

#text_to_image(options = {}) ⇒ Object



20
21
22
# File 'lib/roseflow/ai/models/stabilityai_adapter.rb', line 20

def text_to_image(options = {})
  @model.call(:text_to_image, options)
end

#upscale(options = {}) ⇒ Object



28
29
30
# File 'lib/roseflow/ai/models/stabilityai_adapter.rb', line 28

def upscale(options = {})
  @model.call(:upscale, options)
end