推理提供商文档

WaveSpeed

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

WaveSpeed

所有支持的 WaveSpeed 模型均可在此处找到

WaveSpeedAI 是一个专注于图像和视频生成的高性能 AI 推理平台。依托前沿的基础设施和优化技术,WaveSpeedAI 为创意 AI 应用提供快速、可扩展且极具成本效益的模型服务。

支持的任务

图像到图像

在此处了解更多关于图像到图像的信息。

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="wavespeed",
    api_key=os.environ["HF_TOKEN"],
)

with open("cat.png", "rb") as image_file:
   input_image = image_file.read()

# output is a PIL.Image object
image = client.image_to_image(
    input_image,
    prompt="Turn the cat into a tiger.",
    model="black-forest-labs/FLUX.2-dev",
)

文本到图像

详细了解文本到图像 此处

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="wavespeed",
    api_key=os.environ["HF_TOKEN"],
)

# output is a PIL.Image object
image = client.text_to_image(
    "Astronaut riding a horse",
    model="black-forest-labs/FLUX.1-dev",
)

文本生成视频

在此处了解有关文本生成视频的更多信息

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="wavespeed",
    api_key=os.environ["HF_TOKEN"],
)

video = client.text_to_video(
    "A young man walking on the street",
    model="Wan-AI/Wan2.2-TI2V-5B",
)
在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.