-
Notifications
You must be signed in to change notification settings - Fork 639
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bot] Update inference types (#2712)
* Update inference types (automated commit) * fix quality after merging main * another fix * fix tests * Update inference types (automated commit) * Update inference types (automated commit) * fix quality * Update inference types (automated commit) * Update inference types (automated commit) * Update inference types (automated commit) * fix client * activate automatic update for table-question-answering * fix * Update inference types (automated commit) * fix quality * revert generate_kwargs -> generation_parameters renaming * add docstring back * add docstring back --------- Co-authored-by: Wauplin <11801849+Wauplin@users.noreply.github.com> Co-authored-by: Celina Hanouti <hanouticelina@gmail.com>
- Loading branch information
1 parent
9410c22
commit 803fa7b
Showing
12 changed files
with
100 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/huggingface_hub/inference/_generated/types/text_to_video.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Inference code generated from the JSON schema spec in @huggingface/tasks. | ||
# | ||
# See: | ||
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts | ||
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks. | ||
from dataclasses import dataclass | ||
from typing import Any, List, Optional | ||
|
||
from .base import BaseInferenceType | ||
|
||
|
||
@dataclass | ||
class TextToVideoParameters(BaseInferenceType): | ||
"""Additional inference parameters for Text To Video""" | ||
|
||
guidance_scale: Optional[float] = None | ||
"""A higher guidance scale value encourages the model to generate images closely linked to | ||
the text prompt, but values too high may cause saturation and other artifacts. | ||
""" | ||
negative_prompt: Optional[List[str]] = None | ||
"""One or several prompt to guide what NOT to include in image generation.""" | ||
num_frames: Optional[float] = None | ||
"""The num_frames parameter determines how many video frames are generated.""" | ||
num_inference_steps: Optional[int] = None | ||
"""The number of denoising steps. More denoising steps usually lead to a higher quality | ||
image at the expense of slower inference. | ||
""" | ||
seed: Optional[int] = None | ||
"""Seed for the random number generator.""" | ||
|
||
|
||
@dataclass | ||
class TextToVideoInput(BaseInferenceType): | ||
"""Inputs for Text To Video inference""" | ||
|
||
inputs: str | ||
"""The input text data (sometimes called "prompt")""" | ||
parameters: Optional[TextToVideoParameters] = None | ||
"""Additional inference parameters for Text To Video""" | ||
|
||
|
||
@dataclass | ||
class TextToVideoOutput(BaseInferenceType): | ||
"""Outputs of inference for the Text To Video task""" | ||
|
||
video: Any | ||
"""The generated video returned as raw bytes in the payload.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters