Review fixes
This commit is contained in:
+15
-10
@@ -98,7 +98,7 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Install required packages\u00b6\n",
|
||||
"## Install required packages\n",
|
||||
"\n",
|
||||
"In this cookbook, we'll leverage the following Python packages:\n",
|
||||
"* `diffusers` for image generation pipelines,\n",
|
||||
@@ -232,13 +232,18 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"prompt = \"a black cat playing with a blue ball next to a parked white car, wide angle, photorealistic\"\n",
|
||||
"negative_prompt = \"low quality, blurred, text, illustration\"\n",
|
||||
"\n",
|
||||
"width, height = 1024, 768\n",
|
||||
"seed = 9213799\n",
|
||||
"\n",
|
||||
"image = pipeline(\n",
|
||||
" prompt=\"a black cat playing with a blue ball next to a parked white car, wide angle, photorealistic\",\n",
|
||||
" negative_prompt=\"low quality, blurred, text, illustration\",\n",
|
||||
" generator=torch.manual_seed(9213799),\n",
|
||||
" num_inference_steps=50,\n",
|
||||
" width=1024,\n",
|
||||
" height=768,\n",
|
||||
" prompt=prompt,\n",
|
||||
" negative_prompt=negative_prompt,\n",
|
||||
" generator=torch.manual_seed(seed),\n",
|
||||
" width=width,\n",
|
||||
" height=height,\n",
|
||||
").images[0]\n",
|
||||
"image"
|
||||
],
|
||||
@@ -570,10 +575,10 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"gt = {\"black cat\", \"blue ball\", \"white car\"}\n",
|
||||
"pred = {results.names[class_id] for class_id in valid_detections.class_id}\n",
|
||||
"ground_truth = {\"black cat\", \"blue ball\", \"white car\"}\n",
|
||||
"prediction = {results.names[class_id] for class_id in valid_detections.class_id}\n",
|
||||
"\n",
|
||||
"pred.issubset(gt)"
|
||||
"prediction.issubset(ground_truth)"
|
||||
],
|
||||
"metadata": {
|
||||
"colab": {
|
||||
|
||||
Reference in New Issue
Block a user