Skip to content

post upload/mask not work #2112

Open
Open

Description

@kanbekotori

The restful tool has returned the correct result, but there are no images in the dir.

{ name: "demo-mask.png", subfolder: "123", type: "input" }
WechatIMG48

Is this a bug?

Activity

  1. denio-machete commented on Oct 11, 2026

    @denio-machete

    A current-source path can produce this success-without-file symptom: at 7f7fd918ed0815c5d5ef2ccfe44bfc8e72cfd217, the shared image_upload helper discards the mask callback return. The callback returns HTTP400/403 for rejected original references, but the outer helper proceeds to asset registration and success JSON. A missing original file also performs no save and implicitly returns None.

    An offline test executing the exact nested helper/route definitions with temporary synthetic files reproduced HTTP200 for invalid filename, rejected original subfolder and missing-original cases. Valid masks and plain uploads remained successful. This establishes the mechanism, not that it caused the original 2023 report.

    A separate local source proposal bb0ac286b0803d4d745c3e94a1b7f5b327b8edc0 returns the callback's non-None response before registration, and returns404 when the original file is missing. Independent review passed 3 unittest tests covering 5 cases, including preserved original RGB/uploaded alpha and zero registration on failure. Full PromptServer/dependency integration remains unrun; source is local and has not been submitted as a PR or deployed.

    Open #13743 overlaps the mask callback's containment validation and should be coordinated; it does not change the helper's discarded return. #16771 concerns registration after saving. No live request, service, model, provider or user workflow was used for this evidence.

  2. vangel76 commented on Oct 17, 2026

    @vangel76

    I'm looking at this. In current master /upload/mask ignores the response the mask save callback returns for rejected original refs, so the request reports success without writing a file. I'll put up a small fix with a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions