From df7ff791b6b886f3a9aaed1d256623348f8f20ee Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Fri, 29 Nov 2024 17:44:08 +0100 Subject: [PATCH] Fixed paint your dream for python 3.9 (#114) --- .../last_known_config.txt | 91 ------------------- demos/paint_your_dreams_demo/main.py | 7 +- 2 files changed, 4 insertions(+), 94 deletions(-) delete mode 100644 demos/paint_your_dreams_demo/last_known_config.txt diff --git a/demos/paint_your_dreams_demo/last_known_config.txt b/demos/paint_your_dreams_demo/last_known_config.txt deleted file mode 100644 index e5de5ee9..00000000 --- a/demos/paint_your_dreams_demo/last_known_config.txt +++ /dev/null @@ -1,91 +0,0 @@ ---extra-index-url https://download.pytorch.org/whl/cpu - -aiofiles==23.2.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 -aiosignal==1.3.1 -annotated-types==0.7.0 -anyio==4.6.2.post1 -async-timeout==4.0.3 -attrs==24.2.0 -certifi==2024.8.30 -charset-normalizer==3.4.0 -click==8.1.7 -colorama==0.4.6 -coloredlogs==15.0.1 -datasets==3.0.2 -diffusers==0.31.0 -dill==0.3.8 -exceptiongroup==1.2.2 -fastapi==0.115.3 -ffmpy==0.4.0 -filelock==3.16.1 -frozenlist==1.4.1 -fsspec==2024.9.0 -gradio==5.3.0 -gradio_client==1.4.2 -h11==0.14.0 -httpcore==1.0.6 -httpx==0.27.2 -huggingface-hub==0.26.1 -humanfriendly==10.0 -idna==3.10 -importlib_metadata==8.5.0 -Jinja2==3.1.4 -markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -mdurl==0.1.2 -mpmath==1.3.0 -multidict==6.1.0 -multiprocess==0.70.16 -networkx==3.4.2 -numpy==2.0.2 -onnx==1.16.0 -opencv-python==4.10.0.84 -openvino==2024.4.0 -openvino-telemetry==2024.1.0 -optimum==1.23.2 -optimum-intel==1.20.0 -orjson==3.10.10 -packaging==24.1 -pandas==2.2.3 -pillow==10.4.0 -propcache==0.2.0 -protobuf==5.28.2 -pyarrow==17.0.0 -pydantic==2.9.2 -pydantic_core==2.23.4 -pydub==0.25.1 -Pygments==2.18.0 -pyreadline3==3.5.4 -python-dateutil==2.9.0.post0 -python-multipart==0.0.12 -pytz==2024.2 -PyYAML==6.0.2 -regex==2024.9.11 -requests==2.32.3 -rich==13.9.3 -ruff==0.7.0 -safetensors==0.4.5 -scipy==1.14.1 -semantic-version==2.10.0 -sentencepiece==0.2.0 -shellingham==1.5.4 -six==1.16.0 -sniffio==1.3.1 -starlette==0.41.0 -sympy==1.13.1 -tokenizers==0.20.1 -tomlkit==0.12.0 -torch==2.5.0+cpu -tqdm==4.66.5 -transformers==4.45.2 -typer==0.12.5 -typing_extensions==4.12.2 -tzdata==2024.2 -urllib3==2.2.3 -uvicorn==0.32.0 -websockets==12.0 -xxhash==3.5.0 -yarl==1.16.0 -zipp==3.20.2 diff --git a/demos/paint_your_dreams_demo/main.py b/demos/paint_your_dreams_demo/main.py index caeed93a..284f068f 100644 --- a/demos/paint_your_dreams_demo/main.py +++ b/demos/paint_your_dreams_demo/main.py @@ -4,6 +4,7 @@ import sys import time from pathlib import Path +from typing import Optional import gradio as gr import numpy as np @@ -21,8 +22,8 @@ MAX_SEED = np.iinfo(np.int32).max MODEL_DIR = Path("model") -ov_pipeline: OVLatentConsistencyModelPipeline | None = None -safety_checker: StableDiffusionSafetyChecker | None = None +ov_pipeline: Optional[OVLatentConsistencyModelPipeline] = None +safety_checker: Optional[StableDiffusionSafetyChecker] = None try: safety_checker = StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker", local_files_only=True) @@ -32,7 +33,7 @@ ov_pipelines = {} stop_generating: bool = True -hf_model_name: str | None = None +hf_model_name: Optional[str] = None def get_available_devices() -> list[str]: