use gmic instead of ai
This commit is contained in:
parent
cce988255b
commit
5fd29ef5f3
@ -19,9 +19,12 @@ class ConvertToComic implements ShouldQueue
|
||||
public function handle(): void
|
||||
{
|
||||
$absolutePath = Storage::disk('public')->path($this->photoJob->image_path);
|
||||
$script = base_path('convert_to_comic.sh');
|
||||
|
||||
$result = Process::timeout(0)->run('bash ' . escapeshellarg($script) . ' ' . escapeshellarg($absolutePath));
|
||||
$result = Process::timeout(0)->run(
|
||||
'gmic ' . escapeshellarg($absolutePath) .
|
||||
' cl_comic 4,1,0,0,1,15,15,1,10,20,6,2,0,0,0,0,0,0,50,50' .
|
||||
' -o ' . escapeshellarg($absolutePath)
|
||||
);
|
||||
|
||||
$this->photoJob->update([
|
||||
'status' => $result->successful() ? 'done' : 'failed',
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
export LANGUAGE=
|
||||
|
||||
source /home/alegab/workspace/comfy_ui/venv/bin/activate
|
||||
|
||||
cp "$1" /home/alegab/comfy/ComfyUI/input/fotobox.jpg
|
||||
|
||||
echo "input: $1" >> image_log.txt
|
||||
|
||||
output=$(comfy-cli run --workflow /home/alegab/comfy/ComfyUI/user/default/workflows/comic2.json | grep "Outputs" -A 2 | tail -n 2 | head -n 1 | strings)
|
||||
output=$(tr -dc '[[:print:]]' <<< "$output" | cut -c 5-38,43-)
|
||||
|
||||
echo "output: $output" >> image_log.txt
|
||||
|
||||
cp $output "$1"
|
||||
Loading…
Reference in New Issue
Block a user