From a248d43974ccd0cd58be063ca5004099d8e1a9b9 Mon Sep 17 00:00:00 2001 From: hodanov <1031hoda@gmail.com> Date: Sat, 2 Sep 2023 00:42:38 +0900 Subject: [PATCH] Update requirements.txt. --- setup_files/requirements.txt | 11 ++++++----- setup_files/txt2img.py | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/setup_files/requirements.txt b/setup_files/requirements.txt index 6ba20b7..5a93c75 100644 --- a/setup_files/requirements.txt +++ b/setup_files/requirements.txt @@ -1,16 +1,17 @@ +invisible_watermark accelerate -diffusers[torch]==0.17.1 +diffusers[torch]==0.20.1 onnxruntime==1.15.1 -safetensors==0.3.1 +safetensors==0.3.3 torch==2.0.1+cu117 -transformers==4.30.2 -xformers==0.0.20 +transformers==4.32.0 +xformers==0.0.21 realesrgan==0.3.0 basicsr>=1.4.2 facexlib>=0.3.0 gfpgan>=1.3.8 -numpy +scipy==1.11.1 opencv-python Pillow torchvision diff --git a/setup_files/txt2img.py b/setup_files/txt2img.py index 748d4c8..eefecdf 100644 --- a/setup_files/txt2img.py +++ b/setup_files/txt2img.py @@ -70,7 +70,7 @@ class StableDiffusion(StableDiffusionInterface): else: print(f"The directory '{self.cache_path}' does not exist.") - torch.cuda.memory._set_allocator_settings("max_split_size_mb:256") + # torch.cuda.memory._set_allocator_settings("max_split_size_mb:256") self.pipe = diffusers.StableDiffusionPipeline.from_pretrained( self.cache_path, @@ -180,7 +180,7 @@ class StableDiffusion(StableDiffusionInterface): generator = torch.Generator("cuda").manual_seed(seed) with torch.inference_mode(): with torch.autocast("cuda"): - generated_images = self.pipe.text2img( + generated_images = self.pipe( prompt * batch_size, negative_prompt=n_prompt * batch_size, height=height,