ImageToImageState

data class ImageToImageState(val loadingConfiguration: Boolean = true, val imageBase64: String = "", val denoisingStrength: Float = DEFAULT_DENOISING_STRENGTH, val pickingImage: Boolean = false, val generating: Boolean = false, val savingImage: Boolean = false, val sharingImage: Boolean = false, val inPaint: ImageInPaintState = ImageInPaintState(), val promptValidationError: String? = null, val error: String? = null, val message: String? = null, val screenModal: GenerationModal = GenerationModal.None, val results: List<AiGenerationResult> = emptyList(), val editTag: PromptTagEditRequest? = null, val onBoardingDemo: Boolean = false, 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 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 widthValidationError: UiText? = null, val heightValidationError: UiText? = null, val nsfw: Boolean = false, val batchCount: Int = 1) : MviState, GenerationInputFormState(source)

Carries ImageToImageState data through the SDAI presentation layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(loadingConfiguration: Boolean = true, imageBase64: String = "", denoisingStrength: Float = DEFAULT_DENOISING_STRENGTH, pickingImage: Boolean = false, generating: Boolean = false, savingImage: Boolean = false, sharingImage: Boolean = false, inPaint: ImageInPaintState = ImageInPaintState(), promptValidationError: String? = null, error: String? = null, message: String? = null, screenModal: GenerationModal = GenerationModal.None, results: List<AiGenerationResult> = emptyList(), editTag: PromptTagEditRequest? = null, onBoardingDemo: Boolean = false, 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 = "", 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, widthValidationError: UiText? = null, heightValidationError: UiText? = null, nsfw: Boolean = false, batchCount: Int = 1)

Properties

Link copied to clipboard
open override val advancedOptionsVisible: Boolean

Exposes the advancedOptionsVisible value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the advancedToggleButtonVisible value used by the SDAI presentation layer.

Link copied to clipboard
open override val availableSamplers: List<String>

Exposes the availableSamplers value used by the SDAI presentation layer.

Link copied to clipboard
open override val batchCount: Int

Exposes the batchCount value used by the SDAI presentation layer.

Link copied to clipboard
Link copied to clipboard
open override val cfgScale: Float

Exposes the cfgScale value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the denoisingStrength value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the editTag value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the error value used by the SDAI presentation layer.

Link copied to clipboard
open override val formPromptTaggedInput: Boolean

Exposes the formPromptTaggedInput value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the generating value used by the SDAI presentation layer.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val height: String

Exposes the height value used by the SDAI presentation layer.

Link copied to clipboard
open override val heightValidationError: UiText?

Exposes the heightValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the imageBase64 value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the inPaint value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the loadingConfiguration value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the message value used by the SDAI presentation layer.

Link copied to clipboard
open override val mode: ServerSource

Exposes the mode value used by the SDAI presentation layer.

Link copied to clipboard
open override val negativePrompt: String

Exposes the negativePrompt value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the negativePromptKeywords value used by the SDAI presentation layer.

Link copied to clipboard
open override val nsfw: Boolean

Exposes the nsfw value used by the SDAI presentation layer.

Link copied to clipboard
open override val onBoardingDemo: Boolean

Exposes the onBoardingDemo value used by the SDAI presentation layer.

Link copied to clipboard
open override val openAiModel: OpenAiModel

Exposes the openAiModel value used by the SDAI presentation layer.

Link copied to clipboard
open override val openAiQuality: OpenAiQuality

Exposes the openAiQuality value used by the SDAI presentation layer.

Link copied to clipboard
open override val openAiSize: OpenAiSize

Exposes the openAiSize value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the pickingImage value used by the SDAI presentation layer.

Link copied to clipboard
open override val prompt: String

Exposes the prompt value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the promptKeywords value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the promptValidationError value used by the SDAI presentation layer.

Link copied to clipboard
open override val restoreFaces: Boolean

Exposes the restoreFaces value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the results value used by the SDAI presentation layer.

Link copied to clipboard
open override val samplingSteps: Int

Exposes the samplingSteps value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the savingImage value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the screenModal value used by the SDAI presentation layer.

Link copied to clipboard
open override val seed: String

Exposes the seed value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the selectedClipGuidancePreset value used by the SDAI presentation layer.

Link copied to clipboard
open override val selectedSampler: String

Exposes the selectedSampler value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the selectedStylePreset value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the sharingImage value used by the SDAI presentation layer.

Link copied to clipboard
open override val subSeed: String

Exposes the subSeed value used by the SDAI presentation layer.

Link copied to clipboard
open override val subSeedStrength: Float

Exposes the subSeedStrength value used by the SDAI presentation layer.

Link copied to clipboard
open override val width: String

Exposes the width value used by the SDAI presentation layer.

Link copied to clipboard
open override val widthValidationError: UiText?

Exposes the widthValidationError value used by the SDAI presentation layer.

Functions

Link copied to clipboard
internal fun ImageToImageState.mapToPayload(maskBase64: String? = null): ImageToImagePayload

Converts SDAI data with mapToPayload.

Link copied to clipboard
internal fun ImageToImageState.progressModal(canCancelLocalGeneration: Boolean): GenerationModal

Executes the progressModal step in the SDAI presentation layer.

Link copied to clipboard

Executes the validated step in the SDAI presentation layer.

Link copied to clipboard
internal fun ImageToImageState.withSettings(settings: Settings, stableDiffusionSamplers: List<String>?): ImageToImageState

Executes the withSettings step in the SDAI presentation layer.

Link copied to clipboard
internal fun ImageToImageState.withSource(source: ServerSource, stableDiffusionSamplers: List<String>?): ImageToImageState

Executes the withSource step in the SDAI presentation layer.