resolution_utils ¶
Functions:¶
fastvideo.models.dits.hyworld.resolution_utils.get_closest_resolution ¶
Get closest supported resolution for given image dimensions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image_height | Height of input image | required | |
image_width | Width of input image | required | |
target_resolution | Target resolution string (e.g., "480p", "720p") | '480p' |
Returns:
| Type | Description |
|---|---|
| tuple[int, int]: (height, width) of closest supported resolution |
Source code in fastvideo/models/dits/hyworld/resolution_utils.py
fastvideo.models.dits.hyworld.resolution_utils.get_resolution_from_image ¶
Automatically determine resolution from input image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image_path | Path or URL to input image | required | |
target_resolution | Target resolution tier ("480p", "720p", etc.) | '480p' |
Returns:
| Type | Description |
|---|---|
| tuple[int, int]: (height, width) matching HY-WorldPlay's bucket selection |