# Inference Command

Before running the commands, we must make sure the model weights are organized.

* If you followed the previous training steps, the model weights will be located in the specified `output_dir` of the YAML. **They will already be in the correct format, so you can directly run the commands at the bottom of the page.**
* If you are using other pre-trained weights, find the folder/directory in which they are stored and follow the steps below.

The folder (e.g. `home/data/MODEL_WEIGHTS`)  should include files like:

```
encoder_scaler.pkl, dbn.ckpt, encoder.ckpt, deep_cluster.ckpt, heir_fc.ckpt
```

It also should include two `.npy` files, which, if missing, can be created with:

```
touch home/data/MODEL_WEIGHTS/train_data.indices.npy  ## replace with your path
touch home/data/MODEL_WEIGHTS/train_data.npy
```

Now modify the directory structure to look like this:

<div data-full-width="false"><figure><img src="https://3105524997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHhTcHyCEXvtKeuBJSBvn%2Fuploads%2FxMGEuwmUltVspDgAIl0z%2FScreenshot%202025-06-30%20at%2010.58.19%E2%80%AFAM.png?alt=media&#x26;token=988ebacb-d03f-4021-ab6d-de7f3359bc2a" alt="" width="308"><figcaption></figcaption></figure></div>

The script expects the files in specific folders, so it is important to not skip this step.

* Tip: Use the `mkdir` and `mv`  commands to create this structure.

Now we can run our commands:

```
cd <path_to_SIT_FUSE>/SIT_FUSE/src/sit_fuse/inference
```

```
python3 generate_output.py -y <path_to_yaml>
# Same YAML as in the previous steps. See Code configuration
```

Outputs zarr files
