Skip to content
Open
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
14 changes: 14 additions & 0 deletions notebooks/biological-texture-generation-lcm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Biological Texture Generation (Iris) using LCM & OpenVINO™

This notebook demonstrates how to generate high-fidelity biological textures, specifically human iris patterns, using **Latent Consistency Models (LCM)**.

## Key Features
- **Model:** [SimianLuo/LCM_Dreamshaper_v7](https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7)
- **Library:** [Optimum Intel](https://github.com/huggingface/optimum-intel) with OpenVINO™ backend.
- **Performance:** Generates high-quality images in just 4-8 steps (vs 25-50 steps for standard Stable Diffusion).
- **Hardware:** Supports Intel CPU, GPU (iGPU/dGPU), and NPU.

## Usage
1. Install dependencies.
2. Select your target device (CPU/GPU) from the widget.
3. Run the pipeline to generate synthetic iris data for biometric research.
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
Copy link
Collaborator

@openvino-dev-samples openvino-dev-samples Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the inference part is missing


Reply via ReviewNB

"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "cXoFhlAHytJW",
"outputId": "aa7ff889-4d2e-4ee9-ae63-385037be013a"
},
"outputs": [],
"source": [
"%pip install -q \"openvino>=2023.2.0\" \"git+https://github.com/huggingface/optimum-intel.git\" \"diffusers\" \"transformers\" \"gradio\" --extra-index-url https://download.pytorch.org/whl/cpu"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "4hhdDBTlOHhv",
"outputId": "850624c3-4a1e-42ea-b464-cb523b0927e9"
},
"outputs": [],
"source": [
"import ipywidgets as widgets\n",
"import openvino as ov\n",
"from optimum.intel.openvino import OVLatentConsistencyModelPipeline\n",
"import gc\n",
"\n",
"# Initialize OpenVINO Core\n",
"core = ov.Core()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Create a dropdown widget to select the device (CPU, GPU, AUTO)\n",
"device = widgets.Dropdown(\n",
" options=core.available_devices + [\"AUTO\"],\n",
" value='AUTO',\n",
" description='Device:',\n",
" disabled=False,\n",
")\n",
"\n",
"device"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "UslPhY2mRFCD",
"outputId": "98b561d7-1460-47a7-8950-d31e9aa22130"
},
"outputs": [],
"source": [
"model_id = \"SimianLuo/LCM_Dreamshaper_v7\"\n",
"\n",
"print(f\"Loading {model_id} and converting to OpenVINO IR... (This may take a few minutes)\")\n",
"\n",
"# Load the model and export it to OpenVINO format automatically\n",
"pipe = OVLatentConsistencyModelPipeline.from_pretrained(\n",
" model_id,\n",
" export=True,\n",
" device=device.value \n",
")\n",
"\n",
"# Compile the model explicitly for the selected device\n",
"pipe.compile()\n",
"print(f\"✅ Model successfully compiled for {device.value}\")"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "4JHQFlfniXhk"
},
"source": []
}
],
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}