StableDiffusionGenerationRepositoryImpl

internal class StableDiffusionGenerationRepositoryImpl(mediaStoreGateway: MediaStoreGateway, backgroundWorkObserver: BackgroundWorkObserver, localDataSource: GenerationResultDataSource.Local, val remoteDataSource: StableDiffusionGenerationDataSource.Remote, val preferenceManager: PreferenceManager, val authorizationStore: AuthorizationStore, val textToImageDemo: TextToImageDemo, val imageToImageDemo: ImageToImageDemo) : CoreGenerationRepository, StableDiffusionGenerationRepository(source)

Implements StableDiffusionGenerationRepository behavior in the SDAI data layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(mediaStoreGateway: MediaStoreGateway, backgroundWorkObserver: BackgroundWorkObserver, localDataSource: GenerationResultDataSource.Local, remoteDataSource: StableDiffusionGenerationDataSource.Remote, preferenceManager: PreferenceManager, authorizationStore: AuthorizationStore, textToImageDemo: TextToImageDemo, imageToImageDemo: ImageToImageDemo)

Properties

Link copied to clipboard

Exposes the authorizationStore value used by the SDAI data layer.

Link copied to clipboard

Exposes the backgroundWorkObserver value used by the SDAI data layer.

Link copied to clipboard

Exposes the imageToImageDemo value used by the SDAI data layer.

Link copied to clipboard

Exposes the localDataSource value used by the SDAI data layer.

Link copied to clipboard

Exposes the mediaStoreGateway value used by the SDAI data layer.

Link copied to clipboard

Exposes the preferenceManager value used by the SDAI data layer.

Link copied to clipboard

Exposes the remoteDataSource value used by the SDAI data layer.

Link copied to clipboard

Exposes the textToImageDemo value used by the SDAI data layer.

Functions

Link copied to clipboard
open suspend override fun checkApiAvailability()
open suspend override fun checkApiAvailability(url: String)
Link copied to clipboard
private fun exportAsync(result: AiGenerationResult)

Executes the exportAsync step in the SDAI data layer.

Link copied to clipboard
protected suspend fun exportToMediaStoreAsync(result: AiGenerationResult)

Executes the exportToMediaStoreAsync step in the SDAI data layer.

Link copied to clipboard
open suspend override fun generateFromImage(payload: ImageToImagePayload): List<AiGenerationResult>
Link copied to clipboard
open suspend override fun generateFromText(payload: TextToImagePayload): List<AiGenerationResult>
Link copied to clipboard
protected suspend fun getInfoAsync(): MediaStoreInfo

Loads SDAI data through getInfoAsync.

Link copied to clipboard

Performs the SDAI side effect handled by insertGenerationResult.

Link copied to clipboard
open suspend override fun interruptGeneration()