Skip to content

fix(image-proc): scale_image error messages refer to wrong (+1 more) - #39

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/image-proc-assorted-1ce998c2
Open

fix(image-proc): scale_image error messages refer to wrong (+1 more)#39
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/image-proc-assorted-1ce998c2

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Small fixes in dream/image_proc.py:

fix: scale_image error messages refer to wrong variable

Fix: Replace:

    assert isinstance(
        new_height, int
    ), 'Expected new_width to be an integer, but it is "{}".'.format(type(new_height))

    assert (
        0 < new_width and new_width <= image_width
    ), "Expected new_width to be greater than zero and less than or equal to image_width ({}), but it is {}.".format(
        image_width, new_width
    )
    assert (
        0 < new_height and new_height <= image_height
    ), "Expected new_width to be greater than zero and less than or equal to image_height ({}), but it is {}.".format(
        image_height, new_height
    )

with:

    assert isinstance(
        new_height, int
    ), 'Expected new_height to be an integer, but it is "{}".'.format(type(new_height))

    assert (
        0 < new_width and new_width <= image_width
    ), "Expected new_width to be greater than zero and less than or equal to image_width ({}), but it is {}.".format(
        image_width, new_width
    )
    assert (
        0 < new_height and new_height <= image_height
    ), "Expected new_height to be greater than zero and less than or equal to image_height ({}), but it is {}.".format(
        image_height, new_height
    )

fix: centered_crop_image height error names width

Fix: Replace:

    assert isinstance(
        cropped_height, int
    ), 'Expected cropped_width to be an integer, but it is "{}".'.format(
        type(cropped_height)
    )

with:

    assert isinstance(
        cropped_height, int
    ), 'Expected cropped_height to be an integer, but it is "{}".'.format(
        type(cropped_height)
    )

Files changed

  • dream/image_proc.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review August 3, 2026 22:10
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.

1 participant