From 62753912979fcab0f33b8388a5fa8a2d289fb983 Mon Sep 17 00:00:00 2001 From: Matthias Egger Date: Sun, 14 May 2023 02:05:37 +0200 Subject: [PATCH] Fixing "SeedSequence expects int or sequence of ints for entropy not N.0" When Using AUTOMATIC1111 or vladmandic/automatic the Sampler [DPM++ SDE] spits out an error when a seed (3106912320) is defined in [Prompt Matrix]: SeedSequence expects int or sequence of ints for entropy not 3106912320.0 This issues was reported in: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7989 And the user [grumpyland] posted a quick and dirty fix for it. Since this also fixed my problem, i made an issue request to vladmandic/automatic: https://github.com/vladmandic/automatic/issues/904 [vladmandic] recommended to create a Pull Request, so here is my commit to it. --- k_diffusion/sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k_diffusion/sampling.py b/k_diffusion/sampling.py index f050f88..afe00c2 100644 --- a/k_diffusion/sampling.py +++ b/k_diffusion/sampling.py @@ -77,7 +77,7 @@ def __init__(self, x, t0, t1, seed=None, **kwargs): except TypeError: seed = [seed] self.batched = False - self.trees = [torchsde.BrownianTree(t0, w0, t1, entropy=s, **kwargs) for s in seed] + self.trees = [torchsde.BrownianTree(t0, w0, t1, entropy=int(s), **kwargs) for s in seed] @staticmethod def sort(a, b):