Python Plug-in for GIMP3: exec_raw_forge_g3


I have bug-fixed this plug-in (ver. 0.1a). If you already downloaded this plug-in, please re-download it.

Hi,

I made a new GIMP3 plug-in which enables users to use RawForge and ART in conjunction. RawForge is the cli version of FOSS AI denoiser RawRefinery and is available in Linux, Mac OS and Windows, where RawRefinery is not usable on Windows yet.

@agriggio published the instructions of using RawForge and ART together in the site below.

https://artraweditor.github.io/AItools

However his method uses Posix shell script and Zenity, so it is difficult to apply it to Windows environment.

My plug-in replaces the shell script and Zenity to enable using them on Windows, however it is also usable on Linux and Mac OS. In other words, it may be said that using GIMP3 as an image processing platform, my plug-in enables the integration of RawForge and ART.

How to install it

  1. Install RawForge following the instructions below.

https://github.com/rymuelle/RawForge
For Windows users, the instructions are below.

  1. Install ART, if you don’t have installed it yet.
  2. Download my plug-in from here, and install it in your GIMP3 plug-in directory.
  1. Install Adobe DNG Converter, if you want to decode Nikon HE compressed Raw files. In Linux install it using wine.
  2. Setup config.ini file in the plug-in directory according to your environment.
    Default parameters are below.

[ART directory path on Windows]

COMMAND_NT;C:\\Program Files\\ART\\1.26.1

# Do not add ".exe" for COMMAND_NT

[ART directory path on Linux]

COMMAND_LINUX;/home/username/Programs/ART

# If your ART is Flatpak version...

#COMMAND_LINUX;flatpak run us.pixls.art.ART

[ART directory path on Mac OS]

COMMAND_DARWIN;/Applications/ART.app/Contents/MacOS

[Python path for rawforge]

PYTHON;/home/username/scripts/rawforge/.venv/bin/python

[model for rawforge]

MODEL;TreeNetDenoise

#Deblur,DeepSharpen,TreeNetDenoise,TreeNetDenoiseHeavy,TreeNetDenoiseLight,TreeNetDenoiseSuperLight

[device for rawforge]

DEVICE;cuda

# cuda, mps, cpu

[lumi noise for rawforge]

LUMI;0.0

# 0.0 - 1.0

[chroma noise for rawforge]

CHROMA;0.0

# 0.0 - 1.0

[Temp file format]

TMP_FILE_FORMAT;png

# The value of TMP_FILE_FORMAT must be tiff or png

[Temp file bit depth]

TMP_FILE_BITDEPTH;16

# The value of TMP_FILE_BITDEPTH must be 8, 16 or 32

[Acceptable file extensions]

EXTENSIONS;.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF

[Decode Nikon HE Raw]

NIKON_HE;False

# The value of NIKON_HE must be True or False

# Following parameters are needed if only NIKON_HE=True

[Exiftool path on Mac OS]

EXIF_DARWIN;/opt/homebrew/bin/exiftool

[DNG Converter path on Windows]

DNG_NT;C:\\Program Files\\Adobe\\Adobe DNG Converter\\Adobe DNG Converter.exe

[DNG Converter path on Linux]

DNG_LINUX;/home/yohnishi/.wine/drive_c/Program Files/Adobe/Adobe DNG Converter/Adobe DNG Converter.exe

[DNG Converter path on Mac OS]

DNG_DARWIN;/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter

[Delete temp. dng file]

DELETE_DNG;True

# The value of DELETE_DNG must be True or False

—---------------

[Python path for rawforge] is python interpreter path of virtual environment for RawForge.

[model for rawforge] is the model name used by RawForge. If your system has no GPU, it is recommended to use reeNetDenoiseLight or TreeNetDenoiseSuperLight.

[device for rawforge] specifies RawForge executing device. cuda for NVIDIA GPU, mps for Apple ARM chip PCs and cpu for no GPU PCs.

