It is currently Wed Jul 22, 2026 4:18 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 88 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: GEGL can now call GMIC, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 1:44 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
Here is the syntax btw, it requires plugins of mine and Liam's to work and this image file.

boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline=" rembg i /tmp/in.png /tmp/out.png  "
lb:threshold-alpha alphadegree=1
id=1 gimp:layer-mode layer-mode=normal opacity=0.5 aux=[ ref=1]

lb:edgesmooth alpha-percentile2=80
id=2
crop
id=recall
id=alphalocked
src-atop aux=[ ref=alphalocked
id=nothing dst aux=[ ref=nothing
boy:spawn path-in="/tmp/in3.png" path-out="/tmp/out3.png" pipeline=" gmic /tmp/in3.png output /tmp/out3.jpg"
]
crop
median-blur radius=0
id=before_effects over aux=[ ref=before_effects
boy:spawn path-in="/tmp/in2.png" path-out="/tmp/out2.png" pipeline="gmic -i /tmp/out3.jpg  fx_graphic_novelfxl 1,2,13.056,40,3.96,0,0,9.2,0,1,0.776,0.474,2.17,0,0,4,1,1,1,0.5,0.8,1.28  -o /tmp/out2.png"
]
]
crop
over aux=[ ref=2  ssg stroke=1 opacityssg=3 colorssg=white    ]
id=3
dst-over aux=[ ref=3  ssg stroke=3 opacityssg=1 colorssg=#f7a8ff over aux=[ ref=2  ssg stroke=3 opacityssg=1.7 colorssg=#f7a8ff  gegl:custom-bevel size=1 gaus=1 depth=10 alphapercentile=55 blendmode=Overlay median-blur radius=0    ]
id=3.5 over aux=[ ref=3.5
color-overlay value=#240075 gaussian-blur std-dev-x=8 std-dev-y=9 opacity value=1.5
]

id=bg
dst-over aux=[ ref=bg  layer src=/home/contrast/Pictures/Magic/Trianglify_Workstation/polygons_fun.png unsharp-mask scale=1.5 ]
median-blur radius=0




crop
id=containrecall aux=[ ref=containrecall
gimp:layer-mode layer-mode=normal opacity=0.2 aux=[ ref=recall ]
]



]



]


