Skip to content

xyz grid handle axis_type is None#14394

Merged
AUTOMATIC1111 merged 1 commit intodevfrom
minor-xyz-fix
Dec 30, 2023
Merged

xyz grid handle axis_type is None#14394
AUTOMATIC1111 merged 1 commit intodevfrom
minor-xyz-fix

Conversation

@w-e-w
Copy link
Copy Markdown
Collaborator

@w-e-w w-e-w commented Dec 21, 2023

Description

xyz grid
if the selected axle from dropdown is not found the axis_type index will be None
triggering and error

  File "B:\GitHub\stable-diffusion-webui\scripts\xyz_grid.py", line 479, in select_axis
    choices = self.current_axis_options[axis_type].choices
TypeError: list indices must be integers or slices, not NoneType

simple fix
if axis_type is None then set to index 0 (Nothing)

same logic also applies to run()

Screenshots/videos:

2023-12-22.00_14_11_609.chrome.mp4

Checklist:

@w-e-w w-e-w requested a review from AUTOMATIC1111 as a code owner December 21, 2023 15:40
@w-e-w w-e-w changed the title handle axis_type is None xyz grid handle axis_type is None Dec 21, 2023
@AUTOMATIC1111 AUTOMATIC1111 merged commit 1d603eb into dev Dec 30, 2023
@AUTOMATIC1111 AUTOMATIC1111 deleted the minor-xyz-fix branch December 30, 2023 12:06
@w-e-w w-e-w mentioned this pull request Feb 17, 2024
@pawel665j pawel665j mentioned this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants