From a86a40e181ad45d149904f741e0d56bc4590044d Mon Sep 17 00:00:00 2001 From: GChristensen Date: Wed, 14 Jun 2023 16:51:46 +0400 Subject: [PATCH] fixed incorrect prompt assignment --- README.md | 3 +-- modules/iflab/const.py | 2 +- modules/iflab/pipelines/pipeline.py | 4 ++-- modules/iflab/pipelines/style_transfer.py | 6 ------ 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5b2bb84..dfab43d 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,7 @@ recommended requirements allow to achieve more or less seamless experience. >Q: Can I run this UI on a 8GB GPU? A: The UI may run on a 8GB GPUs with 12GB of system RAM and the swap of the same size, but it may require constant restarts -due to the insufficient memory. DeepFloyd IF is designed for 24GB of VRAM. -Some UI features, such as style transfer, are implemented only for GPUs with 24GB of video memory. +due to the insufficient memory. >Q: My generations look like halftone prints that were shredded and glued back by the pieces. How can I improve them? diff --git a/modules/iflab/const.py b/modules/iflab/const.py index 02dc099..505453b 100644 --- a/modules/iflab/const.py +++ b/modules/iflab/const.py @@ -1,6 +1,6 @@ import os -VERSION = "0.2.1" +VERSION = "0.2.2" DEBUG = os.getenv("IFLAB_DEBUG", False) DEBUG = not not (DEBUG and DEBUG != "0") diff --git a/modules/iflab/pipelines/pipeline.py b/modules/iflab/pipelines/pipeline.py index 0994772..b6f5586 100644 --- a/modules/iflab/pipelines/pipeline.py +++ b/modules/iflab/pipelines/pipeline.py @@ -112,14 +112,14 @@ def compute_t5_embs(self, update_prompt=True, update_negative=True, update_style if update_negative: if self.negative_prompt is not None: promptv = [self.negative_prompt] * self.count - self.t5_embs = self.stages.t5.get_text_embeddings(promptv) + self.negative_t5_embs = self.stages.t5.get_text_embeddings(promptv) else: self.negative_t5_embs = None if update_style: if self.style_prompt is not None: promptv = [self.style_prompt] * self.count - self.t5_embs = self.stages.t5.get_text_embeddings(promptv) + self.style_t5_embs = self.stages.t5.get_text_embeddings(promptv) else: self.style_t5_embs = None diff --git a/modules/iflab/pipelines/style_transfer.py b/modules/iflab/pipelines/style_transfer.py index 14b7826..bf1abf0 100644 --- a/modules/iflab/pipelines/style_transfer.py +++ b/modules/iflab/pipelines/style_transfer.py @@ -32,9 +32,3 @@ def modify_args(self, args): # TODO: move support images to the class level in all pipelines for optimization args["if_I_kwargs"].low_res = _prepare_pil_image(self.support_image, 64) args["if_I_kwargs"].mid_res = _prepare_pil_image(self.support_image, 256) - - def upscale(self, **kwargs): - if self.stages.sequential_load != SEQ_LOAD_OFF: - raise ModelError("Upscale is implemented only for I+II+III") - else: - return super().upscale(**kwargs)