stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: XYZ plot Error when grid has more than 7 Images in a row

Open TheBru72 opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

when creating a XYZ plot all images are generated, but there's no grid when there are more than 7 images in a row.

Console output: TypeError: 'float' object cannot be interpreted as an integer

Steps to reproduce the problem

  1. xyz plot
  2. x type = seed
  3. x value = 1-10
  4. generate

What should have happened?

aThe should be a grid produced at the end of the generation

Commit where the problem happens

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/d84f3cf7a7743bc91cd5ba524c76cf859e021b49

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers

List of extensions

also happened without any extensions

Console logs

X/Y/Z plot will create 10 images on 1 10x1 grid. (Total steps to process: 200)[07:20, 11.26it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.13it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.44it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.45it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.40it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.39it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.39it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.44it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.39it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.38it/s]
100%|██████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.38it/s]
Error completing request8:10, 11.24it/s]
Arguments: ('task(lkro5sdrmcihwbx)', 'Test', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 3, 0, 4, 512, 512, True, 'None', 'None', 0, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, '', 1, '1-10', 0, '', 0, '', True, False, False, False, 0) {}
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\modules\call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "D:\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "D:\stable-diffusion-webui\modules\txt2img.py", line 53, in txt2img
    processed = modules.scripts.scripts_txt2img.run(p, *args)
  File "D:\stable-diffusion-webui\modules\scripts.py", line 376, in run
    processed = script.run(p, *script_args)
  File "D:\stable-diffusion-webui\scripts\xyz_grid.py", line 615, in run
    images.save_image(processed.images[0], p.outpath_grids, "xyz_grid", info=grid_infotext[0], extension=opts.grid_format, prompt=p.prompt, seed=processed.seed, grid=True, p=p)
  File "D:\stable-diffusion-webui\modules\images.py", line 585, in save_image
    image = image.resize((opts.target_side_length, image.height * opts.target_side_length // image.width), LANCZOS)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 2192, in resize
    return self._new(self.im.resize(size, resample, box))
TypeError: 'float' object cannot be interpreted as an integer

Additional information

No response

TheBru72 avatar Feb 19 '23 11:02 TheBru72

same... issue, batch size 8 with count 10.

Traceback (most recent call last): File "/home/rubyon/stable-diffusion-webui/modules/call_queue.py", line 56, in f res = list(func(*args, **kwargs)) File "/home/rubyon/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(*args, **kwargs) File "/home/rubyon/stable-diffusion-webui/modules/txt2img.py", line 56, in txt2img processed = process_images(p) File "/home/rubyon/stable-diffusion-webui/modules/processing.py", line 486, in process_images res = process_images_inner(p) File "/home/rubyon/stable-diffusion-webui/modules/processing.py", line 710, in process_images_inner images.save_image(grid, p.outpath_grids, "grid", p.all_seeds[0], p.all_prompts[0], opts.grid_format, info=infotext(), short_filename=not opts.grid_extended_filename, p=p, grid=True) File "/home/rubyon/stable-diffusion-webui/modules/images.py", line 587, in save_image image = image.resize((image.width * opts.target_side_length // image.height, opts.target_side_length), LANCZOS) File "/home/rubyon/stable-diffusion-webui/venv/lib/python3.10/site-packages/PIL/Image.py", line 2192, in resize return self._new(self.im.resize(size, resample, box)) TypeError: 'float' object cannot be interpreted as an integer

rubyon avatar Feb 19 '23 12:02 rubyon

same.

Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, **kwargs)) File "D:\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "D:\stable-diffusion-webui\modules\txt2img.py", line 53, in txt2img processed = modules.scripts.scripts_txt2img.run(p, *args) File "D:\stable-diffusion-webui\modules\scripts.py", line 376, in run processed = script.run(p, *script_args) File "D:\stable-diffusion-webui\scripts\xyz_grid.py", line 618, in run images.save_image(processed.images[0], p.outpath_grids, "xyz_grid", info=grid_infotext[0], extension=opts.grid_format, prompt=p.prompt, seed=processed.seed, grid=True, p=p) File "D:\stable-diffusion-webui\modules\images.py", line 585, in save_image image = image.resize((opts.target_side_length, image.height * opts.target_side_length // image.width), LANCZOS) File "D:\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 2192, in resize return self._new(self.im.resize(size, resample, box)) TypeError: 'float' object cannot be interpreted as an integer

6 in x and 5 in y.

JJYYY-JJY avatar Feb 20 '23 11:02 JJYYY-JJY

Please check again now, it should have been resolved in 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8

EllangoK avatar Feb 20 '23 15:02 EllangoK

Here it works now! Thank You !!

TheBru72 avatar Feb 20 '23 16:02 TheBru72