Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import javax.inject.Singleton
@Singleton
class ImagenEditingDataSource @Inject constructor() {
private companion object {
const val IMAGEN_MODEL_NAME = "imagen-4.0-ultra-generate-001"
const val IMAGEN_MODEL_NAME = "imagen-4.0-generate-001"
const val IMAGEN_EDITING_MODEL_NAME = "imagen-3.0-capability-001"
const val DEFAULT_EDIT_STEPS = 50
const val DEFAULT_STYLE_STRENGTH = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import javax.inject.Singleton
class ImagenDataSource @Inject constructor() {
@OptIn(PublicPreviewAPI::class)
private val imagenModel = Firebase.ai(backend = GenerativeBackend.vertexAI()).imagenModel(
modelName = "imagen-4.0-generate-preview-06-06",
modelName = "imagen-4.0-generate-001",
generationConfig = ImagenGenerationConfig(
numberOfImages = 1,
aspectRatio = ImagenAspectRatio.SQUARE_1x1,
Expand Down
2 changes: 1 addition & 1 deletion samples/magic-selfie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This sample is part of the [AI Sample Catalog](../../). To build and run this sa

## Description

This sample demonstrates how to create a "magic selfie" by replacing the background of a user's photo with a generated image. It uses the ML Kit Subject Segmentation API to isolate the user from their original background and the Imagen API to generate a new background from a text prompt.
This sample demonstrates how to create a "magic selfie" by replacing the background of a user's photo with a generated image. It uses the ML Kit Subject Segmentation API to isolate the user from their original background and the Imagen model to generate a new background from a text prompt.

<div style="text-align: center;">
<img width="320" alt="Magic Selfie in action" src="magic_selfie.png" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import kotlin.math.roundToInt
class MagicSelfieRepository @Inject constructor() {
@OptIn(PublicPreviewAPI::class)
private val imagenModel = Firebase.ai(backend = GenerativeBackend.vertexAI()).imagenModel(
modelName = "imagen-4.0-generate-preview-06-06",
modelName = "imagen-4.0-generate-001",
generationConfig = ImagenGenerationConfig(
numberOfImages = 1,
aspectRatio = ImagenAspectRatio.PORTRAIT_3x4,
Expand Down
Loading