Skip to content

Commit

Permalink
fixed incorrect prompt assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
GChristensen committed Jun 14, 2023
1 parent 6132ee5 commit a86a40e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion modules/iflab/const.py
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
4 changes: 2 additions & 2 deletions modules/iflab/pipelines/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions modules/iflab/pipelines/style_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit a86a40e

Please sign in to comment.