diff --git a/package-lock.json b/package-lock.json index 4cae76174..5fd561b03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "GPL-3.0-only", "dependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.3.1", - "@comfyorg/comfyui-electron-types": "^0.3.32", + "@comfyorg/comfyui-electron-types": "^0.3.34", "@comfyorg/litegraph": "^0.8.46", "@primevue/themes": "^4.0.5", "@vueuse/core": "^11.0.0", @@ -1951,9 +1951,9 @@ "dev": true }, "node_modules/@comfyorg/comfyui-electron-types": { - "version": "0.3.32", - "resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.3.32.tgz", - "integrity": "sha512-nftu7zFj1Xz6kOrZ+dcmYv+zF0KG23u2HmTOgTZh/Z5nJrC46raxHtHTlazER10cltUl2BozrE98+dWz3gDo3Q==", + "version": "0.3.34", + "resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.3.34.tgz", + "integrity": "sha512-l4+llMrUh/nUxuBC1A1Zicu6EAZ74pDJPm14zQpyLleNeyj71FKIkgX/hIpbCegv5CwRgYXEdEN8FqTTKugf/A==", "license": "GPL-3.0-only" }, "node_modules/@comfyorg/litegraph": { diff --git a/package.json b/package.json index 43439699f..635e33939 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ }, "dependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.3.1", - "@comfyorg/comfyui-electron-types": "^0.3.32", + "@comfyorg/comfyui-electron-types": "^0.3.34", "@comfyorg/litegraph": "^0.8.46", "@primevue/themes": "^4.0.5", "@vueuse/core": "^11.0.0", diff --git a/public/assets/images/apple-mps-logo.png b/public/assets/images/apple-mps-logo.png new file mode 100644 index 000000000..261edbfd6 Binary files /dev/null and b/public/assets/images/apple-mps-logo.png differ diff --git a/public/assets/images/manual-configuration.svg b/public/assets/images/manual-configuration.svg new file mode 100644 index 000000000..bc90c6470 --- /dev/null +++ b/public/assets/images/manual-configuration.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/assets/images/nvidia-logo.svg b/public/assets/images/nvidia-logo.svg new file mode 100644 index 000000000..71f15b53b --- /dev/null +++ b/public/assets/images/nvidia-logo.svg @@ -0,0 +1,6 @@ + Artificial Intelligence Computing Leadership from NVIDIA + + + + + \ No newline at end of file diff --git a/src/components/install/GpuPicker.vue b/src/components/install/GpuPicker.vue new file mode 100644 index 000000000..57193b3d7 --- /dev/null +++ b/src/components/install/GpuPicker.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 664a6709e..eedefd36c 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -78,7 +78,8 @@ "file": "File", "inbox": "Inbox", "box": "Box", - "briefcase": "Briefcase" + "briefcase": "Briefcase", + "exclamation-triangle": "Warning" }, "welcome": { "title": "Welcome to ComfyUI", @@ -129,6 +130,22 @@ "migrationOptional": "Migration is optional. If you don't have an existing installation, you can skip this step.", "desktopAppSettings": "Desktop App Settings", "desktopAppSettingsDescription": "Configure how ComfyUI behaves on your desktop. You can change these settings later.", + "gpu": "GPU", + "gpuSelection": { + "selectGpu": "Select GPU", + "selectGpuDescription": "Select the type of GPU you have", + "cpuMode": "CPU Mode", + "cpuModeDescription": "CPU mode is intended for developers and rare edge cases only.", + "cpuModeDescription2": "If you are not absolutely certain you need this, please ignore this box and select your GPU above.", + "enableCpuMode": "Enable CPU Mode", + "nvidiaDescription": "NVIDIA devices are directly supported using pytorch CUDA builds.", + "mpsDescription": "Apple Metal Performance Shaders are supported using pytorch nightly.", + "customSkipsPython": "This option skips the normal python setup.", + "customComfyNeedsPython": "ComfyUI will not work until python is setup", + "customManualVenv": "Manually configure python venv", + "customInstallRequirements": "Install all requirements and dependencies (e.g. custom torch)", + "customMayNotWork": "This is entirely unsupported, and may simply not work" + }, "settings": { "autoUpdate": "Automatic Updates", "allowMetrics": "Crash Reports", diff --git a/src/locales/ja/main.json b/src/locales/ja/main.json index 9fb68fff2..19f0be1c4 100644 --- a/src/locales/ja/main.json +++ b/src/locales/ja/main.json @@ -141,6 +141,7 @@ "bookmark": "ブックマーク", "box": "ボックス", "briefcase": "ブリーフケース", + "exclamation-triangle": "警告", "file": "ファイル", "folder": "フォルダー", "heart": "ハート", @@ -157,6 +158,22 @@ "desktopAppSettingsDescription": "ComfyUIのデスクトップでの動作を設定します。これらの設定は後で変更可能です。", "desktopSettings": "デスクトップ設定", "failedToSelectDirectory": "ディレクトリの選択に失敗しました", + "gpu": "GPU", + "gpuSelection": { + "cpuMode": "CPUモード", + "cpuModeDescription": "CPUモードは開発者やまれなエッジケースのみを対象としています。", + "cpuModeDescription2": "これが絶対に必要であることが確定していない場合は、このボックスを無視して上でGPUを選択してください。", + "customComfyNeedsPython": "ComfyUIはpythonがセットアップされるまで動作しません", + "customInstallRequirements": "すべての要件と依存関係をインストールする(例:カスタムtorch)", + "customManualVenv": "python venvを手動で設定する", + "customMayNotWork": "これは完全にサポートされておらず、単純に動作しない場合があります。", + "customSkipsPython": "このオプションは通常のpythonセットアップをスキップします。", + "enableCpuMode": "CPUモードを有効にする", + "mpsDescription": "Apple Metal Performance Shadersは、pytorch nightlyを使用してサポートされています。", + "nvidiaDescription": "NVIDIAデバイスは、pytorch CUDAビルドを使用して直接サポートされています。", + "selectGpu": "GPUを選択", + "selectGpuDescription": "所有しているGPUのタイプを選択してください" + }, "installLocation": "インストール先", "installLocationDescription": "ComfyUIのユーザーデータを保存するディレクトリを選択してください。Python環境が選択した場所にインストールされます。選択したディスクに約15GBの空き容量が必要です。", "installLocationTooltip": "ComfyUIのユーザーデータディレクトリ。保存内容:\n- Python環境\n- モデル\n- カスタムノード\n", diff --git a/src/locales/ko/main.json b/src/locales/ko/main.json index 072d99ef5..2b8911971 100644 --- a/src/locales/ko/main.json +++ b/src/locales/ko/main.json @@ -141,6 +141,7 @@ "bookmark": "북마크", "box": "상자", "briefcase": "서류가방", + "exclamation-triangle": "경고", "file": "파일", "folder": "폴더", "heart": "하트", @@ -157,6 +158,22 @@ "desktopAppSettingsDescription": "ComfyUI가 데스크탑에서 어떻게 작동하는지 구성하세요. 이 설정은 나중에 변경할 수 있습니다.", "desktopSettings": "데스크탑 설정", "failedToSelectDirectory": "디렉토리 선택 실패", + "gpu": "GPU", + "gpuSelection": { + "cpuMode": "CPU 모드", + "cpuModeDescription": "CPU 모드는 개발자와 드문 경우에만 사용됩니다.", + "cpuModeDescription2": "이것이 필요한지 확실하지 않다면, 이 상자를 무시하고 위에서 GPU를 선택하세요.", + "customComfyNeedsPython": "파이썬이 설정되지 않으면 ComfyUI가 작동하지 않습니다", + "customInstallRequirements": "모든 요구 사항과 종속성 설치 (예: 사용자 정의 torch)", + "customManualVenv": "파이썬 venv를 수동으로 구성", + "customMayNotWork": "이것은 전혀 지원되지 않으며, 작동하지 않을 수 있습니다", + "customSkipsPython": "이 옵션은 일반 파이썬 설정을 건너뜁니다.", + "enableCpuMode": "CPU 모드 활성화", + "mpsDescription": "Apple Metal Performance Shaders는 pytorch nightly를 사용하여 지원됩니다.", + "nvidiaDescription": "NVIDIA 장치는 pytorch CUDA 빌드를 사용하여 직접 지원됩니다.", + "selectGpu": "GPU 선택", + "selectGpuDescription": "소유한 GPU 유형을 선택하세요" + }, "installLocation": "설치 위치", "installLocationDescription": "ComfyUI의 사용자 데이터 디렉토리를 선택하십시오. 선택한 위치에 Python 환경이 설치됩니다. 선택한 디스크에 충분한 공간(~15GB)이 남아 있는지 확인하십시오.", "installLocationTooltip": "ComfyUI의 사용자 데이터 디렉토리. 저장소:\n- Python 환경\n- 모델\n- 사용자 정의 노드\n", diff --git a/src/locales/ru/main.json b/src/locales/ru/main.json index 7b25a7b7b..3c58d854c 100644 --- a/src/locales/ru/main.json +++ b/src/locales/ru/main.json @@ -141,6 +141,7 @@ "bookmark": "Закладка", "box": "Коробка", "briefcase": "Портфель", + "exclamation-triangle": "Предупреждение", "file": "Файл", "folder": "Папка", "heart": "Сердце", @@ -157,6 +158,22 @@ "desktopAppSettingsDescription": "Настройте, как ComfyUI ведет себя на вашем рабочем столе. Вы можете изменить эти настройки позже.", "desktopSettings": "Настройки рабочего стола", "failedToSelectDirectory": "Не удалось выбрать директорию", + "gpu": "GPU", + "gpuSelection": { + "cpuMode": "Режим CPU", + "cpuModeDescription": "Режим CPU предназначен только для разработчиков и редких крайних случаев.", + "cpuModeDescription2": "Если вы не абсолютно уверены, что вам это нужно, пожалуйста, проигнорируйте эту галочку и выберите ваш GPU выше.", + "customComfyNeedsPython": "ComfyUI не будет работать, пока python не будет настроен", + "customInstallRequirements": "Установите все требования и зависимости (например, custom torch)", + "customManualVenv": "Вручную настроить python venv", + "customMayNotWork": "Это полностью не поддерживается и может просто не работать", + "customSkipsPython": "Этот вариант пропускает обычную настройку python.", + "enableCpuMode": "Включить режим CPU", + "mpsDescription": "Поддерживаются Apple Metal Performance Shaders с использованием pytorch nightly.", + "nvidiaDescription": "Устройства NVIDIA напрямую поддерживаются с использованием сборок pytorch CUDA.", + "selectGpu": "Выберите GPU", + "selectGpuDescription": "Выберите тип GPU, который у вас есть" + }, "installLocation": "Место установки", "installLocationDescription": "Выберите директорию для пользовательских данных ComfyUI. В выбранном месте будет установлена среда Python. Пожалуйста, убедитесь, что на выбранном диске достаточно места (~15 ГБ).", "installLocationTooltip": "Директория пользовательских данных ComfyUI. Хранит:\n- Среда Python\n- Модели\n- Пользовательские узлы\n", diff --git a/src/locales/zh/main.json b/src/locales/zh/main.json index 4ff8b617a..ecd62834e 100644 --- a/src/locales/zh/main.json +++ b/src/locales/zh/main.json @@ -141,6 +141,7 @@ "bookmark": "书签", "box": "盒子", "briefcase": "公文包", + "exclamation-triangle": "警告", "file": "文件", "folder": "文件夹", "heart": "心", @@ -157,6 +158,22 @@ "desktopAppSettingsDescription": "配置 ComfyUI 在桌面上的行为。您可以稍后更改这些设置。", "desktopSettings": "桌面设置", "failedToSelectDirectory": "选择目录失败", + "gpu": "GPU", + "gpuSelection": { + "cpuMode": "CPU 模式", + "cpuModeDescription": "CPU 模式仅适用于开发者和极少数特殊情况。", + "cpuModeDescription2": "如果你不完全确定你需要这个,请忽略这个选项并在上面选择你的 GPU。", + "customComfyNeedsPython": "在 python 设置之前,ComfyUI 将无法工作", + "customInstallRequirements": "安装所有需求和依赖项(例如:自定义 torch)", + "customManualVenv": "手动配置 python venv", + "customMayNotWork": "这完全不受支持,可能根本无法工作", + "customSkipsPython": "此选项跳过正常的 python 设置。", + "enableCpuMode": "启用 CPU 模式", + "mpsDescription": "Apple Metal Performance Shaders 使用 pytorch nightly 支持。", + "nvidiaDescription": "NVIDIA 设备直接支持使用 pytorch CUDA 构建。", + "selectGpu": "选择 GPU", + "selectGpuDescription": "选择你拥有的 GPU 类型" + }, "installLocation": "安装位置", "installLocationDescription": "选择 ComfyUI 用户数据的目录。将安装一个 Python 环境到所选位置。请确保所选磁盘有足够的空间(约 15GB)。", "installLocationTooltip": "ComfyUI 的用户数据目录。存储:\n- Python 环境\n- 模型\n- 自定义节点\n", diff --git a/src/utils/envUtil.ts b/src/utils/envUtil.ts index d68f72fea..6a8fd6fa0 100644 --- a/src/utils/envUtil.ts +++ b/src/utils/envUtil.ts @@ -1,5 +1,8 @@ import { ElectronAPI } from '@comfyorg/comfyui-electron-types' +export type InstallOptions = Parameters[0] +export type TorchDeviceType = InstallOptions['device'] + export function isElectron() { return 'electronAPI' in window && window['electronAPI'] !== undefined } diff --git a/src/views/InstallView.vue b/src/views/InstallView.vue index c992667b3..94bb680a3 100644 --- a/src/views/InstallView.vue +++ b/src/views/InstallView.vue @@ -2,25 +2,46 @@
- - - + + + + {{ $t('install.gpu') }} + + {{ $t('install.installLocation') }} - + {{ $t('install.migration') }} - + {{ $t('install.desktopSettings') }} + + +
+
+
-
+
+