If tags are empty, returne __main_prompt

This commit is contained in:
Joel Holdbrooks 2023-01-22 22:44:44 -08:00
parent f4f684a915
commit 85b6aad6a9
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ class ImageCaption:
return self.__main_prompt + ", " + tags_caption return self.__main_prompt + ", " + tags_caption
def get_caption(self) -> str: def get_caption(self) -> str:
if self.__tags:
return self.__main_prompt + ", " + ", ".join(self.__tags) return self.__main_prompt + ", " + ", ".join(self.__tags)
return self.__main_prompt
@staticmethod @staticmethod
def __get_weighted_shuffled_tags(seed: int, tags: list[str], weights: list[float], max_target_tag_length: int) -> str: def __get_weighted_shuffled_tags(seed: int, tags: list[str], weights: list[float], max_target_tag_length: int) -> str: