Compare commits
No commits in common. "5fd29ef5f3dd93b160276deba7e1f2c6110eb53b" and "46d26ce2404c8d8ec4708d6de3cfe7eb02e9a22b" have entirely different histories.
5fd29ef5f3
...
46d26ce240
@ -19,12 +19,9 @@ class ConvertToComic implements ShouldQueue
|
|||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
$absolutePath = Storage::disk('public')->path($this->photoJob->image_path);
|
$absolutePath = Storage::disk('public')->path($this->photoJob->image_path);
|
||||||
|
$script = base_path('convert_to_comic.sh');
|
||||||
|
|
||||||
$result = Process::timeout(0)->run(
|
$result = Process::timeout(0)->run('bash ' . escapeshellarg($script) . ' ' . escapeshellarg($absolutePath));
|
||||||
'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([
|
$this->photoJob->update([
|
||||||
'status' => $result->successful() ? 'done' : 'failed',
|
'status' => $result->successful() ? 'done' : 'failed',
|
||||||
|
|||||||
15
convert_to_comic.sh
Executable file
15
convert_to_comic.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/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"
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="relative w-full max-w-2xl">
|
<div class="relative w-full max-w-2xl">
|
||||||
<video id="video" autoplay playsinline
|
<video id="video" autoplay playsinline
|
||||||
class="w-full rounded-2xl shadow-2xl bg-gray-900 aspect-video object-cover" style="transform: scaleX(-1);"></video>
|
class="w-full rounded-2xl shadow-2xl bg-gray-900 aspect-video object-cover"></video>
|
||||||
|
|
||||||
<canvas id="canvas" class="hidden"></canvas>
|
<canvas id="canvas" class="hidden"></canvas>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user