Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: division by zero #538

Closed
freecoderwaifu opened this issue Mar 28, 2024 · 7 comments
Closed

Error: division by zero #538

freecoderwaifu opened this issue Mar 28, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@freecoderwaifu
Copy link

freecoderwaifu commented Mar 28, 2024

Screenshot 2024-03-28 112222

Steps to reproduce:
Open new canvas
Use Live mode
Close canvas
Open new canvas
Error appears

However, the error doesn't appear if Live Mode is stopped before closing the canvas.

Log:

2024-03-28 11:23:43,017 INFO Extension initialized, Version: 1.16.0, Python: 3.10.7 (tags/v3.10.7:6cc6b13, Sep  5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
2024-03-28 11:23:44,217 INFO Connecting to http://127.0.0.1:8188
2024-03-28 11:23:47,514 INFO Found ControlNet model inpaint for SD 1.5: control_v11p_sd15_inpaint_fp16.safetensors
2024-03-28 11:23:47,514 INFO Found ControlNet model scribble for SD 1.5: control_lora_rank128_v11p_sd15_scribble_fp16.safetensors
2024-03-28 11:23:47,514 INFO Found ControlNet model scribble for SD XL: sai_xl_sketch_256lora.safetensors
2024-03-28 11:23:47,514 INFO Found ControlNet model line_art for SD 1.5: control_v11p_sd15_lineart_fp16.safetensors
2024-03-28 11:23:47,515 INFO Found ControlNet model line_art for SD XL: sai_xl_sketch_256lora.safetensors
2024-03-28 11:23:47,515 INFO Found ControlNet model soft_edge for SD 1.5: control_v11p_sd15_softedge_fp16.safetensors
2024-03-28 11:23:47,515 INFO Found ControlNet model canny_edge for SD 1.5: control_v11p_sd15_canny_fp16.safetensors
2024-03-28 11:23:47,515 INFO Found ControlNet model canny_edge for SD XL: sai_xl_canny_256lora.safetensors
2024-03-28 11:23:47,515 INFO Found ControlNet model depth for SD 1.5: control_lora_rank128_v11f1p_sd15_depth_fp16.safetensors
2024-03-28 11:23:47,515 INFO Found ControlNet model depth for SD XL: sai_xl_depth_256lora.safetensors
2024-03-28 11:23:47,516 INFO Found ControlNet model normal for SD 1.5: control_lora_rank128_v11p_sd15_normalbae_fp16.safetensors
2024-03-28 11:23:47,516 INFO Found ControlNet model pose for SD 1.5: control_lora_rank128_v11p_sd15_openpose_fp16.safetensors
2024-03-28 11:23:47,516 INFO Found ControlNet model pose for SD XL: thibaud_xl_openpose_256lora.safetensors
2024-03-28 11:23:47,516 INFO Found ControlNet model segmentation for SD 1.5: control_lora_rank128_v11p_sd15_seg_fp16.safetensors
2024-03-28 11:23:47,516 INFO Found ControlNet model blur for SD 1.5: control_lora_rank128_v11f1e_sd15_tile_fp16.safetensors
2024-03-28 11:23:47,516 INFO Optional ControlNet model blur for SD XL not found (search path: ttplanetsdxlcontrolnet, ttplanet_sdxl_controlnet_tile_realistic)
2024-03-28 11:23:47,516 INFO Found ControlNet model stencil for SD 1.5: control_v1p_sd15_qrcode_monster.safetensors
2024-03-28 11:23:47,516 INFO Found ControlNet model hands for SD 1.5: control_sd15_inpaint_depth_hand_fp16.safetensors
2024-03-28 11:23:47,516 INFO Found ControlNet model hands for SD XL: sai_xl_depth_256lora.safetensors
2024-03-28 11:23:47,516 INFO Found CLIP Vision model ip_adapter for All: SD1.5\model.safetensors
2024-03-28 11:23:47,518 INFO Found IP-Adapter model reference for SD 1.5: ip-adapter_sd15.safetensors
2024-03-28 11:23:47,518 INFO Found IP-Adapter model reference for SD XL: ip-adapter_sdxl_vit-h.safetensors
2024-03-28 11:23:47,518 INFO Found IP-Adapter model face for SD 1.5: ip-adapter-faceid-plusv2_sd15.bin
2024-03-28 11:23:47,518 INFO Found IP-Adapter model face for SD XL: ip-adapter-faceid-plusv2_sdxl.bin
2024-03-28 11:23:47,518 INFO Found Upscale model default for All: 4x_NMKD-Superscale-SP_178000_G.pth
2024-03-28 11:23:47,518 INFO Found Upscale model fast_2x for All: OmniSR_X2_DIV2K.safetensors
2024-03-28 11:23:47,518 INFO Found Upscale model fast_3x for All: OmniSR_X3_DIV2K.safetensors
2024-03-28 11:23:47,518 INFO Found Upscale model fast_4x for All: OmniSR_X4_DIV2K.safetensors
2024-03-28 11:23:47,519 INFO Found Inpaint model default for All: MAT_Places512_G_fp16.safetensors
2024-03-28 11:23:47,519 INFO Found Inpaint model fooocus_head for SD XL: fooocus_inpaint_head.pth
2024-03-28 11:23:47,519 INFO Found Inpaint model fooocus_patch for SD XL: inpaint_v26.fooocus.patch
2024-03-28 11:23:47,530 INFO Found LoRA model lcm for SD 1.5: lcm-lora-sdv1-5.safetensors
2024-03-28 11:23:47,541 INFO Found LoRA model lcm for SD XL: lcm-lora-sdxl.safetensors
2024-03-28 11:23:47,552 INFO Found LoRA model face for SD 1.5: ip-adapter-faceid-plusv2_sd15_lora.safetensors
2024-03-28 11:23:47,563 INFO Found LoRA model face for SD XL: ip-adapter-faceid-plusv2_sdxl_lora.safetensors
2024-03-28 11:23:53,198 INFO SD 1.5: supported
2024-03-28 11:23:53,198 INFO SD XL: supported
2024-03-28 11:23:53,198 INFO No supported styles found, creating default style with checkpoint (0)Mine\basemodelforlorabestquality.safetensors
2024-03-28 11:38:39,234 ERROR Error: division by zero
Traceback (most recent call last):
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\model.py", line 838, in _report_errors
    return await coro
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\model.py", line 603, in _continue_generating
    new_input = await self._model._generate_live(self._last_input)
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\model.py", line 240, in _generate_live
    input = workflow.prepare(
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\workflow.py", line 850, in prepare
    i.images, i.batch_count = resolution.prepare_image(
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\resolution.py", line 213, in prepare_image
    scaled, out_image, _, batch = prepare_diffusion_input(
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\resolution.py", line 166, in prepare_diffusion_input
    min_size, max_size, min_scale, max_scale = CheckpointResolution.compute(
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\resolution.py", line 138, in compute
    min_scale = math.sqrt(min_pixel_count / extent.pixel_count)
ZeroDivisionError: division by zero

Might also be related to not having the checkpoints for the default styles, despite not using them and setting them to not show


2024-03-28 11:50:38,824 ERROR Error: The checkpoint 'realisticVisionV51_v51VAE.safetensors' used by style 'Cinematic Photo' is not available on the server
Traceback (most recent call last):
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\model.py", line 838, in _report_errors
    return await coro
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\model.py", line 603, in _continue_generating
    new_input = await self._model._generate_live(self._last_input)
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\model.py", line 240, in _generate_live
    input = workflow.prepare(
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\workflow.py", line 812, in prepare
    _check_server_has_models(i.models, models, style.name)
  File "F:\LIBRARIES\AppData\Roaming\krita\pykrita\ai_diffusion\workflow.py", line 992, in _check_server_has_models
    raise ValueError(
ValueError: The checkpoint 'realisticVisionV51_v51VAE.safetensors' used by style 'Cinematic Photo' is not available on the server
@Acly Acly added the bug Something isn't working label Mar 28, 2024
Acly added a commit that referenced this issue Mar 29, 2024
- also set live buttons (play/record) to their correct state when switching documents
Acly added a commit that referenced this issue Mar 29, 2024
- also set live buttons (play/record) to their correct state when switching documents
Acly added a commit that referenced this issue Mar 29, 2024
- also set live buttons (play/record) to their correct state when switching documents
@Acly
Copy link
Owner

Acly commented Mar 31, 2024

Fixed the division by zero in v1.16.1
Let me know if you still run into issue with the wrong style being used.

@Acly Acly closed this as completed Mar 31, 2024
@tabishqidwai98
Copy link

tabishqidwai98 commented Mar 31, 2024 via email

@tabishqidwai98
Copy link

tabishqidwai98 commented Mar 31, 2024 via email

@Acly
Copy link
Owner

Acly commented Mar 31, 2024

The issue is still there but closed now. I also fixed that bug in a8a4ec3

@tabishqidwai98
Copy link

Oh okay, i didn't knew seeing the repo

@tabishqidwai98
Copy link

Can I contribute to any other feature-cum-bug on this same repo

@freecoderwaifu
Copy link
Author

Fixed the division by zero in v1.16.1 Let me know if you still run into issue with the wrong style being used.

Thank you, can confirm the division by zero is fixed. The style issue is still there however, I'll make a standalone issue to better track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants