Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
11360ad
feat: Add support for Imagen editing
google-labs-jules[bot] Jul 22, 2025
16b0535
some level of working imagen editing
cynthiajoan Jul 24, 2025
4d21169
inpaint background change working
cynthiajoan Jul 29, 2025
dd2b0b1
Merge branch 'main' into feature/imagen-editing
cynthiajoan Jul 31, 2025
2f7f3d9
some profiling fix
cynthiajoan Jul 31, 2025
01c9a04
make MessageData hold image bytes instead of Image object
cynthiajoan Jul 31, 2025
b56de35
Merge branch 'main' into feature/imagen-editing
cynthiajoan Aug 1, 2025
59c75e9
rename toString to toJson
cynthiajoan Aug 2, 2025
c794346
Merge branch 'main' into feature/imagen-editing
cynthiajoan Aug 9, 2025
d411aa8
solved the freeze issue with outpainting
cynthiajoan Aug 12, 2025
0b806dc
restore example main
cynthiajoan Aug 12, 2025
423bfd2
prepare for review
cynthiajoan Aug 14, 2025
b914125
Merge branch 'main' into feature/imagen-editing
cynthiajoan Aug 14, 2025
ece3d45
fix some test error
cynthiajoan Aug 14, 2025
293719f
fix analyzer
cynthiajoan Aug 14, 2025
761151c
more analyzer fix
cynthiajoan Aug 14, 2025
e136c60
more more analyzer
cynthiajoan Aug 14, 2025
cbf7817
update from api review
cynthiajoan Aug 14, 2025
0413fb7
analyzer
cynthiajoan Aug 14, 2025
34703ed
Apply suggestions from code review
cynthiajoan Aug 18, 2025
2be9e37
Merge branch 'main' into feature/imagen-editing
cynthiajoan Aug 18, 2025
c460f47
API review update
cynthiajoan Aug 18, 2025
de3957f
Merge branch 'main' into feature/imagen-editing
cynthiajoan Aug 20, 2025
e0b421c
remove the commented out api
cynthiajoan Aug 20, 2025
83f5565
fix the format
cynthiajoan Aug 20, 2025
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
4 changes: 2 additions & 2 deletions packages/firebase_ai/firebase_ai/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class _GenerativeAISampleState extends State<GenerativeAISample> {
imageFormat: ImagenFormat.jpeg(compressionQuality: 75),
);
return instance.imagenModel(
model: 'imagen-3.0-generate-002',
model: 'imagen-3.0-capability-001',
generationConfig: generationConfig,
safetySettings: ImagenSafetySettings(
ImagenSafetyFilterLevel.blockLowAndAbove,
Expand Down Expand Up @@ -230,7 +230,7 @@ class _HomeScreenState extends State<HomeScreen> {
onChanged: widget.onBackendChanged,
activeTrackColor: Colors.green.withValues(alpha: 0.5),
inactiveTrackColor: Colors.blueGrey.withValues(alpha: 0.5),
activeColor: Colors.green,
activeThumbColor: Colors.green,
inactiveThumbColor: Colors.blueGrey,
),
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ class _AudioPageState extends State<AudioPage> {
itemBuilder: (context, idx) {
return MessageWidget(
text: _messages[idx].text,
image: _messages[idx].image,
image: Image.memory(
_messages[idx].imageBytes!,
cacheWidth: 400,
cacheHeight: 400,
),
isFromUser: _messages[idx].fromUser ?? false,
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ class _BidiPageState extends State<BidiPage> {
itemBuilder: (context, idx) {
return MessageWidget(
text: _messages[idx].text,
image: _messages[idx].image,
image: Image.memory(
_messages[idx].imageBytes!,
cacheWidth: 400,
cacheHeight: 400,
),
isFromUser: _messages[idx].fromUser ?? false,
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ class _ChatPageState extends State<ChatPage> {
itemBuilder: (context, idx) {
return MessageWidget(
text: _messages[idx].text,
image: _messages[idx].image,
image: Image.memory(
_messages[idx].imageBytes!,
cacheWidth: 400,
cacheHeight: 400,
),
isFromUser: _messages[idx].fromUser ?? false,
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ class _ImagePromptPageState extends State<ImagePromptPage> {
var content = _generatedContent[idx];
return MessageWidget(
text: content.text,
image: content.image,
image: Image.memory(
content.imageBytes!,
cacheWidth: 400,
cacheHeight: 400,
),
isFromUser: content.fromUser ?? false,
);
},
Expand Down Expand Up @@ -137,14 +141,14 @@ class _ImagePromptPageState extends State<ImagePromptPage> {
];
_generatedContent.add(
MessageData(
image: Image.asset('assets/images/cat.jpg'),
imageBytes: catBytes.buffer.asUint8List(),
text: message,
fromUser: true,
),
);
_generatedContent.add(
MessageData(
image: Image.asset('assets/images/scones.jpg'),
imageBytes: sconeBytes.buffer.asUint8List(),
fromUser: true,
),
);
Expand Down
Loading
Loading