Interface autoconnections request for gimp (track: 2.99-openvino)


  • name: gimp (track: 2.99-openvino)

  • description: @jnsgruk has requested a new 2.99-openvino track for the GIMP snap here, and in parallel I’d like to request autoconnections for new plugs introduced in that track.

  • snapcraft: gimp/snap/snapcraft.yaml at 2.99.16-openvino-ai-plugins · frenchwr/gimp · GitHub Note this is currently in a personal fork but we aim to merge into a dedicated branch in the snapcrafters/gimp repo once the new track is available. See discussion in this PR: feature: integrate OpenVINO AI plugins by frenchwr · Pull Request #304 · snapcrafters/gimp · GitHub

  • upstream: https://gitlab.gnome.org/GNOME/gimp

  • upstream-relation: snapcrafters is the current publisher and is maintaining the gimp snap in an unofficial capacity (according to the repo description) as GIMP is a popular desktop tool on Linux

  • interfaces:

    • <intel-npu>:
      • request-type: auto-connection
      • reasoning: Connects to the custom-device slot provided by the intel-npu-driver snap. This is required to access the NPU device char node in /dev/accel/ so that GIMP can run inference on the NPU device through the OpenVINO AI plugins.
    • <npu-libs>:
      • request-type: auto-connection
      • reasoning: Mounts the runtime libraries for the Intel NPU through a slot defined in the intel-npu-driver content producer snap. These libraries are required to compile models for the NPU and to run inference on the NPU through the OpenVINO AI plugins for GIMP.
    • <openvino-libs>:
      • request-type: auto-connection
      • reasoning: Mounts the runtime libraries for OpenVINO through a slot defined in the openvino-toolkit-2404 content producer snap. These libraries are required by the OpenVINO AI plugins for GIMP.
    • <openvino-ai-plugins-gimp-libs>:
      • request-type: auto-connection
      • reasoning: Mounts the OpenVINO AI plugins through a slot defined in the openvino-ai-plugins-libs content producer snap, allowing GIMP to run these plugins that perform stable diffusion, semantic segmentation, and super resolution.
  • Related request for new 2.99-openvino GIMP track: Track request for `gimp`

  • Related request for autoconnections for the openvino-ai-plugins-gimp snap: Interface autoconnections request for openvino-ai-plugins-gimp

Note we are hoping to deliver this to Intel before the end of the quarter so anything you can do to expedite the review would be greatly appreciated!

Also note I am not a maintainer for the gimp snap so will ask the maintainers to chime in here for approval. You can follow the discussion here: feature: integrate OpenVINO AI plugins by frenchwr · Pull Request #304 · snapcrafters/gimp · GitHub

+1 from me as one of the owners of the snap, if that’s helpful :slight_smile:

Related question: is it possible to limit these autoconnections to just the 2.99-openvino track? If not, is there any risk to introducing autoconnections for interfaces that do not exist in the other tracks?

@wfrench no, a snap declaration applies to every revision of the snap simultaneously - snapd/review-tools will happily ignore any auto-connection information which doesn’t apply to a given snap revision (eg. because it is missing the associated plug definition etc).

For the content plugs - I think it might be worth specifying a default-provider (The content interface | Snapcraft documentation) to ensure the associated snap which provides this slot gets installed as well, otherwise these interfaces won’t auto-connect at all.

As for these particular interfaces auto-connections, +1 from me for the various content interfaces since the associated snaps appear to be maintained by Canonical or yourself so I assume you/we know what we are doing here and won’t remove anything from these content interfaces and inadvertently break gimp.

As for the custom-device interface provided by the intel-npu-driver snap, +1 from me as well since again this snap is maintained by Canonical.

Thanks, @alexmurray !

no, a snap declaration applies to every revision of the snap simultaneously - snapd/review-tools will happily ignore any auto-connection information which doesn’t apply to a given snap revision (eg. because it is missing the associated plug definition etc).

Okay great, that is exactly what I was hoping to hear. :slight_smile:

For the content plugs - I think it might be worth specifying a default-provider to ensure the associated snap which provides this slot gets installed as well, otherwise these interfaces won’t auto-connect at all.

Ah great catch - I will add that now.

I remember now why I didn’t use default-provider - It only works if the producer snaps are in a stable channel, and for now these are all in beta only. We’ll promote them all to stable after we test drive this for a month or two.

Hi @alexmurray and others:

I’ve switched to using the personal-files interface within the 2.99-openvino branch of the GIMP snap so models can be accessed from ~/.local/share/openvino-ai-plugins-gimp in this PR: feature: switch to personal-files interface as a less intrusive location for models by frenchwr · Pull Request #310 · snapcrafters/gimp · GitHub

So I would also like to request an additional autoconnection for:

  • dot-local-share-openvino-ai-plugins-gimp:
    • request-type: autoconnection
    • reasoning: GIMP needs access to ~/.local/share/openvino-ai-plugins-gimp for reading stable diffusion models, and for writing different model formats (optimized for detected device accelerators) to this same directory. Previously these models were being read/read from ~/openvino-ai-plugins-gimp but using a hidden directory is less intrusive.

See more background and discussion in this related forum post: Interface autoconnections request for openvino-ai-plugins-gimp

I also suspect that once the PR is merged the new published revision will need manual review in the store due to this new interface.

+1 from me for auto-connect of the personal-files instance named dot-local-share-openvino-ai-plugins-gimp with write permission to ~/.local/share/openvino-ai-plugins-gimp.

Note I can’t find any snap named openvino-ai-plugins-libs in the store so I can’t go ahead and grant a declaration to allow auto-connection to any such content interface for it.

However, given most folks are already or are going on leave in the next day and the associated connections for the openvino-ai-plugins-gimp were granted, I am going ahead and pre-emptively granting the other parts.

This is now live for intel-npu custom-device and npu-libs and openvino-libs content plugs.

1 Like

Sorry, that was a typo in my original message. The name of the content producer snap is openvino-ai-plugins-gimp.

Ah thanks - sorry for not making the connection myself. This has now also been granted.

1 Like

Thank you so much, @alexmurray !