From 550788eacad517b93c4fb02dc4b25f1728e63e09 Mon Sep 17 00:00:00 2001 From: Benjamin Berman Date: Mon, 22 May 2023 17:36:23 -0700 Subject: [PATCH] Updates for better compatibility with DeepFloyd --- comfy/utils.py | 6 ++++++ requirements.txt | 13 ++++++++----- setup.py | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/comfy/utils.py b/comfy/utils.py index 3bbe4f9a9..9da695302 100644 --- a/comfy/utils.py +++ b/comfy/utils.py @@ -1,3 +1,5 @@ +import os.path + import torch import math import struct @@ -379,3 +381,7 @@ class ProgressBar: def update(self, value): self.update_absolute(self.current + value) + + +def get_project_root() -> str: + return os.path.join(os.path.dirname(__file__), "..") diff --git a/requirements.txt b/requirements.txt index 140219d5e..8af22777c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ -torch>=1.13.0 -torchvision -torchaudio +torch==2.0.0 +torchaudio==2.0.0 +torchvision==0.15.1 torchdiffeq>=0.2.3 torchsde>=0.2.5 einops>=0.6.0 open-clip-torch>=2.16.0 -transformers>=4.25.1 +transformers>=4.29.1 safetensors>=0.3.0 pytorch-lightning>=2.0.0 aiohttp>=3.8.4 @@ -24,4 +24,7 @@ python-dateutil>=2.8.2 importlib_resources Pillow scipy -tqdm \ No newline at end of file +tqdm +diffusers>=0.16.1 +protobuf==3.20.3 +rembg[gpu] \ No newline at end of file diff --git a/setup.py b/setup.py index a6b5f2e81..e2b77d35b 100644 --- a/setup.py +++ b/setup.py @@ -88,6 +88,7 @@ def _is_amd() -> bool: def dependencies() -> [str]: _dependencies = open(os.path.join(os.path.dirname(__file__), "requirements.txt")).readlines() + # todo: also add all plugin dependencies _alternative_indices = [amd_torch_index, nvidia_torch_index, cpu_torch_index_nightlies] session = PipSession()