-
Notifications
You must be signed in to change notification settings - Fork 242
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
[Task Label & Icon] for Image-to-Video #317
Conversation
4b03ee0
to
6764b0e
Compare
export let classNames = ""; | ||
</script> | ||
|
||
<svg xmlns="http://www.w3.org/2000/svg" class={classNames} width="1em" height="1em" fill="none"><path fill="currentColor" fill-rule="evenodd" d="M1.43 1.2h6.63a.7.7 0 0 1 .7.7v4.44a.79.79 0 0 0-.34-.08h-.36V1.9H1.43v3.55l.9-.9a.7.7 0 0 1 .99 0l1.74 1.74a.79.79 0 0 0-.51.47L2.82 5.04l-1.4 1.4v2.09H4.5v.7H1.43a.7.7 0 0 1-.7-.7V1.9a.7.7 0 0 1 .7-.7ZM6.8 5.94l.32.32H5.5l.32-.32a.7.7 0 0 1 .99 0ZM6.2 4.52a1.05 1.05 0 1 1-1.17-1.75A1.05 1.05 0 0 1 6.2 4.52Zm-.4-1.16a.35.35 0 1 0-.38.58.35.35 0 0 0 .39-.58Zm3.9 5.16 1.57-1.26v3.14L9.7 9.15V10a.79.79 0 0 1-.79.79H5.77a.79.79 0 0 1-.79-.79V7.65a.79.79 0 0 1 .79-.78H8.9a.79.79 0 0 1 .79.78v.87Zm-3.93-.87v2.36H8.9V7.65H5.77Z" clip-rule="evenodd"/></svg> |
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.
@coyotte508 I think the formatter from #297 is not configured properly?
Shouldn't it be multline like
huggingface.js/packages/widgets/src/lib/components/Icons/IconTextToImage.svelte
Lines 5 to 25 in ccfb044
<svg | |
class={classNames} | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
aria-hidden="true" | |
fill="currentColor" | |
focusable="false" | |
role="img" | |
width="1em" | |
height="1em" | |
preserveAspectRatio="xMidYMid meet" | |
viewBox="0 0 32 32" | |
> | |
<path | |
d="M29.537 13.76l-3.297-3.297a1.586 1.586 0 0 0-2.24 0L10 24.467V30h5.533l14.004-14a1.586 1.586 0 0 0 0-2.24zM14.704 28H12v-2.704l9.44-9.441l2.705 2.704zM25.56 17.145l-2.704-2.704l2.267-2.267l2.704 2.704z" | |
fill="currentColor" | |
/><path d="M11 17h2v-7h3V8H8v2h3v7z" fill="currentColor" /><path | |
d="M8 20H4V4h16v4h2V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4z" | |
fill="currentColor" | |
/> | |
</svg> |
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.
hm yes maybe there's an issue with svelte files
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.
Thanks, LGTM!
packages/tasks/src/const.ts
Outdated
@@ -18,6 +18,7 @@ export const TASKS_MODEL_LIBRARIES: Record<PipelineType, ModelLibraryKey[]> = { | |||
"image-segmentation": ["transformers", "transformers.js"], | |||
"image-to-image": [], | |||
"image-to-text": ["transformers.js"], | |||
"image-to-video": [], // TODO: diffusers will soon support image-to-video |
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.
Let's add it already, it will be ready this week
"image-to-video": [], // TODO: diffusers will soon support image-to-video | |
"image-to-video": ["diffusers"], |
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.
@osanseviero shouldn't this line also be diffusers ?
"text-to-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.
wdyt e1d2b92 ?
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.
for another PR, we should probably unify packages/tasks/src/const.ts & packages/widgets/src/lib/interfaces/LibrariesToTasks.ts. Updating both of them is error-prone
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.
yep TBH i didn't even remember the tasks/src/const.ts one
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.
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.
They are different though. LibrariesToTasks
defines which tasks are supported by the Inference API for the specific library. This file is automatically generated by a GitHub Actions workflow in api-inference-community
. const.ts
is about library support, not specific to Inference API
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.
@@ -54,6 +54,7 @@ export const TASKS_DATA: Record<PipelineType, TaskData | undefined> = { | |||
"image-segmentation": getData("image-segmentation", imageSegmentation), | |||
"image-to-image": getData("image-to-image", imageToImage), | |||
"image-to-text": getData("image-to-text", imageToText), | |||
"image-to-video": undefined, |
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.
Just a question to help me understand how it works, would creating an entry in tasks/data
and populating it here would be enough to have the task listed in https://huggingface.co/tasks ?
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.
That's it, yes
for now the sync between this repo and the hub is'nt active (needs https://github.com/huggingface/moon-landing/pull/8158 + a follow-up PR)
but once it's active yes (there will be some stuff like publishing/updating packages but it can be automated by tooling)
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.
Awesome, thanks!
Follow up to huggingface#297 & huggingface#317 (comment) 1. Moved deps to devDeps (cc: @coyotte508 please check) 2. Prettier was not running on svelte files. Upgrading prettier fixed the issue
This is how it looks