diff --git a/docs.json b/docs.json index 42a6536345..77ba77863e 100644 --- a/docs.json +++ b/docs.json @@ -55,6 +55,7 @@ "installation/desktop/usage/downloads", "installation/desktop/usage/manage", "installation/desktop/usage/settings", + "installation/desktop/usage/performance-tests", "installation/desktop/usage/migrate" ] }, @@ -3893,6 +3894,7 @@ "zh/installation/desktop/usage/downloads", "zh/installation/desktop/usage/manage", "zh/installation/desktop/usage/settings", + "zh/installation/desktop/usage/performance-tests", "zh/installation/desktop/usage/migrate" ] }, @@ -7752,6 +7754,7 @@ "ja/installation/desktop/usage/downloads", "ja/installation/desktop/usage/manage", "ja/installation/desktop/usage/settings", + "ja/installation/desktop/usage/performance-tests", "ja/installation/desktop/usage/migrate" ] }, @@ -11624,6 +11627,7 @@ "ko/installation/desktop/usage/downloads", "ko/installation/desktop/usage/manage", "ko/installation/desktop/usage/settings", + "ko/installation/desktop/usage/performance-tests", "ko/installation/desktop/usage/migrate" ] }, diff --git a/images/desktop/usage/benchmarks_01_runs_library.png b/images/desktop/usage/benchmarks_01_runs_library.png new file mode 100644 index 0000000000..056db53e0e Binary files /dev/null and b/images/desktop/usage/benchmarks_01_runs_library.png differ diff --git a/images/desktop/usage/benchmarks_02_relative_speed.png b/images/desktop/usage/benchmarks_02_relative_speed.png new file mode 100644 index 0000000000..644a13d1bd Binary files /dev/null and b/images/desktop/usage/benchmarks_02_relative_speed.png differ diff --git a/images/desktop/usage/performance_tests_01_panel.png b/images/desktop/usage/performance_tests_01_panel.png new file mode 100644 index 0000000000..3b8468ab7f Binary files /dev/null and b/images/desktop/usage/performance_tests_01_panel.png differ diff --git a/images/desktop/usage/performance_tests_02_example_workflows.png b/images/desktop/usage/performance_tests_02_example_workflows.png new file mode 100644 index 0000000000..e484c038e0 Binary files /dev/null and b/images/desktop/usage/performance_tests_02_example_workflows.png differ diff --git a/installation/desktop/usage/overview.mdx b/installation/desktop/usage/overview.mdx index 990e878f50..7fc6a637db 100644 --- a/installation/desktop/usage/overview.mdx +++ b/installation/desktop/usage/overview.mdx @@ -28,12 +28,29 @@ Comfy Desktop window is divided into several key areas. The image below labels t ### App Menu -The hamburger menu (☰) in the top-left corner opens the application menu (File / Edit / View / Window / Help). Use it to open a new window, access **Desktop Settings**, **Log in** to your Comfy account, quit the app, or find other desktop-level controls. +The hamburger menu (☰) in the top-left corner opens the application menu, which holds every app-level action: - +- **Open Dashboard**: opens the Dashboard in a new window. Instances that are running keep running. +- **New Instance** and **Add Existing Instance**: create a new instance, or track a ComfyUI installation you already have. +- **Load Snapshot**: create an instance from a snapshot file someone shared with you. +- **Log in**: sign in to your Comfy account. This entry only appears while you are signed out. +- **Performance Tests**: run timed workflows against an instance. See [Performance Tests and Benchmarks](/installation/desktop/usage/performance-tests). +- **Benchmarks**: compare saved performance test results across hardware, workflows, and instances. +- **Desktop Settings**: global settings for auto-updates, proxy/mirror, shared storage, and data locations. +- **Send Feedback**: open the feedback panel. +- **Close Window** and **Quit Desktop**: close the current window, or quit the app. Closing an instance window stops the ComfyUI instance it runs, and closing the last window quits Comfy Desktop. + +Two entries appear only in context: **Reset Zoom (N%)** once the ComfyUI view is zoomed, and **Skip Onboarding** during the first-run setup. While the first-run setup is on screen, **Skip Onboarding** is the only entry in the menu. + +On macOS the app also keeps a system menu bar with the standard app, Edit, and Window menus. Windows and Linux builds have no system menu bar. + + Global settings: auto-updates, proxy/mirror, shared storage, and data locations. + + Measure workflow speed on an instance, then compare runs across hardware. + ### Instance Switcher diff --git a/installation/desktop/usage/performance-tests.mdx b/installation/desktop/usage/performance-tests.mdx new file mode 100644 index 0000000000..4f39cf692e --- /dev/null +++ b/installation/desktop/usage/performance-tests.mdx @@ -0,0 +1,146 @@ +--- +title: "Performance Tests and Benchmarks" +description: "Measure ComfyUI workflow speed with Performance Tests, then compare runs across GPUs, workflows, and instances with Benchmarks in Comfy Desktop" +icon: "gauge" +sidebarTitle: "Performance Tests" +--- + +**Performance Tests** measures how long a ComfyUI workflow takes to run on one of your instances. You pick an instance, load a workflow, and Comfy Desktop runs it a set number of times, timing every measured run and reporting the fastest, slowest, average, and median duration together with the hardware and software the numbers came from. + +**Benchmarks** compares those recorded results. It lists every saved run, filters them by workspace, instance, hardware, or workflow, and lines up selected runs side by side with a relative speed factor, so you can see how much faster one GPU, workflow, or instance is than another. + +Both panels open from the app menu: click the ☰ menu in the top-left corner and select **Performance Tests** or **Benchmarks**. + + +Performance Tests runs a real workflow on a real instance, so a test takes roughly as long as the workflow itself multiplied by the number of runs. Workflows you import have to be exported in [API format](/development/api-development/workflow-api-format) first. The example workflows that ship with Comfy Desktop are already in that format. + + +## Running a Performance Test + +The panel is laid out as three numbered steps side by side. They stack vertically on narrow windows. + +![The Performance Tests panel with an instance selected and the three numbered steps](/images/desktop/usage/performance_tests_01_panel.png) + +### 1. Select an instance + +Choose the **Workspace** and the **Instance** to test. The instance and its hardware are recorded with the results, which is what makes later comparisons meaningful: runs from different GPUs stay distinguishable. + +When you start a test, Comfy Desktop stops that instance's previous performance test session if one is still running, then launches the instance in a console session. Comfy Desktop refuses to start a test while any other local ComfyUI is running, still starting, or stopping, and names the instances in the way. Stop them, or wait for them to finish starting or stopping, then run the test again. Comfy Cloud and remote instances run elsewhere and never block a test. Other work that keeps the GPU busy, such as a game or a video export, still affects the numbers, so stop it before you run a test. + +### 2. Choose a workflow + +You can pick an example workflow that ships with Comfy Desktop, or bring your own. + +**Example workflows** are ready to run, and their models are downloaded for you. Click **Choose an example workflow** to open the picker. It groups the examples into modality tabs (Video, Image, 3D, and Audio; only modalities that have examples get a tab), and each card shows the example's name, task, and how much its models download. Click **Use workflow** to select one. Comfy Desktop then downloads any models the workflow is still missing, and the drop zone shows the download progress until it finishes. To pick an example, the instance has to be fully installed and you have to be online; if the models would not fit in the free disk space, the picker blocks the selection. Example workflows are tied to an instance: switching to another instance drops the example prepared for the first one, unless that example's session already recorded results. + +**Your own workflow** has to be exported in [API format](/development/api-development/workflow-api-format). Drop the `.json` file onto the drop zone, or click the zone to browse for one. + +![The example workflow picker with modality tabs and workflow cards showing the model download size](/images/desktop/usage/performance_tests_02_example_workflows.png) + +Either way, Comfy Desktop copies the workflow into the test session folder, so the test still runs after you move or edit the original file. + +### 3. Set measurement settings + +| Setting | Range | Default | What it does | +|---------|-------|---------|--------------| +| **Warm-up runs** | 1 to 5 | 1 | Runs executed first to load models and warm up caches. They are not included in the results. | +| **Measured runs** | 1 to 100 | 5 | Runs timed after the warm-up runs. Their durations are used to calculate the results. | + +Every run advances the workflow's numeric seed inputs by one, so the measured runs do not repeat an identical cached result. + +Once the three steps are set, click **Run** to start the test. The **Stop** button next to it cancels a test that is in progress. + +### Read the results + +While the test runs, the panel shows how many runs have finished and the instance logs. When every run finishes, the instance is stopped and the results appear: + +- **Fastest run**, **Slowest run**, **Average run**, and **Median run**, in seconds +- **Measured runs** and **Failed runs**: how many runs produced a duration and how many did not +- **Run duration aggregates**: a bar chart comparing the four aggregates (fastest, slowest, average, and median) +- **System information**: compute device, VRAM, RAM, PyTorch version, xFormers version, CPU, CPU cores, operating system, and architecture + +A run's duration is the time ComfyUI spent executing the job on the server, not the time you waited for it. Failed runs are counted separately and left out of the statistics. + +Two buttons sit with the results: **Open folder** opens the session folder, and **Export results** saves the summary and charts as a PNG image. + +## Comparing Runs with Benchmarks + +Benchmarks reads the results that Performance Tests saved, so it has nothing to show until at least one test has finished. + +### Runs library + +The **Runs library** lists every saved run in the results folder, newest first. Its toolbar gives you: + +- **Select folder**: point the panel at a different results folder, for example a folder on a shared drive. The default is the folder Performance Tests writes to, see [Where results are stored](#where-results-are-stored). +- **Refresh sessions**: reload the folder after a test finished elsewhere. +- **Search runs**: filter the list by text. +- Dropdown filters for workspace, instance, hardware, and workflow. +- **Properties**: choose which columns the library shows (session, date and time, workflow, instance, workspace, run count, GPU and hardware). + +![The Benchmarks runs library with its filters and the table of saved runs](/images/desktop/usage/benchmarks_01_runs_library.png) + +### Compare runs + +Select two or more runs with the checkboxes, or use **Select all visible runs**. The three newest runs are selected for you when the library loads. A selection opens the **Comparison** section below the library. + +Comparison puts one column per selected run next to a set of metric rows: fastest, average, median, and slowest duration, plus the measured run count. One run is the **baseline**. By default it is the first column shown. In the **Speed** view, click a column heading to make that run the baseline instead. + +### Relative speed + +The comparison has two views, **Duration** and **Speed**, which you switch between in the comparison toolbar. Relative speed belongs to the **Speed** view, and the baseline is chosen there too. + +**Relative speed** is the baseline duration divided by a run's duration: + +- **1.00×** means the run is the same speed as the baseline +- A factor above 1.00× means the run is **faster** than the baseline +- A factor below 1.00× means the run is **slower** than the baseline + +The **Speed** view plots each run on a logarithmic axis with **Slower** to the left and **Faster** to the right, so a 2x and a 4x difference stay readable on the same chart. The **Duration** view draws each run's fastest and slowest result as a line with the average marked. Runs without a usable duration are labelled unavailable. + +![The Benchmarks relative speed view with one run as the baseline and another marked slower](/images/desktop/usage/benchmarks_02_relative_speed.png) + +### Sort and export + +- **Sort comparison** orders the columns by relative speed. **Manual sort** lets you drag columns into your own order, or press Alt+Left / Alt+Right on a focused column. +- **Export results** saves the whole comparison as a PNG image, the quickest way to attach a result to an issue or a chat message. + +### Manage sessions + +Each test is stored as a session. From the library you can rename a session (**Edit session**) or delete one (**Delete**). Deleting removes every file recorded for that session. + +## Where results are stored + +Performance Tests creates a session folder when you add a workflow to the panel, named with that moment's timestamp (`YYYYMMDDHHMMSS`): + +``` +📂 ComfyUI-Shared/ +└── 📂 benchmarks/ + ├── 📂 20260930141522/ + │ ├── my_workflow.json + │ ├── jobs.json + │ ├── results.json + │ └── logs.txt + └── 📂 20260930163005/ + └── ... +``` + +| Platform | Default results folder | +|----------|------------------------| +| Windows | `%LOCALAPPDATA%\Comfy-Desktop\ComfyUI-Shared\benchmarks` | +| macOS / Linux | `~/ComfyUI-Shared/benchmarks` | + +Each session folder contains: + +- the workflow file the panel used +- `jobs.json`: the raw job response from the instance +- `results.json`: the summary the Benchmarks panel reads +- `logs.txt`: the instance console output from the run + +Because Benchmarks reads `results.json` from every session folder it finds, copying session folders into the folder Benchmarks points at is enough to compare results from another machine. + +Running the same imported workflow again writes into the same session folder and overwrites the results already stored there. To keep a result for comparison, add the workflow to the panel again before the next test. + +## Requirements + +- A standalone, tracked, or remote instance that Comfy Desktop can launch. The test needs a working ComfyUI instance, so it cannot run against a Cloud instance. +- A workflow the instance can execute, including any models and custom nodes it needs. A workflow you import has to be in API format; the example workflows already are, and Comfy Desktop downloads their models. If the instance rejects the workflow, the test stops and the error appears in the logs. Runs the instance accepts but that fail during execution are counted as failed runs and left out of the duration statistics. diff --git a/ja/installation/desktop/usage/overview.mdx b/ja/installation/desktop/usage/overview.mdx index 35eceb7d4b..3270204aa3 100644 --- a/ja/installation/desktop/usage/overview.mdx +++ b/ja/installation/desktop/usage/overview.mdx @@ -3,11 +3,11 @@ title: "Comfy Desktop の使い方" description: "Comfy Desktop の使用概要 — 新規インストール、インスタンス管理など" icon: "book-open" sidebarTitle: "概要" -translationSourceHash: 651b33ae +translationSourceHash: c728c972 translationFrom: installation/desktop/usage/overview.mdx translationBlockHashes: "_intro": d96e3242 - "Dashboard Overview": 60e63628 + "Dashboard Overview": 4f3fdf2e "Feedback and Issues": 9304f358 --- @@ -34,12 +34,29 @@ Comfy Desktop ウィンドウはいくつかの主要エリアに分かれてい ### アプリケーションメニュー -左上のハンバーガーメニュー(☰)からアプリケーションメニュー(File / Edit / View / Window / Help)を開きます。新しいウィンドウの表示、**デスクトップ設定**へのアクセス、Comfy アカウントへの**ログイン**、アプリの終了など、その他のデスクトップレベルの操作も行えます。 +左上のハンバーガーメニュー(☰)からアプリケーションメニューを開きます。アプリレベルの操作はすべてここにあります: - +- **Open Dashboard**:Dashboard を新しいウィンドウで開きます。実行中のインスタンスはそのまま動作し続けます。 +- **New Instance** と **Add Existing Instance**:新しいインスタンスを作成するか、既存の ComfyUI インストールを登録します。 +- **Load Snapshot**:他のユーザーが共有したスナップショットファイルからインスタンスを作成します。 +- **Log in**:Comfy アカウントにサインインします。この項目は未サインインのときだけ表示されます。 +- **Performance Tests**:インスタンスに対して計測付きのワークフローを実行します。詳しくは[パフォーマンステストとベンチマーク](/ja/installation/desktop/usage/performance-tests)を参照してください。 +- **Benchmarks**:保存されたパフォーマンステストの結果を、ハードウェア、ワークフロー、インスタンスごとに比較します。 +- **Desktop Settings**:自動更新、プロキシ/ミラー、共有ストレージ、データの保存場所に関するグローバル設定です。 +- **Send Feedback**:フィードバックパネルを開きます。 +- **Close Window** と **Quit Desktop**:現在のウィンドウを閉じるか、アプリを終了します。インスタンスのウィンドウを閉じるとそのウィンドウが実行している ComfyUI インスタンスが停止し、最後のウィンドウを閉じると Comfy Desktop が終了します。 + +状況に応じてのみ表示される項目が 2 つあります:ComfyUI ビューがズームされているときの **Reset Zoom (N%)** と、初回セットアップ中の **Skip Onboarding** です。初回セットアップが表示されている間は、**Skip Onboarding** がメニュー内の唯一の項目です。 + +macOS では、アプリケーションメニューと編集、ウインドウの各メニューを含むシステムメニューバーも維持されます。Windows と Linux のビルドにはシステムメニューバーがありません。 + + グローバル設定:自動更新、プロキシ/ミラー、共有ストレージ、データの保存場所。 + + インスタンス上でワークフローの速度を測定し、ハードウェアごとに実行結果を比較します。 + ### インスタンス切り替え diff --git a/ja/installation/desktop/usage/performance-tests.mdx b/ja/installation/desktop/usage/performance-tests.mdx new file mode 100644 index 0000000000..b317ffc3c8 --- /dev/null +++ b/ja/installation/desktop/usage/performance-tests.mdx @@ -0,0 +1,153 @@ +--- +title: "パフォーマンステストとベンチマーク" +description: "Comfy Desktop のパフォーマンステストで ComfyUI ワークフローの速度を測定し、ベンチマークで GPU、ワークフロー、インスタンスごとに実行結果を比較できます" +icon: "gauge" +sidebarTitle: "パフォーマンステスト" +translationSourceHash: 8861be41 +translationFrom: installation/desktop/usage/performance-tests.mdx +translationBlockHashes: + "_intro": b5fbddc8 + "Running a Performance Test": 355b850c + "Comparing Runs with Benchmarks": b20b58a3 + "Where results are stored": afbb1b95 + "Requirements": f8a3cde3 +--- +**Performance Tests** は、ComfyUI ワークフローがお使いのインスタンスの 1 つで実行されるのにかかる時間を測定します。インスタンスを選択し、ワークフローを読み込むと、Comfy Desktop がそれを指定した実行回数だけ実行し、測定対象の各実行を計測して、最速、最遅、平均、中央値の所要時間を、その数値の基になったハードウェアとソフトウェアとともに報告します。 + +**Benchmarks** は、記録されたこれらの結果を比較します。保存されたすべての実行を一覧表示し、ワークスペース、インスタンス、ハードウェア、またはワークフローでフィルタリングし、選択済みの実行を相対速度係数とともに並べて表示するので、ある GPU、ワークフロー、インスタンスが別のものよりどれだけ速いかを確認できます。 + +どちらのパネルもアプリメニューから開きます。左上隅の ☰ メニューをクリックし、**Performance Tests** または **Benchmarks** を選択します。 + + +Performance Tests は実際のインスタンスで実際のワークフローを実行するため、テストにかかる時間は、ワークフロー自体の時間に実行回数を掛けた程度になります。インポートするワークフローは、事前に [API 形式](/ja/development/api-development/workflow-api-format) でエクスポートしておく必要があります。Comfy Desktop に同梱のサンプルワークフローは、すでにこの形式です。 + + +## パフォーマンステストの実行 + +パネルは3つの番号付きステップが横並びで構成されています。ウィンドウが狭いときは縦に積み重なります。 + +![インスタンスを選択した状態の Performance Tests パネル(3つの番号付きステップ)](/images/desktop/usage/performance_tests_01_panel.png) + +### 1. インスタンスを選択 + +テストする**ワークスペース**と**インスタンス**を選択します。インスタンスとそのハードウェアは結果とともに記録されるため、後で比較する際に意味を持ちます。異なるGPUでの実行を区別したまま保てます。 + +テストを開始すると、Comfy Desktop はそのインスタンスの前回のパフォーマンステストセッションがまだ実行中であれば停止し、そのインスタンスをコンソールセッションで起動します。他のローカル ComfyUI が実行中、起動中、または停止中である間はテストの開始を拒否し、妨げになっているインスタンスを通知に表示します。それらを停止するか、起動または停止が完了するのを待ってから、もう一度テストを実行してください。Comfy Cloud やリモートのインスタンスは別の場所で実行されるため、テストを妨げません。ゲームや動画の書き出しなど、GPU を占有する他の作業は測定値に影響するため、テストを実行する前に停止してください。 + +### 2. ワークフローを選択 + +Comfy Desktop に同梱のサンプルワークフローを選ぶか、自分のワークフローを持ち込むかを選べます。 + +**サンプルワークフロー**はすぐに実行でき、必要なモデルは自動でダウンロードされます。**Choose an example workflow** をクリックするとピッカーが開きます。ピッカーはサンプルをモダリティ別のタブ(Video、Image、3D、Audio。例があるモダリティにのみタブが表示されます)に分類し、各カードにはサンプルの名前、タスク、モデルのダウンロードサイズが表示されます。**Use workflow** をクリックして 1 つ選択します。その後 Comfy Desktop がワークフローに不足しているモデルをダウンロードし、ドロップゾーンに完了までの進行状況が表示されます。サンプルを使うには、インスタンスのインストールが完了していて、オンラインである必要があります。モデルが空きディスク容量に収まらない場合、ピッカーは選択をブロックします。サンプルワークフローはインスタンスに紐づきます。別のインスタンスに切り替えると、前のインスタンス用に準備したサンプルは破棄されます。ただし、そのサンプルのセッションにすでに結果が記録されている場合は残ります。 + +**自分のワークフロー**を使う場合は、あらかじめ [API フォーマット](/ja/development/api-development/workflow-api-format) でエクスポートしておく必要があります。`.json` ファイルをドロップゾーンにドロップするか、ゾーンをクリックしてファイルを選択します。 + +![モダリティタブとモデルサイズを示すカードを備えたサンプルワークフローの選択画面](/images/desktop/usage/performance_tests_02_example_workflows.png) + +どちらの方法でも、Comfy Desktop はワークフローをテストセッションフォルダーにコピーするため、オリジナルのファイルを移動したり編集した後でもテストは実行されます。 + +### 3. 測定設定を行う + +| 設定 | 範囲 | デフォルト | 内容 | +|---------|-------|---------|--------------| +| **ウォームアップ実行** | 1〜5 | 1 | 最初に実行され、モデルをロードしてキャッシュをウォームアップする実行。結果には含まれません。 | +| **測定実行** | 1〜100 | 5 | ウォームアップ実行の後に計測される実行。その所要時間が結果の計算に使用されます。 | + +各実行はワークフローの数値シード入力を1ずつ進めるため、測定実行で同一のキャッシュ結果が繰り返されることはありません。 + +3つのステップを設定したら、**Run** をクリックしてテストを開始します。隣の **Stop** ボタンで進行中のテストを中止できます。 + +### 結果を確認する + +テストの実行中、パネルには完了した実行数とインスタンスのログが表示されます。すべての実行が完了すると、インスタンスは停止し、結果が表示されます。 + +- **最速実行**、**最遅実行**、**平均実行**、**中央値実行**(秒単位) +- **測定実行**と**失敗実行**: 所要時間が得られた実行数と、得られなかった実行数 +- **実行所要時間の集計**: 4つの集計値(最速、最も遅い、平均、中央値)を比較する棒グラフ +- **システム情報**: コンピュートデバイス、VRAM、RAM、PyTorchバージョン、xFormersバージョン、CPU、CPUコア数、オペレーティングシステム、アーキテクチャ + +実行の所要時間とは、ComfyUI がサーバー上でジョブを実行するのに費やした時間であり、あなたが待った時間ではありません。失敗した実行は別途カウントされ、統計からは除外されます。 + +結果とともに2つのボタンが表示されます。**フォルダーを開く**はセッションフォルダーを開き、**結果をエクスポート**はサマリーとチャートをPNG画像として保存します。 + +## ベンチマークで実行結果を比較する + +ベンチマークはパフォーマンステストが保存した結果を読み込むため、少なくとも1つのテストが完了するまで表示する内容はありません。 + +### 実行ライブラリ + +**実行ライブラリ**には、結果フォルダーに保存されたすべての実行が新しい順に一覧表示されます。ツールバーには次のものがあります: + +- **フォルダーを選択**:パネルの参照先を別の結果フォルダー(たとえば共有ドライブ上のフォルダー)に変更します。既定では、パフォーマンステストが書き込むフォルダーです。詳しくは[結果の保存場所](#結果の保存場所)を参照してください。 +- **セッションを更新**:別の場所でテストが完了した後にフォルダーを再読み込みします。 +- **実行を検索**:テキストで一覧を絞り込みます。 +- ワークスペース、インスタンス、ハードウェア、ワークフローで絞り込むドロップダウンフィルター。 +- **プロパティ**:ライブラリに表示する列(セッション、日付と時間、ワークフロー、インスタンス、ワークスペース、実行回数、GPUとハードウェア)を選択します。 + +![フィルターと保存された実行の一覧表を備えた Benchmarks の実行ライブラリ](/images/desktop/usage/benchmarks_01_runs_library.png) + +### 実行を比較する + +チェックボックスで2つ以上の実行を選択するか、**表示中のすべての実行を選択**を使用します。ライブラリの読み込み時には、最新の3つの実行が自動的に選択されます。選択すると、ライブラリの下に**比較**セクションが開きます。 + +比較では、選択した実行ごとに1つの列が、メトリクスの行と並べて表示されます。行には最速、平均、中央値、最も遅い所要時間、および測定された実行回数があります。1つの実行が**ベースライン**になります。既定では、最初に表示される列がベースラインです。**速度**ビューで列見出しをクリックすると、代わりにその実行をベースラインにできます。 + +### 相対速度 + +比較には**所要時間**と**速度**の 2 つのビューがあり、比較ツールバーで切り替えます。相対速度は**速度**ビューに属し、ベースラインもこのビューで選択します。 + +**相対速度**は、ベースラインの所要時間をその実行の所要時間で割った値です: + +- **1.00×** は、その実行がベースラインと同じ速度であることを意味します +- 1.00× より大きい係数は、その実行がベースラインより**高速**であることを意味します +- 1.00× より小さい係数は、その実行がベースラインより**低速**であることを意味します + +**速度**ビューは各実行を対数軸上にプロットし、左に**低速**、右に**高速**が来るようにするため、2xと4xの差も同じチャート上で読み取れます。**所要時間**ビューでは、各実行の最速と最も遅い結果が線として描画され、平均がマークされます。有効な所要時間がない実行は利用不可と表示されます。 + +![1つの実行をベースライン、別の実行をより低速として示す Benchmarks の相対速度ビュー](/images/desktop/usage/benchmarks_02_relative_speed.png) + +### 並び替えとエクスポート + +- **比較を並び替え**は、列を相対速度順に並べます。**手動並び替え**では、列をドラッグして任意の順序にできます。または、フォーカスした列で Alt+Left / Alt+Right を押します。 +- **結果をエクスポート**は、比較全体をPNG画像として保存します。結果をIssueやチャットメッセージに添付する最短の方法です。 + +### セッションの管理 + +各テストはセッションとして保存されます。ライブラリから、セッションの名前を変更したり(**セッションを編集**)、削除したり(**削除**)できます。削除すると、そのセッションに記録されたすべてのファイルが削除されます。 + +## 結果の保存場所 + +Performance Tests は、ワークフローをパネルに追加したときにセッションフォルダーを作成し、その時点のタイムスタンプ(`YYYYMMDDHHMMSS`)を名前として付けます。 + +``` +📂 ComfyUI-Shared/ +└── 📂 benchmarks/ + ├── 📂 20260930141522/ + │ ├── my_workflow.json + │ ├── jobs.json + │ ├── results.json + │ └── logs.txt + └── 📂 20260930163005/ + └── ... +``` + +| プラットフォーム | デフォルトの結果フォルダー | +|----------|------------------------| +| Windows | `%LOCALAPPDATA%\Comfy-Desktop\ComfyUI-Shared\benchmarks` | +| macOS / Linux | `~/ComfyUI-Shared/benchmarks` | + +各セッションフォルダーには次のものが含まれます。 + +- パネルが使用したワークフローファイル +- `jobs.json`: インスタンスから返された生のジョブ応答 +- `results.json`: Benchmarks パネルが読み取るサマリー +- `logs.txt`: 実行時のインスタンスのコンソール出力 + +Benchmarks は見つけたすべてのセッションフォルダーから `results.json` を読み取るため、セッションフォルダーを Benchmarks が参照するフォルダーにコピーするだけで、別のマシンの結果と比較できます。 + +同じインポート済みワークフローをもう一度実行すると、結果は同じセッションフォルダーに書き込まれ、そこに保存されている結果が上書きされます。比較用に結果を残したい場合は、次のテストの前にワークフローをもう一度パネルに追加してください。 + +## 要件 + +- Comfy Desktop が起動できるスタンドアロン、追跡対象、またはリモートのインスタンス。テストには動作する ComfyUI インスタンスが必要なため、クラウドインスタンスに対して実行することはできません。 +- インスタンスが実行できるワークフロー。必要なモデルやカスタムノードも含みます。インポートするワークフローは API 形式である必要があります。サンプルワークフローはすでにその形式で、Comfy Desktop がモデルをダウンロードします。インスタンスがワークフローを拒否した場合、テストは停止し、エラーはログに表示されます。インスタンスが受け付けたものの実行中に失敗した実行は、失敗実行としてカウントされ、所要時間の統計から除外されます。 diff --git a/ko/installation/desktop/usage/overview.mdx b/ko/installation/desktop/usage/overview.mdx index 89f900e8ae..0798945bcf 100644 --- a/ko/installation/desktop/usage/overview.mdx +++ b/ko/installation/desktop/usage/overview.mdx @@ -3,11 +3,11 @@ title: "Comfy Desktop 사용하기" description: "Comfy Desktop 개요: 새로운 설치 생성, 인스턴스 관리 등" icon: "book-open" sidebarTitle: "개요" -translationSourceHash: 651b33ae +translationSourceHash: c728c972 translationFrom: installation/desktop/usage/overview.mdx translationBlockHashes: "_intro": d96e3242 - "Dashboard Overview": 60e63628 + "Dashboard Overview": 4f3fdf2e "Feedback and Issues": 9304f358 --- @@ -34,11 +34,28 @@ Comfy Desktop 창은 몇 가지 주요 영역으로 나뉩니다. 아래 이미 ### 앱 메뉴 -좌측 상단의 햄버거 메뉴(☰)를 클릭하면 애플리케이션 메뉴(파일 / 편집 / 보기 / 창 / 도움말)가 열립니다. 이 메뉴를 사용하여 새 창을 열거나, **데스크탑 설정**에 액세스하거나, Comfy 계정에 **로그인**하거나, 앱을 종료하거나, 기타 데스크톱 수준의 제어 기능을 찾을 수 있습니다. +좌측 상단의 햄버거 메뉴(☰)를 클릭하면 앱 메뉴가 열리며, 앱 수준의 모든 작업이 이곳에 있습니다: - +- **Open Dashboard**: Dashboard를 새 창에서 엽니다. 실행 중인 인스턴스는 계속 실행됩니다. +- **New Instance** 및 **Add Existing Instance**: 새 인스턴스를 만들거나 이미 있는 ComfyUI 설치를 등록합니다. +- **Load Snapshot**: 다른 사용자가 공유한 스냅샷 파일로 인스턴스를 만듭니다. +- **Log in**: Comfy 계정에 로그인합니다. 이 항목은 로그아웃 상태일 때만 표시됩니다. +- **Performance Tests**: 인스턴스에 대해 시간을 측정하는 워크플로를 실행합니다. 자세한 내용은 [성능 테스트 및 벤치마크](/ko/installation/desktop/usage/performance-tests)를 참고하세요. +- **Benchmarks**: 저장된 성능 테스트 결과를 하드웨어, 워크플로, 인스턴스별로 비교합니다. +- **Desktop Settings**: 자동 업데이트, 프록시/미러, 공유 저장소, 데이터 위치에 대한 전역 설정입니다. +- **Send Feedback**: 피드백 패널을 엽니다. +- **Close Window** 및 **Quit Desktop**: 현재 창을 닫거나 앱을 종료합니다. 인스턴스 창을 닫으면 해당 창이 실행하는 ComfyUI 인스턴스가 중지되고, 마지막 창을 닫으면 Comfy Desktop이 종료됩니다. + +상황에 따라 두 항목만 추가로 표시됩니다: ComfyUI 뷰가 확대 또는 축소된 경우 **Reset Zoom (N%)**, 최초 실행 설정 중에는 **Skip Onboarding**입니다. 최초 실행 설정이 화면에 있는 동안에는 **Skip Onboarding**이 메뉴의 유일한 항목입니다. + +macOS에서는 앱, 편집, 윈도우 메뉴를 포함한 시스템 메뉴 막대가 유지됩니다. Windows와 Linux 빌드에는 시스템 메뉴 막대가 없습니다. + + - 글로벌 설정: 자동 업데이트, 프록시/미러, 공유 저장소, 데이터 저장 위치. + 글로벌 설정: 자동 업데이트, 프록시/미러, 공유 저장소, 데이터 위치. + + + 인스턴스에서 워크플로 속도를 측정하고 하드웨어별로 실행 결과를 비교합니다. diff --git a/ko/installation/desktop/usage/performance-tests.mdx b/ko/installation/desktop/usage/performance-tests.mdx new file mode 100644 index 0000000000..47ab5d9f2d --- /dev/null +++ b/ko/installation/desktop/usage/performance-tests.mdx @@ -0,0 +1,153 @@ +--- +title: "성능 테스트 및 벤치마크" +description: "성능 테스트로 ComfyUI 워크플로 속도를 측정한 다음, Comfy Desktop의 벤치마크로 GPU, 워크플로, 인스턴스 전반에서 실행을 비교하세요" +icon: "gauge" +sidebarTitle: "성능 테스트" +translationSourceHash: 8861be41 +translationFrom: installation/desktop/usage/performance-tests.mdx +translationBlockHashes: + "_intro": b5fbddc8 + "Running a Performance Test": 355b850c + "Comparing Runs with Benchmarks": b20b58a3 + "Where results are stored": afbb1b95 + "Requirements": f8a3cde3 +--- +**Performance Tests**는 ComfyUI 워크플로가 사용자의 인스턴스 중 하나에서 실행되는 데 걸리는 시간을 측정합니다. 인스턴스를 선택하고 워크플로를 불러오면 Comfy Desktop이 이를 지정된 실행 횟수만큼 실행하면서 측정 대상인 각 실행의 시간을 재고, 가장 빠른 시간, 가장 느린 시간, 평균, 중앙값을 해당 수치가 나온 하드웨어 및 소프트웨어 정보와 함께 보고합니다. + +**Benchmarks**는 기록된 결과들을 비교합니다. 저장된 모든 실행을 나열하고 워크스페이스, 인스턴스, 하드웨어 또는 워크플로로 필터링하며, 선택한 실행들을 상대 속도 계수와 함께 나란히 정렬해 주므로 어떤 GPU, 워크플로 또는 인스턴스가 다른 것보다 얼마나 빠른지 확인할 수 있습니다. + +두 패널 모두 앱 메뉴에서 열 수 있습니다. 왼쪽 위 모서리의 ☰ 메뉴를 클릭한 다음 **Performance Tests** 또는 **Benchmarks**를 선택하세요. + + +Performance Tests는 실제 인스턴스에서 실제 워크플로를 실행하므로, 테스트에는 대략 워크플로 자체에 걸리는 시간에 실행 횟수를 곱한 만큼의 시간이 소요됩니다. 가져오는 워크플로는 먼저 [API 형식](/ko/development/api-development/workflow-api-format)으로 내보내야 합니다. Comfy Desktop에 포함된 예제 워크플로는 이미 이 형식입니다. + + +## 성능 테스트 실행하기 + +이 패널은 세 개의 번호가 붙은 단계가 나란히 배치되어 있습니다. 창이 좁으면 세로로 쌓입니다. + +![인스턴스를 선택한 Performance Tests 패널의 세 단계](/images/desktop/usage/performance_tests_01_panel.png) + +### 1. 인스턴스 선택 + +테스트할 **워크스페이스**와 **인스턴스**를 선택합니다. 인스턴스와 해당 하드웨어 정보는 결과와 함께 기록되며, 이는 나중에 비교를 의미 있게 만드는 요소입니다. 서로 다른 GPU에서 실행한 결과를 구분할 수 있는 상태로 유지되기 때문입니다. + +테스트를 시작하면 Comfy Desktop은 해당 인스턴스의 이전 성능 테스트 세션이 아직 실행 중인 경우 이를 중지한 다음, 해당 인스턴스를 콘솔 세션으로 시작합니다. 다른 로컬 ComfyUI가 실행 중이거나 시작 중이거나 중지 중이면 테스트 시작을 거부하고 방해하는 인스턴스를 안내 메시지에 표시합니다. 해당 인스턴스를 중지하거나 시작 또는 중지가 끝날 때까지 기다린 후 테스트를 다시 실행하세요. Comfy Cloud 및 원격 인스턴스는 다른 곳에서 실행되므로 테스트를 막지 않습니다. 게임이나 동영상 내보내기처럼 GPU를 사용하는 다른 작업은 여전히 측정값에 영향을 주므로 테스트를 실행하기 전에 중지하세요. + +### 2. 워크플로 선택 + +Comfy Desktop에 포함된 예제 워크플로를 고르거나 직접 워크플로를 가져올 수 있습니다. + +**예제 워크플로**는 바로 실행할 수 있으며 필요한 모델이 자동으로 다운로드됩니다. **Choose an example workflow**를 클릭하면 선택기가 열립니다. 선택기는 예제를 모달리티별 탭(Video, Image, 3D, Audio. 예제가 있는 모달리티에만 탭이 표시됩니다)으로 묶고, 각 카드에는 예제의 이름, 작업, 모델 다운로드 크기가 표시됩니다. **Use workflow**를 클릭해 하나를 선택하세요. 그러면 Comfy Desktop이 워크플로에 아직 없는 모델을 다운로드하고, 드롭 영역에 완료될 때까지 다운로드 진행률이 표시됩니다. 예제를 사용하려면 인스턴스 설치가 완료되어 있어야 하고 온라인 상태여야 합니다. 모델이 남은 디스크 공간에 들어가지 않으면 선택기가 선택을 막습니다. 예제 워크플로는 인스턴스에 종속됩니다. 다른 인스턴스로 전환하면 이전 인스턴스용으로 준비한 예제는 버려집니다. 단, 해당 예제의 세션에 이미 결과가 기록되어 있으면 유지됩니다. + +**직접 가져오는 워크플로**는 먼저 [API 형식](/ko/development/api-development/workflow-api-format)으로 내보내야 합니다. `.json` 파일을 드롭 영역에 놓거나, 영역을 클릭하여 파일을 찾아봅니다. + +![모달리티 탭과 모델 다운로드 크기를 보여 주는 카드가 있는 예제 워크플로 선택 화면](/images/desktop/usage/performance_tests_02_example_workflows.png) + +어느 방법이든 Comfy Desktop은 워크플로를 테스트 세션 폴더로 복사하므로, 원본 파일을 이동하거나 편집한 이후에도 테스트가 계속 실행됩니다. + +### 3. 측정 설정 지정 + +| 설정 | 범위 | 기본값 | 설명 | +|---------|-------|---------|--------------| +| **워밍업 실행** | 1 ~ 5 | 1 | 모델을 로드하고 캐시를 예열하기 위해 먼저 수행되는 실행입니다. 결과에는 포함되지 않습니다. | +| **측정 실행** | 1 ~ 100 | 5 | 워밍업 실행 이후에 시간을 측정하는 실행입니다. 이 실행들의 실행 시간을 사용해 결과를 계산합니다. | + +모든 실행은 워크플로의 숫자 시드 입력을 1씩 증가시키므로, 측정 실행이 동일한 캐시 결과를 반복하지 않습니다. + +세 단계를 모두 설정한 뒤 **Run**을 클릭하면 테스트가 시작됩니다. 옆의 **Stop** 버튼으로 진행 중인 테스트를 취소할 수 있습니다. + +### 결과 확인 + +테스트가 실행되는 동안 패널에는 완료된 실행 수와 인스턴스 로그가 표시됩니다. 모든 실행이 끝나면 인스턴스가 중지되고 결과가 나타납니다. + +- **가장 빠른 실행**, **가장 느린 실행**, **평균 실행**, **중앙값 실행** (초 단위) +- **측정 실행** 및 **실패한 실행**: 실행 시간이 산출된 실행 수와 그렇지 않은 실행 수 +- **실행 시간 집계**: 네 가지 집계값(가장 빠름, 가장 느림, 평균, 중앙값)을 비교하는 막대 차트 +- **시스템 정보**: 연산 장치, VRAM, RAM, PyTorch 버전, xFormers 버전, CPU, CPU 코어, 운영 체제, 아키텍처 + +실행 시간은 사용자가 기다린 시간이 아니라 ComfyUI가 서버에서 작업을 실행하는 데 소요한 시간입니다. 실패한 실행은 별도로 집계되며 통계에서 제외됩니다. + +결과와 함께 두 개의 버튼이 있습니다. **폴더 열기**는 세션 폴더를 열고, **결과 내보내기**는 요약과 차트를 PNG 이미지로 저장합니다. + +## Benchmarks로 실행 비교하기 + +Benchmarks는 Performance Tests가 저장한 결과를 읽으므로, 테스트가 최소 한 개 완료되기 전에는 표시할 내용이 없습니다. + +### 실행 라이브러리 + +**실행 라이브러리**는 결과 폴더에 저장된 모든 실행을 최신 순으로 나열합니다. 도구 모음에서 다음을 사용할 수 있습니다: + +- **폴더 선택**: 패널이 다른 결과 폴더를 가리키도록 지정합니다. 예를 들어 공유 드라이브의 폴더를 지정할 수 있습니다. 기본값은 Performance Tests가 기록하는 폴더입니다. 자세한 내용은 [결과가 저장되는 위치](#결과가-저장되는-위치)를 참고하세요. +- **세션 새로 고침**: 다른 곳에서 테스트가 완료된 후 폴더를 다시 로드합니다. +- **실행 검색**: 텍스트로 목록을 필터링합니다. +- 워크스페이스, 인스턴스, 하드웨어, 워크플로로 필터링하는 드롭다운 필터입니다. +- **속성**: 라이브러리에 표시할 열을 선택합니다(세션, 날짜 및 시간, 워크플로, 인스턴스, 워크스페이스, 실행 횟수, GPU 및 하드웨어). + +![필터와 저장된 실행 표가 있는 Benchmarks 실행 라이브러리](/images/desktop/usage/benchmarks_01_runs_library.png) + +### 실행 비교 + +체크박스로 두 개 이상의 실행을 선택하거나 **표시된 실행 모두 선택**을 사용하세요. 라이브러리가 로드되면 최신 실행 세 개가 자동으로 선택됩니다. 실행을 선택하면 라이브러리 아래에 **비교** 섹션이 열립니다. + +비교는 선택한 실행마다 하나의 열을 여러 지표 행 옆에 배치합니다. 지표 행은 가장 빠른 소요 시간, 평균, 중앙값, 가장 느린 소요 시간과 측정된 실행 횟수로 구성됩니다. 하나의 실행이 **기준**입니다. 기본적으로 표시된 첫 번째 열이 기준입니다. **속도** 보기에서 열 제목을 클릭하면 해당 실행이 대신 기준이 됩니다. + +### 상대 속도 + +비교에는 **소요 시간**과 **속도** 두 가지 보기가 있으며, 비교 도구 모음에서 전환합니다. 상대 속도는 **속도** 보기에 속하며, 기준도 이 보기에서 선택합니다. + +**상대 속도**는 기준 소요 시간을 해당 실행의 소요 시간으로 나눈 값입니다: + +- **1.00×**는 해당 실행이 기준과 같은 속도임을 의미합니다 +- 1.00×보다 큰 값은 해당 실행이 기준보다 **빠름**을 의미합니다 +- 1.00×보다 작은 값은 해당 실행이 기준보다 **느림**을 의미합니다 + +**속도** 보기는 각 실행을 로그 축에 표시하며 왼쪽이 **느림**, 오른쪽이 **빠름**이므로 2배와 4배 차이도 같은 차트에서 읽을 수 있습니다. **소요 시간** 보기는 각 실행의 가장 빠른 결과와 가장 느린 결과를 선으로 그리고 평균을 표시합니다. 사용할 수 있는 소요 시간이 없는 실행은 사용할 수 없음으로 표시됩니다. + +![하나의 실행을 기준으로, 다른 실행을 더 느림으로 표시한 Benchmarks 상대 속도 보기](/images/desktop/usage/benchmarks_02_relative_speed.png) + +### 정렬 및 내보내기 + +- **비교 정렬**은 상대 속도 순으로 열을 정렬합니다. **수동 정렬**을 사용하면 열을 직접 원하는 순서로 끌어 놓거나, 열에 포커스를 두고 Alt+Left / Alt+Right를 누를 수 있습니다. +- **결과 내보내기**는 전체 비교를 PNG 이미지로 저장하며, 이슈나 채팅 메시지에 결과를 첨부하는 가장 빠른 방법입니다. + +### 세션 관리 + +각 테스트는 세션으로 저장됩니다. 라이브러리에서 세션 이름을 바꾸거나(**세션 편집**) 삭제할 수 있습니다(**삭제**). 삭제하면 해당 세션에 기록된 모든 파일이 제거됩니다. + +## 결과가 저장되는 위치 + +Performance Tests는 워크플로를 패널에 추가할 때 세션 폴더를 만들고, 그 시점의 타임스탬프(`YYYYMMDDHHMMSS`)를 이름으로 사용합니다: + +``` +📂 ComfyUI-Shared/ +└── 📂 benchmarks/ + ├── 📂 20260930141522/ + │ ├── my_workflow.json + │ ├── jobs.json + │ ├── results.json + │ └── logs.txt + └── 📂 20260930163005/ + └── ... +``` + +| 플랫폼 | 기본 결과 폴더 | +|----------|------------------------| +| Windows | `%LOCALAPPDATA%\Comfy-Desktop\ComfyUI-Shared\benchmarks` | +| macOS / Linux | `~/ComfyUI-Shared/benchmarks` | + +각 세션 폴더에는 다음이 들어 있습니다: + +- 패널이 사용한 워크플로 파일 +- `jobs.json`: 인스턴스에서 받은 원시 작업 응답 +- `results.json`: Benchmarks 패널이 읽는 요약 +- `logs.txt`: 실행 중 인스턴스 콘솔 출력 + +Benchmarks는 찾은 모든 세션 폴더에서 `results.json`을 읽으므로, 다른 머신의 결과와 비교하려면 세션 폴더를 Benchmarks가 가리키는 폴더에 복사하기만 하면 됩니다. + +같은 가져온 워크플로를 다시 실행하면 결과가 같은 세션 폴더에 기록되어 이미 저장된 결과를 덮어씁니다. 비교를 위해 결과를 남기려면 다음 테스트 전에 워크플로를 다시 패널에 추가하세요. + +## 요구 사항 + +- Comfy Desktop에서 실행할 수 있는 독립 실행형, 추적된 또는 원격 인스턴스. 테스트에는 정상 작동하는 ComfyUI 인스턴스가 필요하므로 클라우드 인스턴스에서는 실행할 수 없습니다. +- 인스턴스가 실행할 수 있는 워크플로. 여기에는 필요한 모든 모델과 커스텀 노드가 포함됩니다. 가져오는 워크플로는 API 형식이어야 합니다. 예제 워크플로는 이미 그 형식이며 Comfy Desktop이 모델을 다운로드합니다. 인스턴스가 워크플로를 거부하면 테스트가 중지되고 오류가 로그에 표시됩니다. 인스턴스가 수락했지만 실행 중 실패한 실행은 실패한 실행으로 집계되며 소요 시간 통계에서 제외됩니다. diff --git a/zh/installation/desktop/usage/overview.mdx b/zh/installation/desktop/usage/overview.mdx index 17f88e8d06..9c001c9372 100644 --- a/zh/installation/desktop/usage/overview.mdx +++ b/zh/installation/desktop/usage/overview.mdx @@ -3,11 +3,11 @@ title: "Comfy Desktop 使用指南" description: "Comfy Desktop 使用总览 — 创建新安装、管理实例等" icon: "book-open" sidebarTitle: "概述" -translationSourceHash: 651b33ae +translationSourceHash: c728c972 translationFrom: installation/desktop/usage/overview.mdx translationBlockHashes: "_intro": d96e3242 - "Dashboard Overview": 60e63628 + "Dashboard Overview": 4f3fdf2e "Feedback and Issues": 9304f358 --- @@ -34,12 +34,29 @@ Comfy Desktop 窗口分为几个关键区域。下图标出了 Dashboard 的主 ### 应用菜单 -左上角的汉堡菜单(☰)打开应用菜单(File / Edit / View / Window / Help)。使用它可以新开窗口、访问**桌面设置**、**登录**你的 Comfy 账户、退出应用,或进行其他桌面级操作。 +左上角的汉堡菜单(☰)打开应用菜单,应用层面的操作都在这里: - +- **Open Dashboard**:在新窗口中打开 Dashboard。正在运行的实例会继续运行。 +- **New Instance** 与 **Add Existing Instance**:新建实例,或将已有的 ComfyUI 安装纳入管理。 +- **Load Snapshot**:用他人分享的快照文件创建实例。 +- **Log in**:登录 Comfy 账户。仅在未登录时显示该条目。 +- **Performance Tests**:对某个实例运行计时工作流。详见[性能测试与基准测试](/zh/installation/desktop/usage/performance-tests)。 +- **Benchmarks**:跨硬件、工作流和实例对比已保存的性能测试结果。 +- **Desktop Settings**:全局设置,包括自动更新、代理/镜像、共享存储和数据位置。 +- **Send Feedback**:打开反馈面板。 +- **Close Window** 与 **Quit Desktop**:关闭当前窗口,或退出应用。关闭实例窗口会停止该窗口运行的 ComfyUI 实例,关闭最后一个窗口会退出 Comfy Desktop。 + +有两个条目只在特定情况下出现:ComfyUI 视图被缩放后出现 **Reset Zoom (N%)**,首次运行设置期间出现 **Skip Onboarding**。首次运行设置显示时,**Skip Onboarding** 是该菜单里唯一的条目。 + +macOS 上应用还会保留系统菜单栏,包含应用、编辑和窗口菜单。Windows 和 Linux 版本没有系统菜单栏。 + + 全局设置:自动更新、代理/镜像、共享存储和数据位置。 + + 测量工作流在实例上的运行速度,并跨硬件对比运行结果。 + ### 实例切换器 diff --git a/zh/installation/desktop/usage/performance-tests.mdx b/zh/installation/desktop/usage/performance-tests.mdx new file mode 100644 index 0000000000..a97180bea3 --- /dev/null +++ b/zh/installation/desktop/usage/performance-tests.mdx @@ -0,0 +1,153 @@ +--- +title: "性能测试与基准测试" +description: "使用性能测试测量 ComfyUI 工作流速度,然后通过 Comfy Desktop 中的基准测试比较不同 GPU、工作流和实例上的运行结果" +icon: "gauge" +sidebarTitle: "性能测试" +translationSourceHash: 8861be41 +translationFrom: installation/desktop/usage/performance-tests.mdx +translationBlockHashes: + "_intro": b5fbddc8 + "Running a Performance Test": 355b850c + "Comparing Runs with Benchmarks": b20b58a3 + "Where results are stored": afbb1b95 + "Requirements": f8a3cde3 +--- +**性能测试** 用于测量 ComfyUI 工作流在您的某个实例上运行所需的时间。您可以选择一个实例、加载一个工作流,Comfy Desktop 会按指定的运行次数执行它,为每一次计时的运行记录耗时,并报告最快、最慢、平均和中位时长,同时说明这些数据来自哪套硬件和软件。 + +**基准测试** 用于比较这些已记录的结果。它会列出每一次已保存的运行,按工作区、实例、硬件或工作流进行筛选,并将已选择的运行以相对速度系数的形式并排对比,让您看清某块 GPU、某个工作流或某个实例比其他快多少。 + +这两个面板都从应用菜单打开:点击左上角的 ☰ 菜单,然后选择 **Performance Tests** 或 **Benchmarks**。 + + +性能测试会在真实实例上运行真实工作流,因此一次测试的耗时大致等于工作流本身的耗时乘以运行次数。你导入的工作流必须先以 [API 格式](/zh/development/api-development/workflow-api-format) 导出。Comfy Desktop 自带的示例工作流已经是该格式。 + + +## 运行性能测试 + +该面板由三个编号步骤并排组成,窗口较窄时改为纵向排列。 + +![已选择实例的 Performance Tests 面板,显示三个编号步骤](/images/desktop/usage/performance_tests_01_panel.png) + +### 1. 选择实例 + +选择要测试的**工作区**和**实例**。实例及其硬件信息会随结果一并记录,这正是后续比较有意义的原因:来自不同 GPU 的运行结果始终可以区分开。 + +开始测试时,如果该实例上一次的性能测试会话仍在运行,Comfy Desktop 会先停止该会话,然后以控制台会话启动该实例。当有其他本地 ComfyUI 正在运行、正在启动或正在停止时,Comfy Desktop 会拒绝开始测试,并在提示中列出这些实例。请先停止它们,或等待其启动或停止完成,然后重新运行测试。Comfy Cloud 实例和远程实例在别处运行,不会阻止测试。其他占用 GPU 的任务(例如游戏或视频导出)仍会影响测量结果,运行测试前请先停止它们。 + +### 2. 选择工作流 + +你可以选择 Comfy Desktop 自带的示例工作流,也可以使用自己的工作流。 + +**示例工作流**开箱即用,所需模型会自动下载。点击 **选择示例工作流** 打开选择器:它把示例按模态分成若干标签页(视频、图像、3D、音频;只有存在示例的模态才会显示标签页),每张卡片显示示例的名称、任务以及模型下载大小。点击 **使用工作流** 选定一个。随后 Comfy Desktop 会下载工作流仍缺少的模型,拖放区域会显示下载进度直到完成。使用示例工作流要求实例已完整安装且网络在线;如果模型体积超出剩余磁盘空间,选择器会阻止选择。示例工作流与实例绑定:切换到另一个实例时,会丢弃为前一个实例准备好的示例,除非该示例的会话已经记录了结果。 + +**使用自己的工作流**时,必须先以 [API 格式](/zh/development/api-development/workflow-api-format) 导出,然后将 `.json` 文件拖放到拖放区域,或点击该区域浏览并选择文件。 + +![示例工作流选择器,按模态显示标签页,卡片上标出模型下载大小](/images/desktop/usage/performance_tests_02_example_workflows.png) + +无论用哪种方式,Comfy Desktop 都会将工作流复制到测试会话文件夹中,因此即使你移动或修改原始文件,测试仍然可以正常运行。 + +### 3. 配置测量设置 + +| 设置 | 范围 | 默认值 | 作用 | +|---------|-------|---------|--------------| +| **预热运行** | 1 到 5 | 1 | 最先执行的运行,用于加载模型并预热缓存。它们不计入结果。 | +| **测量运行** | 1 到 100 | 5 | 在预热运行之后计时的运行。它们的时长用于计算结果。 | + +每次运行都会将工作流的数值种子输入加一,因此各次测量运行不会重复完全相同的缓存结果。 + +三步都设置好后,点击 **Run** 开始测试。旁边的 **Stop** 按钮可以取消正在进行的测试。 + +### 查看结果 + +测试运行期间,面板会显示已完成的运行数量以及实例日志。所有运行结束后,实例会被停止,随后显示结果: + +- **最快运行**、**最慢运行**、**平均运行**和**中位数运行**,单位为秒 +- **测量运行**和**失败运行**:有多少次运行产生了时长数据,有多少次没有 +- **运行时长汇总**:对比四项汇总值(最快、最慢、平均和中位数)的柱状图 +- **系统信息**:计算设备、显存、内存、PyTorch 版本、xFormers 版本、CPU、CPU 核心数、操作系统和架构 + +一次运行的时长是 ComfyUI 在服务器上执行该任务所花费的时间,而不是你等待的时间。失败的运行会单独计数,并且不计入统计。 + +结果旁边有两个按钮:**打开文件夹**会打开会话文件夹,**导出结果**会将摘要和图表保存为 PNG 图像。 + +## 使用 Benchmarks 对比运行结果 + +Benchmarks 会读取 Performance Tests 保存的结果,因此在至少一个测试完成之前,它没有任何内容可显示。 + +### 运行记录库 + +**运行记录库**按最新的排在最前的顺序,列出结果文件夹中保存的每一条运行记录。其工具栏提供以下功能: + +- **选择文件夹**:将面板指向另一个结果文件夹,例如共享驱动器上的文件夹。默认是 Performance Tests 写入的文件夹,参见[结果存储位置](#结果存储位置)。 +- **刷新会话**:在其他位置有测试完成之后重新加载该文件夹。 +- **搜索运行记录**:按文本过滤列表。 +- 用于按工作区、实例、硬件和工作流筛选的下拉菜单。 +- **属性**:选择库中显示的列(会话、日期和时间、工作流、实例、工作区、运行次数、GPU 和硬件)。 + +![Benchmarks 运行记录库,包含筛选器和已保存运行记录的表格](/images/desktop/usage/benchmarks_01_runs_library.png) + +### 对比运行记录 + +使用复选框选择两条或更多运行记录,或使用**全选可见运行记录**。库加载时会自动选中最新的三条运行记录。一旦有选中项,库下方就会打开**对比**区域。 + +对比会为每条选中的运行记录显示一列,旁边是一组指标行:最快、平均、中位数和最慢时长,以及实测的运行次数。其中一条运行记录是**基线**。默认情况下,它是显示的第一列。在**速度**视图中点击某一列的标题,即可改为将该运行记录作为基线。 + +### 相对速度 + +对比有两种视图:**时长**和**速度**,可在对比工具栏中切换。相对速度属于**速度**视图,基线也是在该视图中选择的。 + +**相对速度**是基线时长除以某条运行记录的时长: + +- **1.00×** 表示该运行记录的速度与基线相同 +- 系数大于 1.00× 表示该运行记录比基线**更快** +- 系数小于 1.00× 表示该运行记录比基线**更慢** + +**速度**视图在对数轴上绘制每条运行记录,**较慢**在左、**较快**在右,因此 2 倍与 4 倍的差异可以在同一张图表上保持可读。**时长**视图将每条运行记录的最快和最慢结果绘制为一条线,并标出平均值。没有可用时长的运行记录会标记为不可用。 + +![Benchmarks 相对速度视图,一条运行记录作为基线,另一条标记为更慢](/images/desktop/usage/benchmarks_02_relative_speed.png) + +### 排序与导出 + +- **排序对比**按相对速度对列进行排序。**手动排序**允许你拖动列来排列自己的顺序,或在聚焦的列上按 Alt+Left / Alt+Right。 +- **导出结果**会将整个对比保存为 PNG 图像,这是把结果附加到 issue 或聊天消息中最快捷的方式。 + +### 管理会话 + +每个测试都以会话的形式存储。你可以从库中重命名会话(**编辑会话**)或删除会话(**删除**)。删除会移除该会话记录的所有文件。 + +## 结果存储位置 + +Performance Tests 会在你把工作流添加到面板时创建一个会话文件夹,并以那一刻的时间戳(`YYYYMMDDHHMMSS`)命名: + +``` +📂 ComfyUI-Shared/ +└── 📂 benchmarks/ + ├── 📂 20260930141522/ + │ ├── my_workflow.json + │ ├── jobs.json + │ ├── results.json + │ └── logs.txt + └── 📂 20260930163005/ + └── ... +``` + +| 平台 | 默认结果文件夹 | +|----------|------------------------| +| Windows | `%LOCALAPPDATA%\Comfy-Desktop\ComfyUI-Shared\benchmarks` | +| macOS / Linux | `~/ComfyUI-Shared/benchmarks` | + +每个会话文件夹包含: + +- 面板使用的工作流文件 +- `jobs.json`:实例返回的原始任务响应 +- `results.json`:Benchmarks 面板读取的摘要 +- `logs.txt`:本次运行中实例的控制台输出 + +由于 Benchmarks 会读取它找到的每个会话文件夹中的 `results.json`,因此只要将会话文件夹复制到 Benchmarks 所指向的文件夹中,就足以比较来自另一台机器的结果。 + +再次运行同一个已导入的工作流时,结果会写入同一个会话文件夹,并覆盖其中已有的结果。若想保留某次结果用于对比,请在下次测试前重新把工作流添加到面板。 + +## 前提条件 + +- 一个 Comfy Desktop 可以启动的独立、已跟踪或远程实例。测试需要一个可正常运行的 ComfyUI 实例,因此无法针对云端实例运行。 +- 一个该实例可执行的工作流,包括其所需的任何模型和自定义节点。你导入的工作流必须采用 API 格式;示例工作流已经是该格式,Comfy Desktop 会下载它们的模型。如果实例拒绝该工作流,测试会停止,错误会显示在日志中。实例接受但在执行阶段失败的运行会计入失败运行,并且不计入时长统计。