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

fix: skip type check for default values in validation #401

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nerdylive123
Copy link

please help run tests

@nerdylive123
Copy link
Author

from really simple repo for flux-schnell:
The rp_handler.py file https://github.com/UnSparkAI/worker-flux_schnell/blob/main/src/rp_handler.py

The schema file: Check if there’s anything wrong with the Runpod validation or the schema. ( in the repo too)

Here’s what I did to create this:

  • I copied the setup from the SD v2 worker (from Runpod).
  • Modified the prediction code.
  • Changed the schema to match Flux's input requirements.
  • Updated the model download process to download flux.
  • Built it using Runpod’s serverless GitHub repo and their new feature.

However, I’m encountering an error on the endpoint myz7sgu6nhzmo0, which is built from this repository.

  • I cannot find anything wrong with it the code, the expected is when i:

use only the 'prompt' field in the input ( without the others ), it should not throw an error, *but it did.. *like in the log in that endpoint

And... when i use all the fields that is in the validation (although not all is required because they already have default values in the validation) it finally works.

why this happens

after a while i debugged it, and found out that validator sets the default value to None, but the requirement is type of string, so it fails and throws an error.
heres the fix skipping check if the value = default value

please let me know if i should change anything or anything i can do better thanks

@deanq deanq self-requested a review February 20, 2025 17:52
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