Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1ImageConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firebaseml_v2beta/classes.rb,
lib/google/apis/firebaseml_v2beta/representations.rb,
lib/google/apis/firebaseml_v2beta/representations.rb

Overview

Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ImageConfig

Returns a new instance of GoogleCloudAiplatformV1beta1ImageConfig.



2233
2234
2235
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2233

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aspect_ratioString

Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: "1:1" "2:3", "3:2" "3:4", "4:3" "4:5", "5:4" "9: 16", "16:9" "21:9" Corresponds to the JSON property aspectRatio

Returns:

  • (String)


2215
2216
2217
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2215

def aspect_ratio
  @aspect_ratio
end

#image_output_optionsGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1ImageConfigImageOutputOptions

The image output format for generated images. Corresponds to the JSON property imageOutputOptions



2220
2221
2222
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2220

def image_output_options
  @image_output_options
end

#image_sizeString

Optional. Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K. Corresponds to the JSON property imageSize

Returns:

  • (String)


2226
2227
2228
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2226

def image_size
  @image_size
end

#person_generationString

Optional. Controls whether the model can generate people. Corresponds to the JSON property personGeneration

Returns:

  • (String)


2231
2232
2233
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2231

def person_generation
  @person_generation
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2238
2239
2240
2241
2242
2243
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2238

def update!(**args)
  @aspect_ratio = args[:aspect_ratio] if args.key?(:aspect_ratio)
  @image_output_options = args[:image_output_options] if args.key?(:image_output_options)
  @image_size = args[:image_size] if args.key?(:image_size)
  @person_generation = args[:person_generation] if args.key?(:person_generation)
end