From 7deef2cb271599546cf1bfe01d7c0deb391dc5ae Mon Sep 17 00:00:00 2001 From: Stefan Tobler Date: Sun, 14 Jan 2024 01:33:43 -0500 Subject: [PATCH] fixing issue where default board did not return images --- .../bulk_download/bulk_download_default.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/invokeai/app/services/bulk_download/bulk_download_default.py b/invokeai/app/services/bulk_download/bulk_download_default.py index b80b8cc2f5..36d2b350b9 100644 --- a/invokeai/app/services/bulk_download/bulk_download_default.py +++ b/invokeai/app/services/bulk_download/bulk_download_default.py @@ -10,7 +10,7 @@ from invokeai.app.services.bulk_download.bulk_download_common import ( BulkDownloadTargetException, ) from invokeai.app.services.events.events_base import EventServiceBase -from invokeai.app.services.image_records.image_records_common import ImageRecordNotFoundException +from invokeai.app.services.image_records.image_records_common import ImageCategory, ImageRecordNotFoundException from invokeai.app.services.invoker import Invoker from .bulk_download_base import BulkDownloadBase @@ -67,7 +67,17 @@ class BulkDownloadService(BulkDownloadBase): try: board_name: str = "" if board_id: - image_names = invoker.services.board_image_records.get_all_board_image_names_for_board(board_id) + # -1 is the default value for limit, which means no limit, is_intermediate only gives us completed images + image_names = [ + img.image_name + for img in invoker.services.images.get_many( + offset=0, + limit=-1, + board_id=board_id, + is_intermediate=False, + categories=[ImageCategory.GENERAL], + ).items + ] if board_id == "none": board_id = "Uncategorized" board_name = "Uncategorized"