chaiNNer-org / chaiNNer

A node-based image processing GUI aimed at making chaining image processing tasks easy and customizable. Born as an AI upscaling application, chaiNNer has grown into an extremely flexible and powerful programmatic image processing application.
https://chaiNNer.app
GNU General Public License v3.0
4.6k stars 283 forks source link

Upscale Node Expected return size matches value but emits error #2999

Open PereViader opened 3 months ago

PereViader commented 3 months ago

Information:

Description Use upscale node on an image of size 532x400 Upscale to size 2720x2048

image

Logs

Error

An error occurred in a Upscale node:

Expected the returned image to be 2720x2048px but found 2720x2048px instead

Input values:
• Image: RGB Image 532x400
• Upscaler Mode: Scale to
• Resize multiplier: 4
• Width: 2720
• Height: 2048
• Crop to fit: No
• Upscaler 1: SwinIR 4x
• Use second upscaler: No
• Upscaler 2: SwinIR 4x
• Upscaler 2 visibility: 0.3

Stack Trace:
Traceback (most recent call last):
  File "C:\Users\perev\AppData\Local\chaiNNer\app-0.24.1\resources\src\process.py", line 176, in run_node
    raw_output = node.run(*enforced_inputs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\perev\AppData\Local\chaiNNer\app-0.24.1\resources\src\nodes\node_cache.py", line 163, in _run
    output = run(*args)
             ^^^^^^^^^^
  File "C:\Users\perev\AppData\Local\chaiNNer\app-0.24.1\resources\src\packages\chaiNNer_external\external_stable_diffusion\automatic1111\upscale.py", line 191, in upscale_node
    (rw, rh) == (int(iw * larger_ratio), int(ih * larger_ratio))
AssertionError: Expected the returned image to be 2720x2048px but found 2720x2048px instead 
joeyballentine commented 3 months ago

Thanks for reporting. We will look into this at some point

PereViader commented 3 months ago

As a workaround, I have manually run the upscaling within Automatic1111 and used the upscaled image directly as input for the rest of the process.