元编程参考文档

Hugging Face 模型库

5 个节点

本页内容 5

缓存文件夹

函数

The folder downloaded models are kept in.

签名
缓存文件夹() -> 文本
string CacheFolder()

返回

文件夹文本
所属发行版
元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Hugging Face 模型库
所属包
机器学习

已下载的模型

函数

The model repositories in the cache, with how much disk each takes.

签名
已下载的模型() -> (仓库: 文本数组, 大小: 数字数组)
string[] DownloadedModels(out double[] sizes)

返回

仓库文本数组
大小数字数组
所属发行版
元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Hugging Face 模型库
所属包
机器学习

下载文件

函数

Downloads one file of a repository into the cache and answers with its path.

签名
下载文件(仓库: 文本, 文件名: 文本, 修订版本: 文本) -> 文本
string DownloadFile(
    string repository,
    string fileName,
    string revision)

参数

名称类型默认值说明
仓库文本—The repository id.
文件名文本—The file's path inside the repository, such as config.json.
修订版本文本—A branch, tag or commit; empty for main.

返回

路径文本
所属发行版
元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Hugging Face 模型库
所属包
机器学习

下载模型

函数

Downloads a whole repository, or the files of it that match some patterns, into the cache, and answers with its folder. Files already there are not downloaded again.

签名
下载模型(仓库: 文本, 文件模式: 文本数组, 修订版本: 文本) -> 文本
string DownloadModel(
    string repository,
    string[] patterns,
    string revision)

参数

名称类型默认值说明
仓库文本—The repository id, such as HuggingFaceTB/SmolLM2-135M-Instruct.
文件模式文本数组—File patterns to download, such as *.json or unet/*.safetensors; empty for every file.
修订版本文本—A branch, tag or commit; empty for main.

返回

文件夹文本
所属发行版
元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Hugging Face 模型库
所属包
机器学习

是否已下载

函数

Whether a repository has anything in the cache.

签名
是否已下载(仓库: 文本) -> 真否
bool IsDownloaded(string repository)

参数

名称类型默认值说明
仓库文本—The repository id.

返回

已下载真否
所属发行版
元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Hugging Face 模型库
所属包
机器学习