Skip to content

Commit aef219a

Browse files
authored
Formatting/spelling fixes for Imagen4 NB (#2072)
1 parent 6008d86 commit aef219a

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

.github/actions/spelling/excludes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
^\Qsearch/bulk-question-answering/bulk_question_answering_output.tsv\E$
107107
^\Qvision/getting-started/image_editing_maskmode.ipynb\E$
108108
^\Qvision/getting-started/image_generation.ipynb\E$
109+
^\Qvision/getting-started/imagen4_image_generation.ipynb\E$
109110
^\Qvision/getting-started/visual_captioning.ipynb\E$
110111
^\Qvision/use-cases/creating_high_quality_visual_assets_with_gemini_and_imagen.ipynb\E$
111112
^\Qgemini/orchestration/llamaindex_workflows.ipynb\E$

vision/getting-started/imagen4_image_generation.ipynb

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@
370370
"With Imagen 4, you can generate high quality images with improved prompt adherence and text rendering capabilities. Run the cell below to see an example of an image generated with Imagen 4 that includes specific text and taglines to be rendered within the image.\n",
371371
"\n",
372372
"You can configure the `aspect ratio` to any of the following:\n",
373-
"* 1:1\n",
374-
"* 9:16\n",
375-
"* 16:9\n",
376-
"* 3:4\n",
377-
"* 4:3\n",
373+
"- `1:1`\n",
374+
"- `9:16`\n",
375+
"- `16:9`\n",
376+
"- `3:4`\n",
377+
"- `4:3`\n",
378378
"\n",
379379
"When using Imagen 4 you can set `number_of_images` to any value between 1 and 4."
380380
]
@@ -468,8 +468,15 @@
468468
"Along with Imagen 4, you have the option to use Imagen 4 Ultra. This model will return one exceptionally high quality image with latency as a tradeoff.\n",
469469
"\n",
470470
"When generating images of people you can also set the `safety_filter_level` and `person_generation` parameters accordingly:\n",
471-
"* `person_generation`: DONT_ALLOW, ALLOW_ADULT, ALLOW_ALL\n",
472-
"* `safety_filter_level`: BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH, BLOCK_NONE\n",
471+
"- `person_generation`\n",
472+
" - `DONT_ALLOW`\n",
473+
" - `ALLOW_ADULT`\n",
474+
" - `ALLOW_ALL`\n",
475+
"- `safety_filter_level`\n",
476+
" - `BLOCK_LOW_AND_ABOVE`\n",
477+
" - `BLOCK_MEDIUM_AND_ABOVE`\n",
478+
" - `BLOCK_ONLY_HIGH`\n",
479+
" - `BLOCK_NONE`\n",
473480
"\n",
474481
"**NOTE:** When using Imagen 4 Ultra, `number_of_images` must be set to 1."
475482
]
@@ -483,7 +490,7 @@
483490
"outputs": [],
484491
"source": [
485492
"prompt = \"\"\"\n",
486-
"Photorealistic night scene: looking into a brightly lit, classic 1960s American diner from the cold street outside. The entire view is filtered through a large pane of glass streaked with rainwater. The neon DINER sign outside casts colorful reflections on the wet pavement and the window itself. Moody, nostalgic, shallow depth of field emphasizing the window surface.\n",
493+
"Photorealistic night scene: looking into a brightly lit, classic 1960s American diner from the cold street outside. The entire view is filtered through a large pane of glass streaked with rainwater. The neon 'DINER' sign outside casts colorful reflections on the wet pavement and the window itself. Moody, nostalgic, shallow depth of field emphasizing the window surface.\n",
487494
"\"\"\"\n",
488495
"\n",
489496
"image = client.models.generate_images(\n",
@@ -557,7 +564,7 @@
557564
"outputs": [],
558565
"source": [
559566
"prompt = \"\"\"\n",
560-
"Design an elegant and symbolic movie poster for the period romance 'The Crimson Thread'. A close-up, artistic shot of two hands, almost touching, with a single, vibrant crimson thread winding between their fingers and subtly forming the title 'The Crimson Thread' within its loops and flows. The typography of the title should feel like flowy hand-stitched embroidery. The background is a soft-focus, desaturated garden.\n",
567+
"Design an elegant and symbolic movie poster for the period romance 'The Crimson Thread'. A close-up, artistic shot of two hands, almost touching, with a single, vibrant crimson thread winding between their fingers and subtly forming the title 'The Crimson Thread' within its loops and flows. The typography of the title should feel like flowy hand-stitched embroidery. The background is a soft-focus, de-saturated garden.\n",
561568
"\"\"\"\n",
562569
"\n",
563570
"image = client.models.generate_images(\n",

0 commit comments

Comments
 (0)