-
Notifications
You must be signed in to change notification settings - Fork 143
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
Image Language Models and ImageGeneration
task
#1060
base: develop
Are you sure you want to change the base?
Conversation
Documentation for this PR has been built. You can view it at: https://distilabel.argilla.io/pr-1060/ |
CodSpeed Performance ReportMerging #1060 will not alter performanceComparing Summary
|
…ore pushing to the hub
if __name__ == "__main__": | ||
distiset = pipeline.run(use_cache=False, dataset=ds) | ||
# Save the images as `PIL.Image.Image` | ||
+ distiset = distiset.transform_columns_to_image("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.
+ distiset = distiset.transform_columns_to_image("image") | |
distiset = distiset.transform_columns_to_image("image") |
@@ -102,6 +102,7 @@ text-clustering = [ | |||
"scikit-learn >= 1.4.1", | |||
"matplotlib >= 3.8.3", # For the figure (even though it's optional) | |||
] | |||
vision = ["Pillow >= 10.3.0"] # To work with images. |
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.
I just go a pil error due to some imports
/Users/davidberenstein/Documents/programming/argilla/distilabel/.venv/lib/python3.11/site-packag │
│ es/distilabel/steps/tasks/text_generation_with_image.py:18 in <module> │
│ │
│ 15 from typing import TYPE_CHECKING, Any, Literal, Union │
│ 16 │
│ 17 from jinja2 import Template │
│ ❱ 18 from PIL import Image │
│ 19 from pydantic import Field │
│ 20 │
│ 21 from distilabel.steps.tasks.base import Task │
│ │
│ ╭──────────── locals ────────────╮ │
│ │ Literal = typing.Literal │ │
│ │ TYPE_CHECKING = False │ │
│ │ Union = typing.Union │ │
│ ╰────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'PIL'
Description
This PR adds a new module to models:
models/image_generation
to store image models (InferenceEndpointsImageGeneration
andOpenAIImageGeneration
), with 2 new base classes:ImageGenerationModel
andAsyncImageGenerationModel
, and a newImageGeneration
task.Sample pipeline and dataset. Take into account the
distiset.transform_columns_to_image
method, necessary to push the dataset with the images as objects instead of strings.