crop
id=nothing dst aux=[ ref=nothing
boy:spawn path-in="/tmp/in3x.png" path-out="/tmp/out3.png" pipeline=" gmic /tmp/in3x.png output /tmp/out3x.jpg"
crop
median-blur radius=0
id=before_effects over aux=[ ref=before_effects
boy:spawn path-in="/tmp/in2x.png" path-out="/tmp/out2x.png" pipeline="gmic -i /tmp/out3x.jpg fx_mighty_details 25,0.21,25,1,11,0,50,50  -o /tmp/out2x.png"



Plugins syntax requires

viewtopic.php?f=9&t=20377
https://github.com/LinuxBeaver/Threshol ... /releases/
https://github.com/LinuxBeaver/GEGL-Cus ... /releases/
https://github.com/LinuxBeaver/GEGL-SSG ... /releases/

IMAGE FILE SYNTAX REQUIRES- REPLACE THE CONTRAST PATH WITH YOUR OWN
Attachment:
polygons_fun.png
polygons_fun.png [ 151.43 KiB | Viewed 95542 times ]


Last edited by contrast_ on Fri Jan 05, 2024 2:32 pm, edited 1 time in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 2:25 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
I am going to see if it is possible to call a web based REMBG, GFPGAN or some other AI image editing server. Based on everything I know the answer should be yes but it would need to be intentionally dedicated, meaning the web host INTENDED a designated bash string for REMBG, REAL ESRGAN, GFPGAN ect...


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 3:27 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
THIS IS MUCH FASTER NOW WITH THE NEW DEC 10 UPDATE

FACE RESTORATION AI RUNNING INSIDE GEGL

I got GFPGAN running in GEGL unique to a special directory on my system. It takes 4 minutes to load on large images.

Attachment:
pasted_image019.png
pasted_image019.png [ 437.1 KiB | Viewed 95534 times ]


For me it is this.

id=nothing dst aux=[ ref=nothing
boy:spawn path-in="/tmp/in3.png" path-out="/tmp/out3.png" pipeline=" source /home/contrast/Applications/mc/etc/profile.d/conda.sh && conda activate base && cd /home/contrast/Applications/GFPGAN/ && python inference_gfpgan.py -i /tmp/in3.png -o /tmp/out3.png  -v 1.3 -s 1"
]
crop
layer src=/tmp/out3.png/restored_imgs/in3.png


For everyone normal in a default install GFPGAN may be here

id=nothing dst aux=[ ref=nothing
boy:spawn path-in="/tmp/in3.png" path-out="/tmp/out3.png" pipeline="  /home/contrast/.local/GFPGAN/ && python inference_gfpgan.py -i /tmp/in3.png -o /tmp/out3.png  -v 1.3 -s 1"
]
crop
layer src=/tmp/out3.png/restored_imgs/in3.png


Last edited by contrast_ on Sun Dec 10, 2023 2:52 am, edited 1 time in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 3:32 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
I just confirmed that the only way this tool will work in the cloud online (for normies who don't have any AI's installed) is if someone makes a public server that allows users to run specific bash strings to call said AI tools. Then it will definitely be possible.

Currently I don't think anyone does it like that and if they did they could charge a fee or only 3 users per day ect...


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 3:55 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
It looks to me like I am making deep progress with GEGL while others haven't even made a single GEGL plugin. It concerns me that everyone else is way behind and its has been over 1.5 years since my first plugin and 2.5 years since the first day I studied GEGL.

GEGL AUTOMATES WITH GMIC COMMANDS
Attachment:
2023-12-05_03-52.png
2023-12-05_03-52.png [ 480.82 KiB | Viewed 95534 times ]



Attachment:
2023-12-05_03-49.png
2023-12-05_03-49.png [ 26.3 KiB | Viewed 95534 times ]


Attachment:
gmic_gegl.png
gmic_gegl.png [ 365.56 KiB | Viewed 70451 times ]


Last edited by contrast_ on Fri Feb 23, 2024 1:01 am, edited 1 time in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 4:44 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
@contrast_,
maybe it's only me ...
but I'm unable to see what I have to install, to for example run rembg in GEGL.
You post so many things in so many places .... I can't follow you.

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 5:56 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
nelo wrote:
@contrast_,
maybe it's only me ...
but I'm unable to see what I have to install, to for example run rembg in GEGL.
You post so many things in so many places .... I can't follow you.


Sorry for not clarifying.


How to get REMBG working with this (Linux Only)


You have to have REMBG installed on Linux.
https://pypi.org/project/rembg/

Then if you haven't already install this GEGL plugin on non flatpak Linux in


https://cdn.discordapp.com/attachments/ ... 09e80be86&


You can also add this string to remove the erosion damage around the outline from REMBG.

lb:threshold-alpha alphadegree=1
id=1 gimp:layer-mode layer-mode=normal opacity=0.5 aux=[ ref=1]

lb:edgesmooth alpha-percentile2=80


These two plugins are needed for that
viewtopic.php?f=9&t=20377
https://github.com/LinuxBeaver/Threshol ... /releases/

All three GEGL plugins go in
/home/(USERNAME)/.local/share/gegl-0.4/plug-ins


Install the plugins and restart Gimp and open GEGL Graph

THE PART OF DISABLING FOR SPEED IS OUTDATED
Attachment:
slow.png
slow.png [ 41.48 KiB | Viewed 95509 times ]


Run
boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline=" rembg /tmp/in.png -o /tmp/out.png  "


If REMBG is in a special directory change the default rembg text to its directory. It should work


At the end GEGL Graph should look like this and have this.

Attachment:
2023-12-05_17-54.png
2023-12-05_17-54.png [ 424.56 KiB | Viewed 95509 times ]


boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline=" rembg /tmp/in.png -o /tmp/out.png "


lb:threshold-alpha alphadegree=1
id=1 gimp:layer-mode layer-mode=normal opacity=0.5 aux=[ ref=1]

lb:edgesmooth alpha-percentile2=80boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline=" rembg i /tmp/in.png /tmp/out.png "


lb:threshold-alpha alphadegree=1
id=1 gimp:layer-mode layer-mode=normal opacity=0.5 aux=[ ref=1]

lb:edgesmooth alpha-percentile2=80


If the path doesn't work go to pipeline=" and add your REMBG directory. This will be extremely slow.


Last edited by contrast_ on Fri Jan 05, 2024 2:33 pm, edited 3 times in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 6:03 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
GEGL runs each command six times in a row even when preview is DISABLED. But the final image is already in the /tmp/ directory the first time getting overwritten five more times.

This could be six times faster if someone figured out how to cancel GEGL Graph and import the final png file in Gimp. Or if the user manually presses Esc key many times to cancel GEGL graph loading and goes to their /tmp/ and manually imports the final result by dragging the image file into Gimp.

I tried using xdotool to hit escape many times by running bash like
xdotool key escape && sleep 0.100 && repeated... && gimp /tmp/final.png
and it didn't work but new images suprisingly opened Gimp while GEGL graph was running.


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Tue Dec 05, 2023 7:07 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
This plugin has a known bug caused by GEGL's pixel chunks.

WHAT ARE PIXEL CHUNKS?
GEGL's image processing under the hood tiles images based on a given amount of pixels. They are called "chunks" I don't know what the default is but I do know that it can be changed. by running
gimp --gegl-chunk-size number
though this does not solve my problem as no matter what I think some chunks have to exist and the number may have a cap around several thousand.

WHAT IS THE BUG?
The exported png to be ran with bash is sometimes a pixel chunk instead of the full image. Here is the problem caught live in my tmp folder.
Attachment:
pixel_chunks.png
pixel_chunks.png [ 80.69 KiB | Viewed 95506 times ]


END RESULT OF THE BUG
(Gmic filter is only applied on a pixel chunk and not the entire image. Seen in red)
Attachment:
pixel_chunks2.png
pixel_chunks2.png [ 58.46 KiB | Viewed 95506 times ]



The only work around to pixel chunks is to avoid using Gegl Spawn's path out.
boy:spawn path-out=/tmp/final.png""


and instead just import the final file with

layer src=/tmp/final.png



This is code that will only work on my machine to do the task of running REMBG, GMIC and GFPGAN together, it ignores "path-out"
and imports the /tmp/whatever.png using gegl:layer.

#STRING 1
id=string1
src aux=[ ref=string1

id=invisibleblendmode dst aux=[ ref=invisibleblendmode

boy:spawn path-in="/tmp/in3.png"  pipeline="   gmic /tmp/in3.png output /tmp/out3.jpg   && gmic -i /tmp/out3.jpg  gcd_jpeg_smooth 1,1,0,0  -o /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 /tmp/out2.png -o /tmp/face -v 1.3 -s 1 && rembg /tmp/face/restored_imgs/out2.png -o /tmp/final.png   "  ]
src-in aux=[
layer src=/tmp/final.png

]

lb:threshold-alpha alphadegree=1
id=1 gimp:layer-mode layer-mode=normal opacity=0.7 aux=[ ref=1]
lb:edgesmooth alpha-percentile2=80



Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Wed Dec 06, 2023 12:00 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
After spending all day with the plugin I figured out how to trigger a variation the chunk bug.


Attachment:
chunk_bug.png
chunk_bug.png [ 289.17 KiB | Viewed 70451 times ]



0. Start with GEGL Graph - duh

1. Run moderately/severely intensive normal GEGL commands like a gaussian-blur.

2. Call GMIC through GEGL after those commands ( the importing of the image file is when the chunks are created) then the chunks create a NOT INTENDED glass tile effect.

This does NOT happen if the GMIC command is before the other GEGL operations. Only if it happens after it. It also does not happen if the commands are super light weight like lighting filters that take virtually no resources.


Here is an example of a graph that creates a unwanted glass tile chunk bug.
It happens because boy:spawn has a bunch of GEGL operations before it and those operations are constantly updating when the image file export is happening in /tmp/. The saved .png chunks are then modified and they create the ugly glass tile effect.


Code to duplicate the bug

id=containall

src aux=[ ref=containall

id=1
posterize levels=10
cubism tile-size=10
gimp:threshold-alpha

gimp:layer-mode layer-mode=normal opacity=0.3 aux=[ ref=1  ]
id=3
gimp:layer-mode layer-mode=overlay opacity=0.30 aux=[ ref=3 emboss ]



]

crop

id=invisibleblendmode src aux=[ ref=invisibleblendmode

boy:spawn path-in="/tmp/in3.png" path-out="/tmp/out2.png"  pipeline="   sleep 0.5 && gmic /tmp/in3.png output /tmp/out3.jpg   && gmic -i /tmp/out3.jpg  fx_smooth_anisotropic 10,0.512,1,2.15,8.61,1.6504,80.48,5,0,1,10,0,0,50,50  -o /tmp/out2.png    "  ]


]

crop


I have no clue how to solve this bug. I tried exporting a png and sleep 10 (to delay things and it failed)


Last edited by contrast_ on Fri Feb 23, 2024 1:03 am, edited 1 time in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Wed Dec 06, 2023 1:37 pm  (#21) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
Quote:
Then if you haven't already install this GEGL plugin on non flatpak Linux in

https://cdn.discordapp.com/attachments/ ... 09e80be86&


Downloaded, zip unpacked, contains a "RCS" folder ( and other files) in there is a "spawn.c,v" file ?
Never seen such a file-ending before. I doubt that it's ready to use.

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Wed Dec 06, 2023 1:40 pm  (#22) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
A new discovery has been made with GEGL Bash Spawn that leads to it running orders of magnitude faster, as it prevents GEGL from reloading the same operation 9 times in a row. That's what is slowing it down.

Before I show case the discovery remember that /tmp/final.png is unique to the users given path.

The GEGL syntax
gegl-buffer-load

layer src=/tmp/final.png


gegl-buffer-load When ran after boy:spawn or anything in GEGL (like a blur or emboss) causes it to cancel everything and have nothing in the graph. GEGL Layer loads an image file; such as a final output in /tmp/. The plan to make GEGL Bash Spawn faster is to run the syntax I listed above after a few seconds of the user pressing a checkbox. The checkbox will activate the nodes at a several second delay.

This means GMIC filters in GEGL will load in 1 or 2 seconds instead of 10-20 seconds. Once again this is happening because gegl:buffer-load cancels everything and layer src= calls the image file that GEGL dumped in /tmp/

Example of me running GMIC's Bokeh in GEGL fast
This only took one second to load because I pasted commands strategicly.

first I pasted the command to call GMIC

id=callgmic
over aux=[ ref=callgmic

boy:spawn path-in="/tmp/first.png"  "path-out"="/tmp/final.png"   pipeline="  gmic  /tmp/first.png  output /tmp/in3.webp && gmic /tmp/in3.webp fx_bokeh 3,8,0,1,33.5,4,0.07,0.2,255,176,252,160,0.302,27,4.3,20,0.19,2,255,170,255,110,0.15,0,50,50 -o /tmp/final.png   "  ]

]


Then a second later I pasted this while Gimp was Frozen

gegl-buffer-load

layer src=/tmp/final.png


Attachment:
gmic_GEGL.png
gmic_GEGL.png [ 1.4 MiB | Viewed 71331 times ]


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Wed Dec 06, 2023 1:54 pm  (#23) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
nelo wrote:
Quote:
Then if you haven't already install this GEGL plugin on non flatpak Linux in

https://cdn.discordapp.com/attachments/ ... 09e80be86&


Downloaded, zip unpacked, contains a "RCS" folder ( and other files) in there is a "spawn.c,v" file ?
Never seen such a file-ending before. I doubt that it's ready to use.


Sorry it was source code only. I provided a download with a binary on the first page post.
download/file.php?id=70342


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Wed Dec 06, 2023 2:06 pm  (#24) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
Soon this plugin will update with a delay property. When activated the nodes gegl-buffer-load and gegl:layer will kick in and unfreeze the graph and load the file in /tmp/

This is a hypothetical example where the unfreeze and call layer nodes are delayed by 4 seconds
Attachment:
delay_nodes.png
delay_nodes.png [ 17.39 KiB | Viewed 71326 times ]


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Wed Dec 06, 2023 3:51 pm  (#25) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
Here is the same thing I did with GMIC now with REMBG. It now loads very fast with a delayed buffer.

Attachment:
pasted_image023.png
pasted_image023.png [ 372.57 KiB | Viewed 71325 times ]


Last edited by contrast_ on Mon Jan 08, 2024 4:29 am, edited 2 times in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Thu Dec 07, 2023 3:46 am  (#26) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
very difficult to follow you for non-programmers :-(

What do I really have to write into the GEGL command?

in my normal working(!) bash script I activate the environment like so:
source ~/anaconda3/etc/profile.d/conda.sh
conda activate base


And if I put this in the GEGL command
boy:bash input="GEGL_IN" output="GEGL_OUT" pipeline="source ~/anaconda3/etc/profile.d/conda.sh && conda activate base && rembg -p GEGL_IN -o GEGL_OUT


nothing happens really, nothing in /tmp either

It would be really nice to have a working step by step example.
Only to get rembg to work ... nothing else. No fancy you can do this and that and so.
That only confuses me ( perhaps others, too)

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Thu Dec 07, 2023 4:29 am  (#27) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
nelo wrote:
very difficult to follow you for non-programmers :-(

What do I really have to write into the GEGL command?

in my normal working(!) bash script I activate the environment like so:
source ~/anaconda3/etc/profile.d/conda.sh
conda activate base


POST WAS EDITED TO WORK WITH MODERN REMBG

And if I put this in the GEGL command
boy:bash input="GEGL_IN" output="GEGL_OUT" pipeline="source ~/anaconda3/etc/profile.d/conda.sh && conda activate base && rembg -p GEGL_IN -o GEGL_OUT


nothing happens really, nothing in /tmp either

It would be really nice to have a working step by step example.
Only to get rembg to work ... nothing else. No fancy you can do this and that and so.
That only confuses me ( perhaps others, too)


Disable preview and try this.

boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline="source ~/anaconda3/etc/profile.d/conda.sh && conda activate base && rembg i /tmp/in.png /tmp/out.png"




To make it go 9 times faster paste

buffer-sink layer src=/tmp/out.png


AFTER GIMP IS FROZE AND THE ORIGINAL COMMAND IS RUNNING


its tricky but you'll get the hang of it.


Last edited by contrast_ on Fri Jan 05, 2024 2:41 pm, edited 2 times in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Thu Dec 07, 2023 5:39 pm  (#28) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1837
contrast_ wrote:
nelo wrote:
very difficult to follow you for non-programmers :-(

What do I really have to write into the GEGL command?

in my normal working(!) bash script I activate the environment like so:
source ~/anaconda3/etc/profile.d/conda.sh
conda activate base


And if I put this in the GEGL command
boy:bash input="GEGL_IN" output="GEGL_OUT" pipeline="source ~/anaconda3/etc/profile.d/conda.sh && conda activate base && rembg -p GEGL_IN -o GEGL_OUT


nothing happens really, nothing in /tmp either

It would be really nice to have a working step by step example.
Only to get rembg to work ... nothing else. No fancy you can do this and that and so.
That only confuses me ( perhaps others, too)


Disable preview and try this.

boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline="source ~/anaconda3/etc/profile.d/conda.sh && conda activate base && rembg /tmp/in.png -o /tmp/out.png"




To make it go 9 times faster paste

buffer-sink layer src=/tmp/out.png


AFTER GIMP IS FROZE AND THE ORIGINAL COMMAND IS RUNNING


its tricky but you'll get the hang of it.


That doesn't work for me here. It just leaves an empty layer, except for text in the upper left corner that reports "load failed".

The plugin by JamesH works perfectly however.
viewtopic.php?f=9&t=20041&start=30#p278034


Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Thu Dec 07, 2023 6:51 pm  (#29) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2013
POST EDIT --- THE POST DID NOT RUN REMBG BECAUSE I WAS USING AN OUTDATED VERSION OF REMBG FROM EARLY 2022 AND THESE PEOPLE WERE USING A 2023 MODERN VERSION

Learn more about this here.
viewtopic.php?f=9&t=20652&start=60#p286226

--original post---

racer-x wrote:
contrast_ wrote:
nelo wrote:
very difficult to follow you for non-programmers :-(

What do I really have to write into the GEGL command?

in my normal working(!) bash script I activate the environment like so:
source ~/anaconda3/etc/profile.d/conda.sh
conda activate base


And if I put this in the GEGL command
boy:bash input="GEGL_IN" output="GEGL_OUT" pipeline="source ~/anaconda3/etc/profile.d/conda.sh && conda activate base && rembg -p GEGL_IN -o GEGL_OUT


nothing happens really, nothing in /tmp either

It would be really nice to have a working step by step example.
Only to get rembg to work ... nothing else. No fancy you can do this and that and so.
That only confuses me ( perhaps others, too)


Disable preview and try this.

boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline="source ~/anaconda3/etc/profile.d/conda.sh && conda activate base && rembg i /tmp/in.png /tmp/out.png"




To make it go 9 times faster paste

buffer-sink layer src=/tmp/out.png


AFTER GIMP IS FROZE AND THE ORIGINAL COMMAND IS RUNNING


its tricky but you'll get the hang of it.


That doesn't work for me here. It just leaves an empty layer, except for text in the upper left corner that reports "load failed".

The plugin by JamesH works perfectly however.
viewtopic.php?f=9&t=20041&start=30#p278034


Make sure you are using non flatpak Linux and Please give me your unique rembg directory. This is the default for most people. So try this

1-5-2024 EDIT TO MODERNIZE ORIGINAL POST
boy:spawn path-in="/tmp/in.png" path-out="/tmp/out.png" pipeline=" rembg i /tmp/in.png /tmp/out.png  "


Guys you need to understand that this plugin is literally just calling bash in Linux. So whatever works in bash on Linux will work in this plugin. If you can call REMBG in bash on non-flatpak Gimp it will work here.


Last edited by contrast_ on Fri Jan 05, 2024 2:39 pm, edited 2 times in total.

Top
 Post subject: Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl
PostPosted: Thu Dec 07, 2023 8:28 pm  (#30) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1837
I'm using Gimp PPA, not flatpak. rembg directory is "/home/user/.local/bin/rembg". it works fine via command line as well as python plugin. It doesn't seem to work in gegl graph using your script, at least not here.


Top
Post new topic Reply to topic  [ 88 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group