From c0c11a45eccf3c22b6cba36a579ee804fbadc9d9 Mon Sep 17 00:00:00 2001 From: marceloeatworld <20625497+marceloeatworld@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:18:23 +0000 Subject: [PATCH] Refactor FalAI PHP client to support custom workflows and ComfyUI --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cbfbfa2..3f69ec5 100644 --- a/README.md +++ b/README.md @@ -86,15 +86,21 @@ $data->requestId; // bf1bb655-9027-4d01-ac38-f85e0cb007dc ``` -### Using Workflows +### Using Workflows and ComfyUI -In addition to generating images using predefined models, you can also use custom workflows with the 'workflow' method. Here's an example: +In addition to generating images using predefined models, you can also use custom workflows and ComfyUI with the 'workflow' method. +Here's an example: ```php use MarceloEatWorld\FalAI\FalAI; use MarceloEatWorld\FalAI\Data\GenerationData; +// Replace 'workflows/youraccount/fantasy-character-generator' with your actual workflow ID $workflowId = 'workflows/youraccount/fantasy-character-generator'; + +// Replace 'comfy/youraccount/fantasy-character-generator' with your actual ComfyUI ID +$workflowId = 'comfy/youraccount/fantasy-character-generator'; + $input = [ 'input' => [ 'character_description' => 'A brave elven warrior with long, flowing hair and a glowing magical sword.',