TextToImageState
data class TextToImageState(val loadingConfiguration: Boolean = true, val generating: Boolean = false, val savingImage: Boolean = false, val sharingImage: Boolean = false, val promptValidationError: UiText? = null, val error: UiText? = null, val message: UiText? = null, val screenModal: GenerationModal = GenerationModal.None, val results: List<AiGenerationResult> = emptyList(), val editTag: PromptTagEditRequest? = null, val onBoardingDemo: Boolean = false, val platform: Platform = Platform.ANDROID, val mode: ServerSource = ServerSource.AUTOMATIC1111, val advancedToggleButtonVisible: Boolean = true, val advancedOptionsVisible: Boolean = false, val formPromptTaggedInput: Boolean = false, val prompt: String = "", val negativePrompt: String = "", val width: String = DEFAULT_SIZE.toString(), val height: String = DEFAULT_SIZE.toString(), val samplingSteps: Int = 20, val cfgScale: Float = 7.0f, val restoreFaces: Boolean = false, val seed: String = "", val subSeed: String = "", val subSeedStrength: Float = 0.0f, val selectedSampler: String = "", val selectedScheduler: Scheduler = Scheduler.AUTOMATIC, val availableForgeModules: List<ForgeModule> = emptyList(), val selectedForgeModules: List<ForgeModule> = emptyList(), val availableSamplers: List<String> = emptyList(), val selectedStylePreset: StabilityAiStylePreset = StabilityAiStylePreset.NONE, val selectedClipGuidancePreset: StabilityAiClipGuidance = StabilityAiClipGuidance.NONE, val openAiModel: OpenAiModel = OpenAiModel.default, val openAiSize: OpenAiSize = OpenAiSize.W1024_H1024, val openAiQuality: OpenAiQuality = OpenAiQuality.AUTO, val falAiModel: FalAiModel = FalAiModel.defaultTextToImage, val falAiImageSize: FalAiImageSize = FalAiImageSize.default, val falAiAcceleration: FalAiAcceleration = FalAiAcceleration.default, val falAiSyncMode: Boolean = false, val sdxlBackend: SdxlBackend = SdxlBackend.AUTO, val bonsaiBackend: BonsaiBackend = BonsaiBackend.AUTO, val bonsaiBackendSelectionVisible: Boolean = false, val arliAiModels: List<String> = emptyList(), val arliAiModel: String = "", val widthValidationError: UiText? = null, val heightValidationError: UiText? = null, val nsfw: Boolean = false, val batchCount: Int = 1, val hires: HiresConfig = HiresConfig.DISABLED, val aDetailer: ADetailerConfig = ADetailerConfig.DISABLED, val aDetailerAvailable: Boolean = false, val aDetailerRefreshing: Boolean = false) : MviState, GenerationInputFormState(source)
Complete render state for txt2img.
The state combines screen lifecycle flags, generated results, validation feedback, current platform metadata, and the shared generation form contract used by provider-specific controls such as Android Bonsai backend selection.
Constructors
Link copied to clipboard
constructor(loadingConfiguration: Boolean = true, generating: Boolean = false, savingImage: Boolean = false, sharingImage: Boolean = false, promptValidationError: UiText? = null, error: UiText? = null, message: UiText? = null, screenModal: GenerationModal = GenerationModal.None, results: List<AiGenerationResult> = emptyList(), editTag: PromptTagEditRequest? = null, onBoardingDemo: Boolean = false, platform: Platform = Platform.ANDROID, mode: ServerSource = ServerSource.AUTOMATIC1111, advancedToggleButtonVisible: Boolean = true, advancedOptionsVisible: Boolean = false, formPromptTaggedInput: Boolean = false, prompt: String = "", negativePrompt: String = "", width: String = DEFAULT_SIZE.toString(), height: String = DEFAULT_SIZE.toString(), samplingSteps: Int = 20, cfgScale: Float = 7.0f, restoreFaces: Boolean = false, seed: String = "", subSeed: String = "", subSeedStrength: Float = 0.0f, selectedSampler: String = "", selectedScheduler: Scheduler = Scheduler.AUTOMATIC, availableForgeModules: List<ForgeModule> = emptyList(), selectedForgeModules: List<ForgeModule> = emptyList(), availableSamplers: List<String> = emptyList(), selectedStylePreset: StabilityAiStylePreset = StabilityAiStylePreset.NONE, selectedClipGuidancePreset: StabilityAiClipGuidance = StabilityAiClipGuidance.NONE, openAiModel: OpenAiModel = OpenAiModel.default, openAiSize: OpenAiSize = OpenAiSize.W1024_H1024, openAiQuality: OpenAiQuality = OpenAiQuality.AUTO, falAiModel: FalAiModel = FalAiModel.defaultTextToImage, falAiImageSize: FalAiImageSize = FalAiImageSize.default, falAiAcceleration: FalAiAcceleration = FalAiAcceleration.default, falAiSyncMode: Boolean = false, sdxlBackend: SdxlBackend = SdxlBackend.AUTO, bonsaiBackend: BonsaiBackend = BonsaiBackend.AUTO, bonsaiBackendSelectionVisible: Boolean = false, arliAiModels: List<String> = emptyList(), arliAiModel: String = "", widthValidationError: UiText? = null, heightValidationError: UiText? = null, nsfw: Boolean = false, batchCount: Int = 1, hires: HiresConfig = HiresConfig.DISABLED, aDetailer: ADetailerConfig = ADetailerConfig.DISABLED, aDetailerAvailable: Boolean = false, aDetailerRefreshing: Boolean = false)
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Executes the canGenerate step in the SDAI presentation layer.
Link copied to clipboard
Link copied to clipboard
Converts the current txt2img state into the domain generation request.
Link copied to clipboard
Executes the progressModal step in the SDAI presentation layer.
Link copied to clipboard
private fun TextToImageState.toBenchmarkRequest(payload: TextToImagePayload): LocalGenerationRequest
Link copied to clipboard
Executes the validated step in the SDAI presentation layer.
Link copied to clipboard
internal fun TextToImageState.withSettings(settings: Settings, stableDiffusionSamplers: List<String>?, forgeModules: List<ForgeModule>?, aDetailerAvailable: Boolean?, arliAiModels: List<String>?): TextToImageState
Executes the withSettings step in the SDAI presentation layer.
Link copied to clipboard
internal fun TextToImageState.withSource(source: ServerSource, stableDiffusionSamplers: List<String>?, forgeModules: List<ForgeModule>?, aDetailerAvailable: Boolean?, arliAiModels: List<String>?): TextToImageState
Executes the withSource step in the SDAI presentation layer.