[lumi noise for rawforge] and [chiroma noise for rawforge] specifies the amount of noise to add back to the denoised result. See following posts.

https://discuss.pixls.us/t/introducing-a-new-foss-raw-image-denoiser-rawrefinery-and-seeking-testers/54778/68

If you want to use Nikon HE compressed Raw files, set [Decode Nikon HE Raw] True.

Start the plug-in

After the installation, users start this plug-in from [File] > [Apply RawForge to Raw and import it with ART…] in GIMP3 menu. If you use GIMP3 Flatpak version, start GIMP3 with “–socket=session-bus” option to allow it to communicate with ART.

Select target file.

Now denoising.

After denoising, ART UI will appear.

Closing ART UI, edited image by ART will be imported in GIMP3.

2 Likes

Denoising sample / model: TreeNetDenoise

before denoising

denoised

before denoising

denoised

1 Like

This is really cool! Is there a place I can link to share this with people?

Thank you!

Only here, now.

1 Like

I’d really like to try this but I keep getting errors. Here’s an example output after starting GIMP from terminal.

I’ve confirmed that the flatpak command to open ART works from a terminal.

/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:646: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  warning_dialog = Gtk.MessageDialog(
GLib-GIO-Message: 19:38:59.708: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkmessagedialog.ui' as a resource overlay

(exec-raw-forge-g3.py:61035): LibGimp-WARNING **: 19:41:38.736: _gimp_procedure_run_array: no return values, shouldn't happen
/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:744: Warning: g_error_new: assertion 'domain != 0' failed
  Gimp.main(exec_raw_forge.__gtype__, sys.argv)
start
COMMAND_NT
C:\\Program Files\\ART\\1.26.1
COMMAND_LINUX
flatpak run us.pixls.art.ART
COMMAND_DARWIN
/Applications/ART.app/Contents/MacOS
PYTHON
/home/chuck/rawforge-venv/bin/python
MODEL
TreeNetDenoise
DEVICE
cuda
LUMI
0.0
CHROMA
0.0
TMP_FILE_FORMAT
png
TMP_FILE_BITDEPTH
16
EXTENSIONS
.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF
NIKON_HE
False
EXIF_DARWIN
/opt/homebrew/bin/exiftool
DNG_NT
C:\\Program Files\\Adobe\\Adobe DNG Converter\\Adobe DNG Converter.exe
DNG_LINUX
/home/yohnishi/.wine/drive_c/Program Files/Adobe/Adobe DNG Converter/Adobe DNG Converter.exe
DNG_DARWIN
/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter
DELETE_DNG
True
write config list 0
extlist
2char ext .cr
2char ext .CR
2char ext .sr
2char ext .SR
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
pass sub 1
GLib-GIO-Message: 19:41:43.346: Adding GResources overlay '/org/gtk/libgtk=/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk'
GLib-GIO-Message: 19:41:43.346: Adding GResources overlay '/org/gnome/gjs=/tmp/.mount_GIMP-3MinndO/usr/share/org/gnome/gjs'
GLib-GIO-Message: 19:41:43.346: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkdialog.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.520: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkfilechooserwidget.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.538: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtksidebarrow.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.546: Enumerating directory '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/icons/' as resource overlay
GLib-GIO-Message: 19:41:43.578: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkpathbar.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.580: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkactionbar.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.580: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkplacesview.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.585: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkplacesviewrow.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.586: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkcombobox.ui' as a resource overlay
GLib-GIO-Message: 19:41:43.814: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtktooltipwindow.ui' as a resource overlay
/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:646: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  warning_dialog = Gtk.MessageDialog(
GLib-GIO-Message: 19:43:09.846: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkmessagedialog.ui' as a resource overlay
Traceback (most recent call last):
  File "/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py", line 266, in run
    dirname, filename = os.path.split(selected_file)
                        ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 103, in split
TypeError: expected str, bytes or os.PathLike object, not ValueArray

(exec-raw-forge-g3.py:61169): LibGimp-WARNING **: 19:43:10.922: _gimp_procedure_run_array: no return values, shouldn't happen
/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:745: Warning: g_error_new: assertion 'domain != 0' failed
  Gimp.main(exec_raw_forge.__gtype__, sys.argv)
start
COMMAND_NT
C:\\Program Files\\ART\\1.26.1
COMMAND_LINUX
flatpak run us.pixls.art.ART
COMMAND_DARWIN
/Applications/ART.app/Contents/MacOS
PYTHON
/home/chuck/rawforge-venv/bin/python
MODEL
TreeNetDenoise
DEVICE
cuda
LUMI
0.0
CHROMA
0.0
TMP_FILE_FORMAT
png
TMP_FILE_BITDEPTH
16
EXTENSIONS
.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF
NIKON_HE
False
EXIF_DARWIN
/opt/homebrew/bin/exiftool
DNG_NT
C:\\Program Files\\Adobe\\Adobe DNG Converter\\Adobe DNG Converter.exe
DNG_LINUX
/home/yohnishi/.wine/drive_c/Program Files/Adobe/Adobe DNG Converter/Adobe DNG Converter.exe
DNG_DARWIN
/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter
DELETE_DNG
True
write config list 0
extlist
2char ext .cr
2char ext .CR
2char ext .sr
2char ext .SR
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
pass 2
GLib-GIO-Message: 19:43:16.431: Adding GResources overlay '/org/gtk/libgtk=/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk'
GLib-GIO-Message: 19:43:16.431: Adding GResources overlay '/org/gnome/gjs=/tmp/.mount_GIMP-3MinndO/usr/share/org/gnome/gjs'
GLib-GIO-Message: 19:43:16.431: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkdialog.ui' as a resource overlay
GLib-GIO-Message: 19:43:16.602: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkfilechooserwidget.ui' as a resource overlay
GLib-GIO-Message: 19:43:16.619: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtksidebarrow.ui' as a resource overlay
GLib-GIO-Message: 19:43:16.626: Enumerating directory '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/icons/' as resource overlay
GLib-GIO-Message: 19:43:16.658: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkpathbar.ui' as a resource overlay
GLib-GIO-Message: 19:43:16.661: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkactionbar.ui' as a resource overlay
GLib-GIO-Message: 19:43:16.661: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkplacesview.ui' as a resource overlay
GLib-GIO-Message: 19:43:16.665: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkplacesviewrow.ui' as a resource overlay
GLib-GIO-Message: 19:43:16.667: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkcombobox.ui' as a resource overlay
GLib-GIO-Message: 19:43:17.286: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtktooltipwindow.ui' as a resource overlay
/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:646: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  warning_dialog = Gtk.MessageDialog(
GLib-GIO-Message: 19:43:36.278: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkmessagedialog.ui' as a resource overlay

(exec-raw-forge-g3.py:61250): LibGimp-WARNING **: 19:43:46.242: _gimp_procedure_run_array: no return values, shouldn't happen
/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:745: Warning: g_error_new: assertion 'domain != 0' failed
  Gimp.main(exec_raw_forge.__gtype__, sys.argv)
start
COMMAND_NT
C:\\Program Files\\ART\\1.26.1
COMMAND_LINUX
flatpak run us.pixls.art.ART
COMMAND_DARWIN
/Applications/ART.app/Contents/MacOS
PYTHON
/home/chuck/rawforge-venv/bin/python
MODEL
TreeNetDenoise
DEVICE
cuda
LUMI
0.0
CHROMA
0.0
TMP_FILE_FORMAT
png
TMP_FILE_BITDEPTH
16
EXTENSIONS
.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF
NIKON_HE
False
EXIF_DARWIN
/opt/homebrew/bin/exiftool
DNG_NT
C:\\Program Files\\Adobe\\Adobe DNG Converter\\Adobe DNG Converter.exe
DNG_LINUX
/home/yohnishi/.wine/drive_c/Program Files/Adobe/Adobe DNG Converter/Adobe DNG Converter.exe
DNG_DARWIN
/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter
DELETE_DNG
True
write config list 0
extlist
2char ext .cr
2char ext .CR
2char ext .sr
2char ext .SR
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
### filename:  /media/chuck/DATA01/$RECYCLE.BIN
DEBUG extension repr: '.BIN'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension .BIN
### filename:  /media/chuck/DATA01/frida kahlo.txt
DEBUG extension repr: '.txt'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension .txt
### filename:  /media/chuck/DATA01/from phone
DEBUG extension repr: ''
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension 
### filename:  /media/chuck/DATA01/from phone/20250405_132531.dng
DEBUG extension repr: '.dng'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: True
### extension .dng
selectedFile:  /media/chuck/DATA01/from phone/20250405_132531.dng
### filename:  /media/chuck/DATA01/from phone/20250405_132531.dng
DEBUG extension repr: '.dng'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: True
### extension .dng
selectedFile:  /media/chuck/DATA01/from phone/20250405_132531.dng
pass sub 1
pass 2
pass 3
nikonHE:  False
pass 4 selected_file:  /media/chuck/DATA01/from phone/20250405_132531.dng
### command_args for RawForge ###
['/home/chuck/rawforge-venv/bin/python', '/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/rawforge2ART.py', '--model', 'TreeNetDenoise', '--device', 'cuda', '--exiftool', 'flatpak run --command=exiftool us.pixls.art.ART', '--iso', 'auto', '--lumi', '0.0', '--chroma', '0.0', '/media/chuck/DATA01/from phone/20250405_132531.dng', '/media/chuck/DATA01/from phone/20250405_132531_denoised.dng']
b'/home/chuck/rawforge-venv/lib/python3.13/site-packages/colour/utilities/verbose.py:340: ColourUsageWarning: "Matplotlib" related API features are not available: "No module named \'matplotlib\'".\n'
b'See the installation guide for more information: https://www.colour-science.org/installation-guide/\n'
b'  warn(*args, **kwargs)\n'
b'Using Device cuda from cuda\n'
b'Using Device cuda from cuda\n'
b'Downloading TreeNetDenoise...\n'
b'test verification\n'
b'Model /home/chuck/.local/share/RawForge/ShadowWeightedL1.pt verified!\n'
b'Loading model: /home/chuck/.local/share/RawForge/ShadowWeightedL1.pt\n'
b'Model /home/chuck/.local/share/RawForge/ShadowWeightedL1.pt verified!\n'
b'1\n'
b'/media/chuck/DATA01/from phone/20250405_132531.dng: data corrupted at 6906039\n'
b'Traceback (most recent call last):\n'
b'  File "/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/rawforge2ART.py", line 145, in <module>\n'
b'    main()\n'
b'    ~~~~^^\n'
b'  File "/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/rawforge2ART.py", line 46, in main\n'
b'    iso = handler.load_rh(opts.input)\n'
b'  File "/home/chuck/rawforge-venv/lib/python3.13/site-packages/RawForge/application/ModelHandler.py", line 62, in load_rh\n'
b'    self.rh = RawHandler(path, colorspace=self.colorspace)\n'
b'              ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n'
b'  File "/home/chuck/rawforge-venv/lib/python3.13/site-packages/RawHandler/RawHandler.py", line 230, in __new__\n'
b'    raw_image = rawpy_object.raw_image_visible\n'
b'                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n'
b'  File "rawpy/_rawpy.pyx", line 573, in rawpy._rawpy.RawPy.raw_image_visible.__get__\n'
b'  File "rawpy/_rawpy.pyx", line 488, in rawpy._rawpy.RawPy.ensure_unpack\n'
b'  File "rawpy/_rawpy.pyx", line 482, in rawpy._rawpy.RawPy.unpack\n'
b'  File "rawpy/_rawpy.pyx", line 1041, in rawpy._rawpy.RawPy.handle_error\n'
b'rawpy._rawpy.LibRawDataError: Data error or unsupported file format\n'
result of ARTsmplMode <Popen: returncode: None args: ['/home/chuck/rawforge-venv/bin/python', '/ho...>
denoised_file /media/chuck/DATA01/from phone/20250405_132531_denoised.dng
GLib-GIO-Message: 19:45:53.744: Adding GResources overlay '/org/gtk/libgtk=/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk'
GLib-GIO-Message: 19:45:53.744: Adding GResources overlay '/org/gnome/gjs=/tmp/.mount_GIMP-3MinndO/usr/share/org/gnome/gjs'
GLib-GIO-Message: 19:45:53.744: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkdialog.ui' as a resource overlay
GLib-GIO-Message: 19:45:53.920: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkfilechooserwidget.ui' as a resource overlay
GLib-GIO-Message: 19:45:53.939: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtksidebarrow.ui' as a resource overlay
GLib-GIO-Message: 19:45:53.946: Enumerating directory '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/icons/' as resource overlay
GLib-GIO-Message: 19:45:53.980: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkpathbar.ui' as a resource overlay
GLib-GIO-Message: 19:45:53.982: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkactionbar.ui' as a resource overlay
GLib-GIO-Message: 19:45:53.982: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkplacesview.ui' as a resource overlay
GLib-GIO-Message: 19:45:53.986: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkplacesviewrow.ui' as a resource overlay
GLib-GIO-Message: 19:45:53.988: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkcombobox.ui' as a resource overlay
GLib-GIO-Message: 19:45:54.962: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtktooltipwindow.ui' as a resource overlay
start
COMMAND_NT
C:\\Program Files\\ART\\1.26.1
COMMAND_LINUX
flatpak run us.pixls.art.ART
COMMAND_DARWIN
/Applications/ART.app/Contents/MacOS
PYTHON
/home/chuck/rawforge-venv/bin/python
MODEL
TreeNetDenoise
DEVICE
cuda
LUMI
0.0
CHROMA
0.0
TMP_FILE_FORMAT
png
TMP_FILE_BITDEPTH
16
EXTENSIONS
.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF
NIKON_HE
False
EXIF_DARWIN
/opt/homebrew/bin/exiftool
DNG_NT
C:\\Program Files\\Adobe\\Adobe DNG Converter\\Adobe DNG Converter.exe
DNG_LINUX
/home/yohnishi/.wine/drive_c/Program Files/Adobe/Adobe DNG Converter/Adobe DNG Converter.exe
DNG_DARWIN
/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter
DELETE_DNG
True
write config list 0
extlist
2char ext .cr
2char ext .CR
2char ext .sr
2char ext .SR
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
i18n name:  py-plug-in-exec-raw-forge
ready: Import Raw
revised dirname:  /home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3
fail to open the file. False
write mTrans list
MNU_ITM Apply RawForge to Raw and import it with ART...
MNU_EXP Apply RawForge to Raw and import it using ART.
### filename:  /media/chuck/DATA01/$RECYCLE.BIN
DEBUG extension repr: '.BIN'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension .BIN
### filename:  /media/chuck/DATA01/frida kahlo.txt
DEBUG extension repr: '.txt'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension .txt
### filename:  /media/chuck/DATA01/Photography
DEBUG extension repr: ''
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension 
### filename:  /media/chuck/DATA01/Photography/_abstract red window 20170115 142718
DEBUG extension repr: ''
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension 
### filename:  /media/chuck/DATA01/Photography/Photography2017
DEBUG extension repr: ''
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension 
### filename:  /media/chuck/DATA01/Photography/Photography2017/20170507_134329_DxO copy.tif
DEBUG extension repr: '.tif'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: True
### extension .tif
selectedFile:  /media/chuck/DATA01/Photography/Photography2017/20170507_134329_DxO copy.tif
### filename:  /media/chuck/DATA01/Photography/Photography2017/Budapest_2017-01-29
DEBUG extension repr: ''
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: False
### extension 
### filename:  /media/chuck/DATA01/Photography/Photography2017/Budapest_2017-01-29/Budapest_2017-01-29_170035_DSC1488.NEF
DEBUG extension repr: '.NEF'
DEBUG extlist repr: '.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F .tif .TIF'
DEBUG split list: ['.dng', '.DNG', '.cr', '.CR', '.nef', '.NEF', '.nrf', '.NRF', '.arw', '.ARW', '.sr', '.SR', '.raf', '.RAF', '.orf', '.ORF', '.rw2', '.RW2', '.rwl', '.RWL', '.pef', '.PEF', '.x3f', '.X3F', '.tif', '.TIF']
DEBUG match: True
### extension .NEF
selectedFile:  /media/chuck/DATA01/Photography/Photography2017/Budapest_2017-01-29/Budapest_2017-01-29_170035_DSC1488.NEF
pass sub 1
pass 2
pass 3
nikonHE:  False
pass 4 selected_file:  /media/chuck/DATA01/Photography/Photography2017/Budapest_2017-01-29/Budapest_2017-01-29_170035_DSC1488.NEF
### command_args for RawForge ###
['/home/chuck/rawforge-venv/bin/python', '/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/rawforge2ART.py', '--model', 'TreeNetDenoise', '--device', 'cuda', '--exiftool', 'flatpak run --command=exiftool us.pixls.art.ART', '--iso', 'auto', '--lumi', '0.0', '--chroma', '0.0', '/media/chuck/DATA01/Photography/Photography2017/Budapest_2017-01-29/Budapest_2017-01-29_170035_DSC1488.NEF', '/media/chuck/DATA01/Photography/Photography2017/Budapest_2017-01-29/Budapest_2017-01-29_170035_DSC1488_denoised.dng']
b'/home/chuck/rawforge-venv/lib/python3.13/site-packages/colour/utilities/verbose.py:340: ColourUsageWarning: "Matplotlib" related API features are not available: "No module named \'matplotlib\'".\n'
b'See the installation guide for more information: https://www.colour-science.org/installation-guide/\n'
b'  warn(*args, **kwargs)\n'
b'Using Device cuda from cuda\n'
b'Using Device cuda from cuda\n'
b'Loading model: /home/chuck/.local/share/RawForge/ShadowWeightedL1.pt\n'
b'Model /home/chuck/.local/share/RawForge/ShadowWeightedL1.pt verified!\n'
b'1\n'
b'2\n'
b'Traceback (most recent call last):\n'
b'  File "/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/rawforge2ART.py", line 145, in <module>\n'
b'    main()\n'
b'    ~~~~^^\n'
b'  File "/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/rawforge2ART.py", line 52, in main\n'
b"    res = subprocess.run([opts.exiftool, '-json', opts.input],\n"
b'                         stdout=subprocess.PIPE, check=True,\n'
b'                         text=True)\n'
b'  File "/usr/lib/python3.13/subprocess.py", line 554, in run\n'
b'    with Popen(*popenargs, **kwargs) as process:\n'
b'         ~~~~~^^^^^^^^^^^^^^^^^^^^^^\n'
b'  File "/usr/lib/python3.13/subprocess.py", line 1039, in __init__\n'
b'    self._execute_child(args, executable, preexec_fn, close_fds,\n'
b'    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n'
b'                        pass_fds, cwd, env,\n'
b'                        ^^^^^^^^^^^^^^^^^^^\n'
b'    ...<5 lines>...\n'
b'                        gid, gids, uid, umask,\n'
b'                        ^^^^^^^^^^^^^^^^^^^^^^\n'
b'                        start_new_session, process_group)\n'
b'                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n'/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:646: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  warning_dialog = Gtk.MessageDialog(
GLib-GIO-Message: 19:46:15.670: Mapped file '/tmp/.mount_GIMP-3MinndO/usr/share/org/gtk/libgtk/ui/gtkmessagedialog.ui' as a resource overlay

(exec-raw-forge-g3.py:61413): LibGimp-WARNING **: 19:46:19.727: _gimp_procedure_run_array: no return values, shouldn't happen
/home/chuck/Documents/GIMP scripts and plugins/v3/exec_rawforge_g3/exec_rawforge_g3.py:745: Warning: g_error_new: assertion 'domain != 0' failed
  Gimp.main(exec_raw_forge.__gtype__, sys.argv)

b'  File "/usr/lib/python3.13/subprocess.py", line 1972, in _execute_child\n'
b'    raise child_exception_type(errno_num, err_msg, err_filename)\n'
b"FileNotFoundError: [Errno 2] No such file or directory: 'flatpak run --command=exiftool us.pixls.art.ART'\n"
result of ARTsmplMode <Popen: returncode: None args: ['/home/chuck/rawforge-venv/bin/python', '/ho...>
denoised_file /media/chuck/DATA01/Photography/Photography2017/Budapest_2017-01-29/Budapest_2017-01-29_170035_DSC1488_denoised.dng
1 Like

Hi,
Thank you for your report.

It seems that the reason is the program couldn’t found exiftool under ART installed directory.

Could you show the result of following command?

$ flatpak run --command=exiftool us.pixls.art.ART

1 Like

Hi,
Would you try to replace existing rawforge2ART.py with this scripts?

rawforge2ART_v0.2.7z (2.0 KB)

1 Like

I have updated this plug-in to avoid the error executing ART Flatpak version.

1 Like

Hi,

I have updated this plug-in. This update point is to adopt to rawforgeonnx version.

If you want to use rawforgeonnx version, you must install the virtual environment under the directory which name contains “onnx” string. Otherwise the plug-in trys to run normal pytorch version.

Installation example of rawforgeonnx version with uv

In your home directory:

$ mkdir scripts

$ cd scripts

$ mkdir rawforgeonnx

$ cd rawforgeonnx

$ uv venv

$ source .venv/bin/activate (In Windows .venv/Scripts/activate)

In Linux or Windows
(.venv)$ uv pip install rawforgeonnx[gpu] (or rawforgeonnx[cpu] or rawforgeonnx[directml])

In Mac OS
(.venv)$ uv pip install onnxruntime

(.venv)$ uv pip install rawforgeonnx

In this example, the path of virtual environment is:

~/scripts/rawforgeonnx/.venv

From my trial, it is recommended to use normal pytorch verion for cuda available or Mac ARM chip environment. Otherwise it is recommended to use onnx verion, because pytorch cpu version is veeeery slow!.

And it is recommended in almost all Windows environment to use rawforgeonnx[directml]. If you use same NVIDIA GPU in Linux + cuda and Windows, rawforgeonnx[directml] in Windows is faster than rawforge in Linux with cuda.

1 Like

Hi,

I have updated this plug-in. In this version I added skip ART editing mode.

To set this mode, in config.ini of this plug-in, change the parameter below True to False. And also use rawforge Onnx version. With rawforge normal PyTorch version, this mode won’t be activated, because normal version cannot export tiff files correctly.

[Editing with ART]
USEART;True

The expression of this plug-in on menu will be changed as “Denoise & import Raw with RawForge”, and the denoised image will be imported directly in GIMP.

Hi,

I have updated this plug-in. In this version, I have modified specifying way of some parameters in config.ini and I have fixed some bugs.

For [ART directory path on Windows], you can specify the upper directory path of actually ART installed directory, like COMMAND_NT;C:\\Program Files\\ART. The plug-in will automatically search the actual installed directory of the latest version of ART from sub directories. However these ART installed sub directories name must contain only numbers and periods. If actual ART installed directory name has the other characters, you must specify the full path of it.

For [Exiftool path], if you use exiftool under ART installed directory in Linux or Windows, you must simply disable the parameter specifying line with “#” (the default value is already disabled). Otherwise, you must specify the exiftool path and enable the line deleting #.

Default values in config.ini are as follows.

[ART directory path on Windows]
COMMAND_NT;C:\\Program Files\\ART
# This program automatically search the latest ART version sub directory.
# However sub directory names must only contain number and '.'.
# If you would like to contain other characters in each version sub directory,
# you should specify the full path of it.   

[ART directory path on Linux]
COMMAND_LINUX;/home/username/Programs/ART
# If your ART is Flatpak version...
#COMMAND_LINUX;flatpak run us.pixls.art.ART
# This program does not support ART AppImage version
# as its contents are identical with tar.gz version.

[ART directory path on Mac OS]
COMMAND_DARWIN;/Applications/ART.app/Contents/MacOS

[Python path for rawforge]
# for Linux
PYTHON;/home/$USER/scripts/rawforge/.venv/bin/python
# for Linux onnx version
#PYTHON;/home/$USER/scripts/rawforgeonnx/.venv/bin/python
# for Windows
#PYTHON;C:\\Users\\%USERNAME%\\scripts\\rawforge\\.venv\\scripts\\python.exe
# for Windows onnx version
#PYTHON;C:\\Users\\%USERNAME%\\scripts\\rawforgeonnx\\.venv\\scripts\\python.exe
# Attention! When you use onnx version, python path name must contain the string "onnx". 
# for Mac OS
#PYTHON;/Users/$USER/scripts/rawforge/.venv/bin/python
# for Linux onnx version
#PYTHON;/Users/$USER/scripts/rawforgeonnx/.venv/bin/python


[model for rawforge]
MODEL;TreeNetDenoise
#Deblur,DeepSharpen,TreeNetDenoise,TreeNetDenoiseHeavy,TreeNetDenoiseLight,TreeNetDenoiseSuperLight

[device for rawforge]
DEVICE;cuda
# cuda, mps, cpu

[lumi noise for rawforge]
LUMI;0.0
# 0.0 - 1.0

[chroma noise for rawforge]
CHROMA;0.0
# 0.0 - 1.0

[Temp file format]
TMP_FILE_FORMAT;png
# The value of TMP_FILE_FORMAT must be tiff or png

[Temp file bit depth]
TMP_FILE_BITDEPTH;16
# The value of TMP_FILE_BITDEPTH must be 8, 16 or 32

[Acceptable file extensions]
EXTENSIONS;.dng .DNG .cr .CR .nef .NEF .nrf .NRF .arw .ARW .sr .SR .raf .RAF .orf .ORF .rw2 .RW2 .rwl .RWL .pef .PEF .x3f .X3F

[Editing with ART]
USEART;True
# If you set this False, rawforge exports edited image directly to GIMP
# However it is only available when you use onnx version.


[Decode Nikon HE Raw]
NIKON_HE;False
# The value of NIKON_HE must be True or False

# Following parameters are needed if only NIKON_HE=True
[Exiftool path]
#EXIF_DARWIN;/opt/homebrew/bin/exiftool
# If you use exiftool under ART, comment out this line.

[DNG Converter path on Windows]
DNG_NT;C:\\Program Files\\Adobe\\Adobe DNG Converter\\Adobe DNG Converter.exe

[DNG Converter path on Linux]
DNG_LINUX;/home/username/.wine/drive_c/Program Files/Adobe/Adobe DNG Converter/Adobe DNG Converter.exe

[DNG Converter path on Mac OS]
DNG_DARWIN;/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter

[Delete temp. dng file]
DELETE_DNG;True
# The value of DELETE_DNG must be True or False