Skip to content

feat: fix randn found element of type float at pos 2#14004

Merged
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
storyicon:master
Nov 19, 2023
Merged

feat: fix randn found element of type float at pos 2#14004
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
storyicon:master

Conversation

@storyicon
Copy link
Copy Markdown
Contributor

Description

The values passed from gradio's components here are always of the float type, which results in the outcomes of self.seed_resize_from_h // 8 and self.seed_resize_from_w // 8 being float values that merely appear to be integers. This can cause issues at the following location:

https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/rng.py#L61

TypeError: randn(): argument 'size' must be tuple of ints, but found element of type float at pos 2

https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/rng.py#L142

TypeError: slice indices must be integers or None or have an __index__ method

Checklist:

Signed-off-by: storyicon <storyicon@foxmail.com>
@w-e-w w-e-w changed the base branch from master to dev November 17, 2023 11:15
@AUTOMATIC1111 AUTOMATIC1111 merged commit 5a9dc1c into AUTOMATIC1111:dev Nov 19, 2023
@w-e-w w-e-w mentioned this pull request Dec 4, 2023
@w-e-w w-e-w mentioned this pull request Dec 16, 2023
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