mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 17:52:16 +00:00
feat: add Hugging Face model source support (#8330)
Add support for Hugging Face as a model source in the Model Info Panel. - Display HF logo for Hugging Face sources - Extract source URL from `repo_url` metadata field ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8330-feat-add-Hugging-Face-model-source-support-2f56d73d3650816b8a01d903411ee3a1) by [Unito](https://www.unito.io) Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -72,6 +72,9 @@ export function getAssetDisplayName(asset: AssetItem): string {
|
||||
* @returns The source URL or null if not present/parseable
|
||||
*/
|
||||
export function getAssetSourceUrl(asset: AssetItem): string | null {
|
||||
if (typeof asset.metadata?.repo_url === 'string') {
|
||||
return asset.metadata.repo_url
|
||||
}
|
||||
// Note: Reversed priority for backwards compatibility
|
||||
const sourceArn =
|
||||
asset.metadata?.source_arn ?? asset.user_metadata?.source_arn
|
||||
|
||||
Reference in New Issue
Block a user