DiffusionCapabilities constructor
DiffusionCapabilities({
- Iterable<
DiffusionModelVariant> ? supportedVariants, - Iterable<
DiffusionScheduler> ? supportedSchedulers, - int? maxResolutionPx,
- Iterable<
DiffusionMode> ? supportedModes, - int? maxWidthPx,
- int? maxHeightPx,
- bool? supportsIntermediateImages,
- bool? supportsSafetyChecker,
- bool? isReady,
- String? currentModel,
- bool? safetyCheckerEnabled,
- bool? supportsBatchGeneration,
- Iterable<
String> ? supportedOutputMediaTypes,
Implementation
factory DiffusionCapabilities({
$core.Iterable<DiffusionModelVariant>? supportedVariants,
$core.Iterable<DiffusionScheduler>? supportedSchedulers,
$core.int? maxResolutionPx,
$core.Iterable<DiffusionMode>? supportedModes,
$core.int? maxWidthPx,
$core.int? maxHeightPx,
$core.bool? supportsIntermediateImages,
$core.bool? supportsSafetyChecker,
$core.bool? isReady,
$core.String? currentModel,
$core.bool? safetyCheckerEnabled,
$core.bool? supportsBatchGeneration,
$core.Iterable<$core.String>? supportedOutputMediaTypes,
}) {
final result = create();
if (supportedVariants != null)
result.supportedVariants.addAll(supportedVariants);
if (supportedSchedulers != null)
result.supportedSchedulers.addAll(supportedSchedulers);
if (maxResolutionPx != null) result.maxResolutionPx = maxResolutionPx;
if (supportedModes != null) result.supportedModes.addAll(supportedModes);
if (maxWidthPx != null) result.maxWidthPx = maxWidthPx;
if (maxHeightPx != null) result.maxHeightPx = maxHeightPx;
if (supportsIntermediateImages != null)
result.supportsIntermediateImages = supportsIntermediateImages;
if (supportsSafetyChecker != null)
result.supportsSafetyChecker = supportsSafetyChecker;
if (isReady != null) result.isReady = isReady;
if (currentModel != null) result.currentModel = currentModel;
if (safetyCheckerEnabled != null)
result.safetyCheckerEnabled = safetyCheckerEnabled;
if (supportsBatchGeneration != null)
result.supportsBatchGeneration = supportsBatchGeneration;
if (supportedOutputMediaTypes != null)
result.supportedOutputMediaTypes.addAll(supportedOutputMediaTypes);
return result;
}