-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Add 'path' option to ImagePrompt data_format #25081
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ class DataModuleConfig(TypedDict): | |
|
||
class ImagePrompt(BaseModel): | ||
|
||
data_format: Literal["b64_json", "bytes", "url"] | ||
data_format: Literal["b64_json", "bytes", "url", "path"] | ||
|
||
""" | ||
This is the data type for the input image | ||
""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this change correctly adds the
path
option todata_format
, the new functionality is not covered by any tests. To ensure correctness and prevent future regressions, please add a test case fordata_format: "path"
intests/plugins_tests/test_io_processor_plugins.py
. You could add a new test function or parameterize an existing one to handle thepath
case, for example by downloading the test image to a temporary file and passing its path.