mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
## Summary Adds HuggingFace as a model import source alongside CivitAI, with improved UX for model type selection and UTF-8 filename support. ## Changes - **Import Sources**: Implemented extensible import source handler pattern supporting both CivitAI and HuggingFace - **UTF-8 Support**: Decode URL-encoded filenames to properly display international characters (e.g., Chinese) - **UX**: Sort model types alphabetically for easier selection - **Feature Flag**: Added `huggingfaceModelImportEnabled` flag for gradual rollout - **i18n**: Use proper template parameters for localized error messages ## Technical Details - Created `ImportSourceHandler` interface for extensibility - Refactored existing CivitAI logic into handler pattern - Added URL validation per source - Filename decoding handles malformed URLs gracefully ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7540-feat-Add-HuggingFace-model-import-support-2cb6d73d3650818f966cca89244e8c36) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitHub Action <action@github.com>
23 lines
1.2 KiB
JavaScript
23 lines
1.2 KiB
JavaScript
// This file is intentionally kept in CommonJS format (.cjs)
|
|
// to resolve compatibility issues with dependencies that require CommonJS.
|
|
// Do not convert this file to ESModule format unless all dependencies support it.
|
|
const { defineConfig } = require('@lobehub/i18n-cli');
|
|
|
|
module.exports = defineConfig({
|
|
modelName: 'gpt-4.1',
|
|
splitToken: 1024,
|
|
entry: 'src/locales/en',
|
|
entryLocale: 'en',
|
|
output: 'src/locales',
|
|
outputLocales: ['zh', 'zh-TW', 'ru', 'ja', 'ko', 'fr', 'es', 'ar', 'tr', 'pt-BR'],
|
|
reference: `Special names to keep untranslated: flux, photomaker, clip, vae, cfg, stable audio, stable cascade, stable zero, controlnet, lora, HiDream, Civitai, Hugging Face.
|
|
'latent' is the short form of 'latent space'.
|
|
'mask' is in the context of image processing.
|
|
|
|
IMPORTANT Chinese Translation Guidelines:
|
|
- For 'zh' locale: Use ONLY Simplified Chinese characters (简体中文). Common examples: 节点 (not 節點), 画布 (not 畫布), 图像 (not 圖像), 选择 (not 選擇), 减小 (not 減小).
|
|
- For 'zh-TW' locale: Use ONLY Traditional Chinese characters (繁體中文) with Taiwan-specific terminology.
|
|
- NEVER mix Simplified and Traditional Chinese characters within the same locale.
|
|
`
|
|
});
|