Compositions may occasionally need to load assets bundled with your product. This may include movies, images, Cube LUTs or CoreML models. While it is possible to embed files directly in the composition, this incurs a serious performance penalty when your plugin is loaded by a video app. Any files embedded in the composition must be kept in memory regardless of whether the composition is actively using the asset.
For the best performance and user experience, plug-ins are encouraged to load files externally.
The DepthAnything plug-in available on Built with FxCore provides a great example of the correct technique.
Like most products, it has two components: an FxPack containing native plug-ins and FxTemplates for the Motion Templates required by Final Cut Pro. Open the FxPack and notice its CoreML model is sitting in the product’s Assets:

Take note of its name: DepthAnythingSmallF16.mlpackage
Open the plug-in’s composition, and notice a published input called Assets URL. It belongs to a Manipulate URL node that has been configured to take the location of a directory and append DepthAnythingSmallF16.mlpackage to form the final location of the model on disk. The output is a location suitable for the Model Importer node.

Two questions are relevant here:

Thanks to this mapping, there is no need to hardcode any paths. It doesn’t matter if the product may be installed in your home directory or in the location accessible by all users. The FxFactory runtime feeds your composition the correct location of the Assets directory when your plug-in is loaded and used inside a video app.
When editing your composition in FxCore, you obviously want the Assets URL input to point to the Assets directory of your product. Because there is no dynamic behavior to rely on, the first step is to right-click on your product’s icon in the FxFactory app and select the Copy Assets Location:

All products under development are installed under your home directory, so the above path takes the form of /Users/USER/Library/Application Support/FxFactory/COMPANY PRODUCT.fxpack/Assets/. Thankfully you don’t need to know or manipulate this information directly. Instead, having copied that location, edit your plug-in’s composition.
Add a Manipulate URL node:

Bring up the Settings panel and set up the node to append the name of the file or directory component:

Rename its URL input to Assets URL and publish it (by ⌥ clicking the input, or by right-clicking and selecting the appropriate command under the contextual menu):

Click on the Component input, and enter the name of the file (or directory) inside your product’s Assets:

Right click on the input and select Paste Directory Location:

The output of Manipulate URL now contains the correct location of your file. When running inside FxCore, this location is known statically thanks to the changes you just applied. When running inside video apps, the location will be appropriately set by the FxFactory runtime.
The above example assumes your file is sitting at the root of the Assets directory. If you prefer to place your file inside a sub-directory, chain multiple Manipulate URL nodes to form the final location:
