Skip to content

Commit c24b445

Browse files
authored
dosc: amend the docs for v1.0.2 (#684)
* update * update
1 parent eca19d2 commit c24b445

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

docs/source/developer/contribution_guide.rst

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ follow these steps for a smooth and efficient contribution process.
99
🚀 Setting Up Test Environment
1010
------------------------------
1111

12-
**1. Fork and Clone the Repository**
12+
1. Fork and Clone the Repository
1313

14-
New contributors should fork the repository to their GitHub account and clone locally:
14+
New contributors should fork the repository to their GitHub account and clone locally:
1515

16-
.. code-block:: shell
16+
.. code-block:: shell
1717
18-
git clone https://github.com/<your_username>/ComfyUI-nunchaku.git
18+
git clone https://github.com/<your_username>/ComfyUI-nunchaku.git
1919
20-
**2. Install Dependencies**
20+
2. Install Dependencies
2121

22-
Install the ``uv`` package manager and project dependencies:
22+
Install the ``uv`` package manager and project dependencies:
2323

24-
.. code-block:: shell
24+
.. code-block:: shell
2525
26-
cd ComfyUI-nunchaku
27-
pip install uv
28-
uv venv # Create a new virtual environment if you don't already have one
26+
cd ComfyUI-nunchaku
27+
pip install uv
28+
uv venv # Create a new virtual environment if you don't already have one
2929
30-
Choose an installation method based on your development needs:
30+
Choose an installation method based on your development needs:
3131

3232
**Option A: Fresh Installation with Published Wheels**
3333

@@ -105,7 +105,7 @@ When contributing new features or bug fixes, you must register a new test in the
105105

106106
To add a test case:
107107

108-
**1. Create a Workflow Folder**
108+
1. Create a Workflow Folder
109109

110110
Create a new folder in ``tests/workflows/`` with a descriptive name (e.g., ``nunchaku-flux.1-schnell``). This folder must contain four JSON files:
111111

@@ -118,15 +118,15 @@ To add a test case:
118118

119119
Both ``ref.json`` and ``workflow.json`` are for backup purposes, making it easier for future maintenance, development, testing, and debugging.
120120

121-
**2. Create the API Workflow**
121+
2. Create the API Workflow
122122

123123
In ComfyUI, after designing your workflow, export it using ``Export (API)`` and save it as ``api.json`` (see example below).
124124

125125
.. image:: https://huggingface.co/datasets/nunchaku-tech/cdn/resolve/main/ComfyUI-nunchaku/export_api.png
126126
:alt: ComfyUI Export API Example
127127
:align: center
128128

129-
**3. Configure Test Cases**
129+
3. Configure Test Cases
130130

131131
Create ``test_cases.json`` to define test parameters. You can override variables in ``api.json`` using the ``inputs`` field. Here's an example:
132132

@@ -168,15 +168,15 @@ To add a test case:
168168

169169
Run your test locally first (see :ref:`running-tests`). Use the local results as reference values. If you can only test one precision type (int4 or fp4), you can use the same reference values for both.
170170

171-
**4. Add Additional Test Data (if needed)**
171+
4. Add Additional Test Data (if needed)
172172

173173
If your test requires additional input images or models:
174174

175175
- Upload input images to a GitHub PR comment to get a public URL
176176
- Register the URLs in `test_data/inputs.yaml <https://github.com/nunchaku-tech/ComfyUI-nunchaku/blob/main/test_data/inputs.yaml>`__
177177
- If new models are required, update `scripts/download_models.py <https://github.com/nunchaku-tech/ComfyUI-nunchaku/blob/main/scripts/download_models.py>`__ and `test_data/models.yaml <https://github.com/nunchaku-tech/ComfyUI-nunchaku/blob/main/test_data/models.yaml>`__
178178

179-
**5. Register Additional Custom Nodes (if needed)**
179+
5. Register Additional Custom Nodes (if needed)
180180

181181
If your test requires additional ComfyUI custom nodes, register them in `test_data/custom_nodes.yaml <https://github.com/nunchaku-tech/ComfyUI-nunchaku/blob/main/test_data/custom_nodes.yaml>`__:
182182

@@ -186,7 +186,7 @@ To add a test case:
186186
url: https://github.com/username/ComfyUI-CustomNode
187187
branch: abcdefg # commit hash or branch name
188188
189-
The ``scripts/setup_custom_nodes.py`` script automatically processes this configuration to:
189+
The ``scripts/setup_custom_nodes.py`` script (which runs automatically during test workspace setup in Step 3) processes this configuration to:
190190

191191
- Clone custom node repositories into the test workspace
192192
- Install Python dependencies from each node's ``requirements.txt`` (if present)
@@ -195,5 +195,3 @@ To add a test case:
195195
**Dependency Management:**
196196

197197
By default, dependencies are installed from the custom node's ``requirements.txt``. To override this, create a file at ``test_data/dependencies/{node_name}.txt`` with your custom requirements. This is useful when the default requirements conflict with the test environment or need version pinning.
198-
199-
This script runs automatically during test workspace setup (Step 3).

0 commit comments

Comments
 (0)