These commands are unique to my system meaning you have to replace all my local directories with your own directory for this to work. But I'll post them anyway just so people can study it. (if they care about GEGL) Its literally just bash on my machine calling AI and GMIC.
I am doing the same thing as the post above calling GMIC's JPEG Smooth and GFPGAN in GEGL bash, but this time the difference is that I will be using the GEGL Box below to call the image file with JPEG Smooth (Without Face restoration) to be on 35% opacity to make GFPGAN look less "hyper real". "Hyper Real" is a term where GFPGAN restores a face's quality so good that it looks out of place. The 35% normal layer mode blend with the "GMIC Jpeg Smooth layer" is to reduce the quality of GFPGAN. This is like stacking two normal layers on top of each other with one layer at 35% opacity.
Command for Bash Box (highly unique to my system)flatpak-spawn --host bash -c '
gmic /home/contrast/tmp/in.png output /home/contrast/tmp/out3.webp && gmic -i /home/contrast/tmp/out3.webp gcd_jpeg_smooth 1,1,0,0 -o /home/contrast/tmp/out2.png && source /home/contrast/Applications/mc/etc/profile.d/conda.sh && conda activate base && cd /home/contrast/Applications/GFPGAN/ && python inference_gfpgan.py -i /home/contrast/tmp/out2.png -o /home/contrast/tmp/face -v 1.3 -s 1 && mv /home/contrast/tmp/face/restored_imgs/out2.png /home/contrast/tmp/out.png
'
Command for GEGL Box (requires swapping DIRNAMES)id=1 gimp:layer-mode layer-mode=normal opacity=0.35 aux=[ ref=1 layer src=/home/contrast/tmp/out2.png ]
saturation scale=1.13
The saturation at the end is not needed. I just put it there because I wanted a mild saturation boost.
If you make the opacity 0.50, the GFPGAN layer will be half transparent. If it is at 1, it will be entirely replaced by the JPEG Smooth layer.
This is the final output when GFPGAN's effect is 35% reducedAttachment:
new_discovery_GFPGAN.png [ 287.02 KiB | Viewed 10163 times ]
This is the final output when GFPGAN's effect is 100% reduced (hidden by the JPEG smooth image)Attachment:
hidden_opacity_100.png [ 253.9 KiB | Viewed 10163 times ]
These are the files GEGL created while running the bash command.Attachment:
files_gegl_is_interacting_with.png [ 271.24 KiB | Viewed 10163 times ]
Info about the folder and files:
Flatpak Gimp cannot use /tmp/ or /var/tmp/ so I made a bogus
/home/username/tmp/Many GMIC filters "glitch out" on png so I use GMIC to convert the file to webp before I run a GMIC filter then, while running the GMIC filter it is instructed to covert the output of the filter back to .png. As seen here.
gmic /home/contrast/tmp/in.png output /home/contrast/tmp/out3.webp && gmic -i /home/contrast/tmp/out3.webp gcd_jpeg_smooth 1,1,0,0 -o /home/contrast/tmp/out2.png
I am fully aware that it is sloppy how I am naming files out2, out3. I just put a number in front of it for convenience. This stuff I am doing with GEGL is very advance and I hope others reach this point one day.