From f401edc20b901989a33ae0dfeb3f50d4c2c5c72f Mon Sep 17 00:00:00 2001 From: badayvedat Date: Tue, 23 Apr 2024 19:35:57 +0300 Subject: [PATCH] chore: remove unused files --- .../pages/new_file.tsx | 86 ------------------ .../pages/workflow.tsx | 91 ------------------- 2 files changed, 177 deletions(-) delete mode 100644 apps/demo-nextjs-page-router/pages/new_file.tsx delete mode 100644 apps/demo-nextjs-page-router/pages/workflow.tsx diff --git a/apps/demo-nextjs-page-router/pages/new_file.tsx b/apps/demo-nextjs-page-router/pages/new_file.tsx deleted file mode 100644 index a80c309..0000000 --- a/apps/demo-nextjs-page-router/pages/new_file.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import * as fal from '@fal-ai/serverless-client'; - -// This is a simple example of how to use the fal-js SDK to execute a workflow. -const result = fal.subscribe('fal-ai/fast-sdxl', { - input: getWorkflow({}), - logs: true, - onQueueUpdate: (update) => { - if (update.status === 'IN_PROGRESS') { - update.logs.map((log) => log.message).forEach(console.log); - } - }, -}); - -// This workflow is generated with ComfyUI-fal -const WORKFLOW = { - prompt: { - '3': { - inputs: { - seed: 156680208700286, - steps: 20, - cfg: 8, - sampler_name: 'euler', - scheduler: 'normal', - denoise: 1, - model: ['4', 0], - positive: ['6', 0], - negative: ['7', 0], - latent_image: ['5', 0], - }, - class_type: 'KSampler', - }, - '4': { - inputs: { - ckpt_name: 'v1-5-pruned-emaonly.ckpt', - }, - class_type: 'CheckpointLoaderSimple', - }, - '5': { - inputs: { - width: 512, - height: 512, - batch_size: 1, - }, - class_type: 'EmptyLatentImage', - }, - '6': { - inputs: { - clip: ['4', 1], - }, - class_type: 'CLIPTextEncode', - }, - '7': { - inputs: { - clip: ['4', 1], - }, - class_type: 'CLIPTextEncode', - }, - '8': { - inputs: { - samples: ['3', 0], - vae: ['4', 2], - }, - class_type: 'VAEDecode', - }, - '9': { - inputs: { - filename_prefix: 'ComfyUI', - images: ['8', 0], - }, - class_type: 'SaveImage', - }, - }, - extra_data: {}, - fal_inputs_dev_info: {}, - fal_inputs: {}, -}; - -function getWorkflow(object: any) { - let newWorkflow = JSON.parse(JSON.stringify(WORKFLOW)); - newWorkflow.fal_inputs = { - ...newWorkflow.fal_inputs, - ...object, - }; - - return newWorkflow; -} diff --git a/apps/demo-nextjs-page-router/pages/workflow.tsx b/apps/demo-nextjs-page-router/pages/workflow.tsx deleted file mode 100644 index 22ac84a..0000000 --- a/apps/demo-nextjs-page-router/pages/workflow.tsx +++ /dev/null @@ -1,91 +0,0 @@ -// This workflow is generated with ComfyUI-fal -const WORKFLOW = { - prompt: { - '3': { - inputs: { - seed: 156680208700286, - steps: 20, - cfg: 8, - sampler_name: 'euler', - scheduler: 'normal', - denoise: 1, - model: ['4', 0], - positive: ['6', 0], - negative: ['7', 0], - latent_image: ['5', 0], - }, - class_type: 'KSampler', - }, - '4': { - inputs: { - ckpt_name: 'v1-5-pruned-emaonly.ckpt', - }, - class_type: 'CheckpointLoaderSimple', - }, - '5': { - inputs: { - width: 512, - height: 512, - batch_size: 1, - }, - class_type: 'EmptyLatentImage', - }, - '6': { - inputs: { - text: ['10', 0], - clip: ['4', 1], - }, - class_type: 'CLIPTextEncode', - }, - '7': { - inputs: { - text: 'text, watermark', - clip: ['4', 1], - }, - class_type: 'CLIPTextEncode', - }, - '8': { - inputs: { - samples: ['3', 0], - vae: ['4', 2], - }, - class_type: 'VAEDecode', - }, - '9': { - inputs: { - filename_prefix: 'ComfyUI', - images: ['8', 0], - }, - class_type: 'SaveImage', - }, - '10': { - inputs: { - name: 'cliptextencode_text', - value: - 'beautiful scenery nature glass bottle landscape, , purple galaxy bottle,', - }, - class_type: 'StringInput_fal', - }, - }, - extra_data: {}, - fal_inputs_dev_info: { - cliptextencode_text: { - key: ['10', 'inputs', 'value'], - class_type: 'StringInput_fal', - }, - }, - fal_inputs: { - cliptextencode_text: - 'beautiful scenery nature glass bottle landscape, , purple galaxy bottle,', - }, -}; - -export function getWorkflow(object: any) { - let newWorkflow = JSON.parse(JSON.stringify(WORKFLOW)); - newWorkflow.fal_inputs = { - ...newWorkflow.fal_inputs, - ...object, - }; - - return newWorkflow; -}