Skip to content

Commit

Permalink
possible fix for dictionary changed size during iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Aug 19, 2023
1 parent 5a59138 commit 35db366
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/ui_extra_networks_checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def create_item(self, name, index=None, enable_filter=True):
}

def list_items(self):
for index, name in enumerate(sd_models.checkpoints_list):
names = list(sd_models.checkpoints_list)
for index, name in enumerate(names):
yield self.create_item(name, index)

def allowed_directories_for_previews(self):
Expand Down

1 comment on commit 35db366

@kotofey33
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot. You were very helpful. Good luck in job.

Please sign in to comment.