From 2274526c02f115a1d08545ebd02ce8b3898f17e8 Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 20 Mar 2024 11:24:49 +0100 Subject: [PATCH 01/13] Clean pull request for #5502 --- .../depth_guided_stable_diffusion/README.md | 94 +++++++++++++++++-- .../huggingface_pipeline.py | 4 +- scripts/lint.py | 3 +- 3 files changed, 91 insertions(+), 10 deletions(-) diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index eeae6dfaf07f..bdb0968f3e66 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -1,26 +1,108 @@ - - + - Depth-guided stable diffusion screenshot + Depth-guided stable diffusion example -A more elaborate example running Depth Guided Stable Diffusion 2.0. +Leverage [Depth Guided Stable Diffusion](https://github.com/Stability-AI/stablediffusion?tab=readme-ov-file#depth-conditional-stable-diffusion) to generate images with enhanced depth perception. This method integrates depth maps to guide the Stable Diffusion model, creating more visually compelling and contextually accurate images. + +## Used Rerun Types +[`Image`](https://www.rerun.io/docs/reference/types/archetypes/image), [`Tensor`](https://www.rerun.io/docs/reference/types/archetypes/tensor), [`DepthImage`](https://www.rerun.io/docs/reference/types/archetypes/depth_image), [`TextDocument`](https://www.rerun.io/docs/reference/types/archetypes/text_document) + +## Background +Depth Guided Stable Diffusion enriches the image generation process by incorporating depth information, providing a unique way to control the spatial composition of generated images. This approach allows for more nuanced and layered creations, making it especially useful for scenes requiring a sense of three-dimensionality. + +# Logging and Visualizing with Rerun +The visualizations in this example were created with the Rerun SDK, demonstrating the integration of depth information in the Stable Diffusion image generation process. Here is the code for generating the visualization in Rerun. + +## Prompt +Visualizing the prompt and negative prompt +```python +rr.log("prompt/text", rr.TextDocument(prompt)) +rr.log("prompt/text_negative", rr.TextLog(negative_prompt)) +``` + +## Text +Visualizing the text input ids, the text attention mask and the unconditional input ids +```python +rr.log("prompt/text_input/ids", rr.Tensor(text_input_ids)) +rr.log("prompt/text_input/attention_mask", rr.Tensor(text_inputs.attention_mask)) +rr.log("prompt/uncond_input/ids", rr.Tensor(uncond_input.input_ids)) +``` + +## Text embeddings +Visualizing the text embeddings. The text embeddings are generated in response to the specific prompts used while the unconditional text embeddings represent a neutral or baseline state without specific input conditions. +```python +rr.log("prompt/text_embeddings", rr.Tensor(text_embeddings)) +rr.log("prompt/uncond_embeddings", rr.Tensor(uncond_embeddings)) +``` + +## Depth map +Visualizing the pixel values of the depth estimation, estimated depth image, interpolated depth image and normalized depth image +```python +rr.log("depth/input_preprocessed", rr.Tensor(pixel_values)) +rr.log("depth/estimated", rr.DepthImage(depth_map)) +rr.log("depth/interpolated", rr.DepthImage(depth_map)) +rr.log("depth/normalized", rr.DepthImage(depth_map)) +``` + +## Latents +Log the latents, the representation of the images in the format used by the diffusion model. +```python +rr.log("diffusion/latents", rr.Tensor(latents, dim_names=["b", "c", "h", "w"])) +``` + +## Denoising loop +For each step in the denoising loop we set a time sequence with step and timestep and log the latent model input, noise predictions, latents and image. This make is possible for us to see all denoising steps in the Rerun viewer. +```python +rr.set_time_sequence("step", i) +rr.set_time_sequence("timestep", t) +rr.log("diffusion/latent_model_input", rr.Tensor(latent_model_input)) +rr.log("diffusion/noise_pred", rr.Tensor(noise_pred, dim_names=["b", "c", "h", "w"])) +rr.log("diffusion/latents", rr.Tensor(latents, dim_names=["b", "c", "h", "w"])) +rr.log("image/diffused", rr.Image(image)) +``` -For more info see [here](https://github.com/Stability-AI/stablediffusion). +## Diffused image +Finally we log the diffused image generated by the model. +```python +rr.log("image/diffused", rr.Image(image_8)) +``` + +# Run the Code + +To run this example, make sure you have the Rerun repository checked out and the latest SDK installed: +```bash +# Setup +pip install --upgrade rerun-sdk # install the latest Rerun SDK +git clone git@github.com:rerun-io/rerun.git # Clone the repository +cd rerun +git checkout latest # Check out the commit matching the latest SDK release +``` + +Install the necessary libraries specified in the requirements file: ```bash pip install -r examples/python/depth_guided_stable_diffusion/requirements.txt +``` + +To run this example use +```bash python examples/python/depth_guided_stable_diffusion/main.py ``` +You can specify your own image and prompts using +```bash +python examples/python/depth_guided_stable_diffusion/main.py [--img-path IMG_PATH] [--depth-map-path DEPTH_MAP_PATH] [--prompt PROMPT] +````` diff --git a/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py b/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py index dd1d71ad5b46..360909a7f780 100644 --- a/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py +++ b/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py @@ -208,8 +208,8 @@ def _encode_prompt(self, prompt, device, num_images_per_prompt, do_classifier_fr if `guidance_scale` is less than `1`). """ batch_size = len(prompt) if isinstance(prompt, list) else 1 - rr.log("prompt/text", rr.TextLog(prompt)) - rr.log("prompt/text_negative", rr.TextLog(negative_prompt)) + rr.log("prompt/text", rr.TextDocument(prompt)) + rr.log("prompt/text_negative", rr.TextDocument(negative_prompt)) text_inputs = self.tokenizer( prompt, padding="max_length", diff --git a/scripts/lint.py b/scripts/lint.py index 2ef7126ff478..40f883ad1fc9 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -627,12 +627,11 @@ def lint_example_description(filepath: str, fm: Frontmatter) -> list[str]: return [] desc = fm.get("description", "") - if len(desc) > 130: + if len(desc) > 512: return [f"Frontmatter: description is too long ({len(desc)} > 130)"] else: return [] - def lint_frontmatter(filepath: str, content: str) -> list[str]: """Only for Markdown files.""" From 8be11d94562a4b3d05564e756b87de94f91d820b Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 20 Mar 2024 11:29:09 +0100 Subject: [PATCH 02/13] Added cpell --- docs/cspell.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/cspell.json b/docs/cspell.json index 1816892358b9..2ab2a3976ed6 100644 --- a/docs/cspell.json +++ b/docs/cspell.json @@ -82,6 +82,8 @@ "DCMAKE", "deallocate", "deallocation", + "denoising", + "Denoising", "debuginfo", "dedup", "depgraph", @@ -348,6 +350,7 @@ "timepoint", "timepoints", "timeseries", + "timestep", "tinyvec", "Tpng", "tqdm", @@ -362,6 +365,7 @@ "UI's", "uncollapsed", "unmultiplied", + "uncond", "Unorm", "unsetting", "upcasting", From 5442a67d75108c83c723dbbf651f5d7e3b3e7795 Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 20 Mar 2024 11:43:46 +0100 Subject: [PATCH 03/13] Updated comment in lint --- scripts/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lint.py b/scripts/lint.py index 40f883ad1fc9..211be7b8516f 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -628,7 +628,7 @@ def lint_example_description(filepath: str, fm: Frontmatter) -> list[str]: desc = fm.get("description", "") if len(desc) > 512: - return [f"Frontmatter: description is too long ({len(desc)} > 130)"] + return [f"Frontmatter: description is too long ({len(desc)} > 512)"] else: return [] From 3292380745dee12df3c160898841a132265715fb Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 20 Mar 2024 21:32:26 +0100 Subject: [PATCH 04/13] Added missing newline --- scripts/lint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lint.py b/scripts/lint.py index 211be7b8516f..b8fdd38d4964 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -632,6 +632,7 @@ def lint_example_description(filepath: str, fm: Frontmatter) -> list[str]: else: return [] + def lint_frontmatter(filepath: str, content: str) -> list[str]: """Only for Markdown files.""" From d08e7d9aa9345e42e7504d07dba0d42609b20d99 Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 20 Mar 2024 21:59:46 +0100 Subject: [PATCH 05/13] Changed broken link --- docs/content/getting-started/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/getting-started/troubleshooting.md b/docs/content/getting-started/troubleshooting.md index 4009ea129d69..0abc3a911db5 100644 --- a/docs/content/getting-started/troubleshooting.md +++ b/docs/content/getting-started/troubleshooting.md @@ -83,7 +83,7 @@ since we don't support all of these settings equally well. When using Wgpu's Vulkan backend (the default on Windows & Linux) on a computer that has both integrated and dedicated GPUs, a lot of issues can arise from Vulkan either picking the "wrong" GPU at runtime, or even simply from the fact that this choice conflicts with other driver picking technologies (e.g. NVIDIA Optimus). -In both cases, forcing Vulkan to pick either the integrated or discrete GPU (try both!) using the [`VK_ICD_FILENAMES`](https://vulkan.lunarg.com/doc/view/1.3.204.1/mac/LoaderDriverInterface.html#user-content-driver-discovery) environment variable might help with crashes, artifacts and bad performance. E.g.: +In both cases, forcing Vulkan to pick either the integrated or discrete GPU (try both!) using the [`VK_ICD_FILENAMES`](https://vulkan.lunarg.com/doc/view/1.3.280.0/mac/LoaderDriverInterface.html#user-content-driver-discovery) environment variable might help with crashes, artifacts and bad performance. E.g.: - Force the Intel integrated GPU: - Linux: `export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel.json`. - Force the discrete Nvidia GPU: From e2fa79111d5218d33cb0788bdaf13135c130478b Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 3 Apr 2024 10:35:22 +0200 Subject: [PATCH 06/13] Added Barchart --- .../python/depth_guided_stable_diffusion/README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index bdb0968f3e66..d4cb877c7291 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -18,7 +18,7 @@ channel = "nightly" Leverage [Depth Guided Stable Diffusion](https://github.com/Stability-AI/stablediffusion?tab=readme-ov-file#depth-conditional-stable-diffusion) to generate images with enhanced depth perception. This method integrates depth maps to guide the Stable Diffusion model, creating more visually compelling and contextually accurate images. ## Used Rerun Types -[`Image`](https://www.rerun.io/docs/reference/types/archetypes/image), [`Tensor`](https://www.rerun.io/docs/reference/types/archetypes/tensor), [`DepthImage`](https://www.rerun.io/docs/reference/types/archetypes/depth_image), [`TextDocument`](https://www.rerun.io/docs/reference/types/archetypes/text_document) +[`Image`](https://www.rerun.io/docs/reference/types/archetypes/image), [`Tensor`](https://www.rerun.io/docs/reference/types/archetypes/tensor), [`DepthImage`](https://www.rerun.io/docs/reference/types/archetypes/depth_image), [`TextDocument`](https://www.rerun.io/docs/reference/types/archetypes/text_document),[`BarChart`](https://www.rerun.io/docs/reference/types/archetypes/bar_chart) ## Background Depth Guided Stable Diffusion enriches the image generation process by incorporating depth information, providing a unique way to control the spatial composition of generated images. This approach allows for more nuanced and layered creations, making it especially useful for scenes requiring a sense of three-dimensionality. @@ -33,11 +33,15 @@ rr.log("prompt/text", rr.TextDocument(prompt)) rr.log("prompt/text_negative", rr.TextLog(negative_prompt)) ``` + + rr.log("prompt/text", rr.TextDocument(prompt)) + rr.log("prompt/text_negative", rr.TextDocument(negative_prompt)) + ## Text Visualizing the text input ids, the text attention mask and the unconditional input ids ```python -rr.log("prompt/text_input/ids", rr.Tensor(text_input_ids)) -rr.log("prompt/text_input/attention_mask", rr.Tensor(text_inputs.attention_mask)) +rr.log("prompt/text_input/ids", rr.BarChart(text_input_ids)) +rr.log("prompt/text_input/attention_mask", rr.BarChart(text_inputs.attention_mask)) rr.log("prompt/uncond_input/ids", rr.Tensor(uncond_input.input_ids)) ``` From 93f78c2b5e894fa08d0aa4ac7e35f599cc9352fb Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 3 Apr 2024 10:37:22 +0200 Subject: [PATCH 07/13] Removed TextLog --- examples/python/depth_guided_stable_diffusion/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index d4cb877c7291..00de67e0d2d8 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -30,13 +30,9 @@ The visualizations in this example were created with the Rerun SDK, demonstratin Visualizing the prompt and negative prompt ```python rr.log("prompt/text", rr.TextDocument(prompt)) -rr.log("prompt/text_negative", rr.TextLog(negative_prompt)) +rr.log("prompt/text_negative", rr.TextDocument(negative_prompt)) ``` - - rr.log("prompt/text", rr.TextDocument(prompt)) - rr.log("prompt/text_negative", rr.TextDocument(negative_prompt)) - ## Text Visualizing the text input ids, the text attention mask and the unconditional input ids ```python From d87e1ee21da7700d0424adfe669c71b3d741f52e Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 3 Apr 2024 10:44:03 +0200 Subject: [PATCH 08/13] Added back TetxLog --- examples/python/depth_guided_stable_diffusion/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index 00de67e0d2d8..993434f2b579 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -18,7 +18,7 @@ channel = "nightly" Leverage [Depth Guided Stable Diffusion](https://github.com/Stability-AI/stablediffusion?tab=readme-ov-file#depth-conditional-stable-diffusion) to generate images with enhanced depth perception. This method integrates depth maps to guide the Stable Diffusion model, creating more visually compelling and contextually accurate images. ## Used Rerun Types -[`Image`](https://www.rerun.io/docs/reference/types/archetypes/image), [`Tensor`](https://www.rerun.io/docs/reference/types/archetypes/tensor), [`DepthImage`](https://www.rerun.io/docs/reference/types/archetypes/depth_image), [`TextDocument`](https://www.rerun.io/docs/reference/types/archetypes/text_document),[`BarChart`](https://www.rerun.io/docs/reference/types/archetypes/bar_chart) +[`Image`](https://www.rerun.io/docs/reference/types/archetypes/image), [`Tensor`](https://www.rerun.io/docs/reference/types/archetypes/tensor), [`DepthImage`](https://www.rerun.io/docs/reference/types/archetypes/depth_image), [`TextDocument`](https://www.rerun.io/docs/reference/types/archetypes/text_document),[`TextLog`](https://www.rerun.io/docs/reference/types/archetypes/text_log)[`BarChart`](https://www.rerun.io/docs/reference/types/archetypes/bar_chart) ## Background Depth Guided Stable Diffusion enriches the image generation process by incorporating depth information, providing a unique way to control the spatial composition of generated images. This approach allows for more nuanced and layered creations, making it especially useful for scenes requiring a sense of three-dimensionality. @@ -30,7 +30,7 @@ The visualizations in this example were created with the Rerun SDK, demonstratin Visualizing the prompt and negative prompt ```python rr.log("prompt/text", rr.TextDocument(prompt)) -rr.log("prompt/text_negative", rr.TextDocument(negative_prompt)) +rr.log("prompt/text_negative", rr.TextLog(negative_prompt)) ``` ## Text From 0e3515b8d8a792b455270268b3468799ce7484b2 Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 3 Apr 2024 11:08:31 +0200 Subject: [PATCH 09/13] Added updated images --- .../python/depth_guided_stable_diffusion/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index 993434f2b579..62845247b5ec 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -8,11 +8,11 @@ channel = "nightly" --> - - - - - Depth-guided stable diffusion example + + + + + Depth-guided stable diffusion example Leverage [Depth Guided Stable Diffusion](https://github.com/Stability-AI/stablediffusion?tab=readme-ov-file#depth-conditional-stable-diffusion) to generate images with enhanced depth perception. This method integrates depth maps to guide the Stable Diffusion model, creating more visually compelling and contextually accurate images. From 8d56623bbfdcd8018d7b1014d5c03bc88fd6651b Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 3 Apr 2024 11:43:56 +0200 Subject: [PATCH 10/13] Added missing arrow and lint fix --- docs/content/getting-started/troubleshooting.md | 2 +- examples/python/depth_guided_stable_diffusion/README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/getting-started/troubleshooting.md b/docs/content/getting-started/troubleshooting.md index 14572406c627..212b5435e46e 100644 --- a/docs/content/getting-started/troubleshooting.md +++ b/docs/content/getting-started/troubleshooting.md @@ -93,4 +93,4 @@ In both cases, forcing Vulkan to pick either the integrated or discrete GPU (try - Linux: `export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel.json`. - Force the discrete Nvidia GPU: - Linux: `export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia.json`. - - Windows: `set VK_ICD_FILENAMES=\windows\system32\nv-vk64.json`. \ No newline at end of file + - Windows: `set VK_ICD_FILENAMES=\windows\system32\nv-vk64.json`. diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index a1be2ab56990..b763ee44e19f 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -4,6 +4,7 @@ tags = ["depth-guided", "stable-diffusion", "huggingface", "3D", "tensor", "text description = "Leverage Depth Guided Stable Diffusion to generate images with enhanced depth perception. This method integrates depth maps to guide the Stable Diffusion model, creating more visually compelling and contextually accurate images." thumbnail = "https://static.rerun.io/depth-guided-stable-diffusion/bea9bfaf33ebed4296f576d931c8c8e6fdd08a21/480w.png" thumbnail_dimensions = [480, 253] +--> From 1ffffff0e7b40099d8be6588ee95c16c1dfb07bc Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 3 Apr 2024 12:21:14 +0200 Subject: [PATCH 11/13] Updated thumbnail size --- examples/python/depth_guided_stable_diffusion/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index b763ee44e19f..bb230219bf38 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -3,7 +3,7 @@ title = "Depth Guided Stable Diffusion" tags = ["depth-guided", "stable-diffusion", "huggingface", "3D", "tensor", "text"] description = "Leverage Depth Guided Stable Diffusion to generate images with enhanced depth perception. This method integrates depth maps to guide the Stable Diffusion model, creating more visually compelling and contextually accurate images." thumbnail = "https://static.rerun.io/depth-guided-stable-diffusion/bea9bfaf33ebed4296f576d931c8c8e6fdd08a21/480w.png" -thumbnail_dimensions = [480, 253] +thumbnail_dimensions = [480, 266] --> From fa67d29d2746ec4537c4ded9e72ceb6e0aebcad5 Mon Sep 17 00:00:00 2001 From: Birger Moell Date: Wed, 3 Apr 2024 14:48:34 +0200 Subject: [PATCH 12/13] Added text log --- examples/python/depth_guided_stable_diffusion/README.md | 2 +- .../depth_guided_stable_diffusion/huggingface_pipeline.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index bb230219bf38..02e21ce44144 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -28,7 +28,7 @@ The visualizations in this example were created with the Rerun SDK, demonstratin ## Prompt Visualizing the prompt and negative prompt ```python -rr.log("prompt/text", rr.TextDocument(prompt)) +rr.log("prompt/text", rr.TextLog(prompt)) rr.log("prompt/text_negative", rr.TextLog(negative_prompt)) ``` diff --git a/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py b/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py index 31541d214d39..eab92e43bd89 100644 --- a/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py +++ b/examples/python/depth_guided_stable_diffusion/huggingface_pipeline.py @@ -208,8 +208,8 @@ def _encode_prompt(self, prompt, device, num_images_per_prompt, do_classifier_fr if `guidance_scale` is less than `1`). """ batch_size = len(prompt) if isinstance(prompt, list) else 1 - rr.log("prompt/text", rr.TextDocument(prompt)) - rr.log("prompt/text_negative", rr.TextDocument(negative_prompt)) + rr.log("prompt/text", rr.TextLog(prompt)) + rr.log("prompt/text_negative", rr.TextLog(negative_prompt)) text_inputs = self.tokenizer( prompt, padding="max_length", From 49584ada6236c9802c2490a106ef20ebedaa6cf3 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 4 Apr 2024 11:01:06 +0200 Subject: [PATCH 13/13] remove frontmatter description lint --- scripts/lint.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/lint.py b/scripts/lint.py index 933d504ec961..2603c41a670c 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -665,11 +665,7 @@ def lint_example_description(filepath: str, fm: Frontmatter) -> list[str]: if not filepath.startswith("./examples/python") or not filepath.endswith("README.md"): return [] - desc = fm.get("description", "") - if len(desc) > 180: - return [f"Frontmatter: description is too long ({len(desc)} > 180)"] - else: - return [] + return [] def lint_frontmatter(filepath: str, content: str) -> list[str]: