From c3cc549c3e982d4d0a26a47793171a35d4021900 Mon Sep 17 00:00:00 2001 From: Rob Ballantyne Date: Sun, 3 Dec 2023 10:28:54 +0000 Subject: [PATCH] Add templating for new storage monitor and serverless api [skip ci] --- .../example_payloads/bound_image2image.json | 14 ++ .../example_payloads/bound_text2image.json | 18 +++ .../raw_controlnet_t2i_adapters.json | 131 ++++++++++++++++++ .../example_payloads/raw_image2image.json | 109 +++++++++++++++ .../docs/example_payloads/raw_text2image.json | 97 +++++++++++++ .../docs/example_payloads/raw_upscale.json | 116 ++++++++++++++++ .../COPY_ROOT_EXTRA/opt/storage/ckpt/.gitkeep | 0 .../opt/storage/controlnet/.gitkeep | 0 .../opt/storage/esrgan/.gitkeep | 0 .../COPY_ROOT_EXTRA/opt/storage/lora/.gitkeep | 0 .../stable_diffusion/models/ckpt/.gitkeep | 0 .../models/controlnet/.gitkeep | 0 .../stable_diffusion/models/esrgan/.gitkeep | 0 .../stable_diffusion/models/lora/.gitkeep | 0 .../stable_diffusion/models/vae/.gitkeep | 0 .../COPY_ROOT_EXTRA/opt/storage/vae/.gitkeep | 0 16 files changed, 485 insertions(+) create mode 100644 build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_image2image.json create mode 100644 build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_text2image.json create mode 100644 build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_controlnet_t2i_adapters.json create mode 100644 build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_image2image.json create mode 100644 build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_text2image.json create mode 100644 build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_upscale.json create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/ckpt/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/controlnet/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/esrgan/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/lora/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/ckpt/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/controlnet/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/esrgan/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/lora/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/vae/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/storage/vae/.gitkeep diff --git a/build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_image2image.json b/build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_image2image.json new file mode 100644 index 00000000..49f719e2 --- /dev/null +++ b/build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_image2image.json @@ -0,0 +1,14 @@ +{ + "input": { + "handler": "Image2Image", + "aws_access_key_id": "your-s3-access-key", + "aws_secret_access_key_id": "your-s3-secret-access-key", + "aws_endpoint_url": "https://my-endpoint.backblaze.com", + "aws_bucket_name": "your-bucket", + "ckpt_name": "v1-5-pruned-emaonly.ckpt", + "include_text": "photograph of a victorian woman, arms outstretched with angel wings. cloudy sky, meadow grass", + "exclude_text": "watermark, text", + "denoise": 0.87, + "input_image": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/input/example.png" + } +} \ No newline at end of file diff --git a/build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_text2image.json b/build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_text2image.json new file mode 100644 index 00000000..09e1002a --- /dev/null +++ b/build/COPY_ROOT/opt/serverless/docs/example_payloads/bound_text2image.json @@ -0,0 +1,18 @@ +{ + "input": { + "handler": "Text2Image", + "aws_access_key_id": "your-s3-access-key", + "aws_secret_access_key_id": "your-s3-secret-access-key", + "aws_endpoint_url": "https://my-endpoint.backblaze.com", + "aws_bucket_name": "your-bucket", + "steps": 20, + "ckpt_name": "v1-5-pruned-emaonly.ckpt", + "sampler_name": "euler", + "scheduler": "normal", + "include_text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,", + "exclude_text": "text, watermark", + "width": 512, + "height": 512, + "batch_size": 1 + } +} \ No newline at end of file diff --git a/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_controlnet_t2i_adapters.json b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_controlnet_t2i_adapters.json new file mode 100644 index 00000000..568b7400 --- /dev/null +++ b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_controlnet_t2i_adapters.json @@ -0,0 +1,131 @@ +{ + "input": { + "handler": "RawWorkflow", + "aws_access_key_id": "your-s3-access-key", + "aws_secret_access_key_id": "your-s3-secret-access-key", + "aws_endpoint_url": "https://my-endpoint.backblaze.com", + "aws_bucket_name": "your-bucket", + "workflow_json": { + "3": { + "inputs": { + "seed": 891858402356003, + "steps": 20, + "cfg": 8, + "sampler_name": "uni_pc_bh2", + "scheduler": "normal", + "denoise": 1, + "model": [ + "34", + 0 + ], + "positive": [ + "23", + 0 + ], + "negative": [ + "7", + 0 + ], + "latent_image": [ + "5", + 0 + ] + }, + "class_type": "KSampler" + }, + "5": { + "inputs": { + "width": 832, + "height": 384, + "batch_size": 1 + }, + "class_type": "EmptyLatentImage" + }, + "7": { + "inputs": { + "text": "(hands), text, error, cropped, (worst quality:1.2), (low quality:1.2), normal quality, (jpeg artifacts:1.3), signature, watermark, username, blurry, artist name, monochrome, sketch, censorship, censor, (copyright:1.2)", + "clip": [ + "34", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "34", + 2 + ] + }, + "class_type": "VAEDecode" + }, + "9": { + "inputs": { + "filename_prefix": "ComfyUI", + "images": [ + "8", + 0 + ] + }, + "class_type": "SaveImage" + }, + "20": { + "inputs": { + "image": "https://upload.wikimedia.org/wikipedia/commons/3/3e/Stereogram_Tut_Shark_Depthmap.png", + "upload": "image" + }, + "class_type": "LoadImage" + }, + "23": { + "inputs": { + "strength": 1.0000000000000004, + "conditioning": [ + "24", + 0 + ], + "control_net": [ + "33", + 0 + ], + "image": [ + "20", + 0 + ] + }, + "class_type": "ControlNetApply" + }, + "24": { + "inputs": { + "text": "underwater photograph shark\n\n\n\n", + "clip": [ + "34", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "33": { + "inputs": { + "control_net_name": "diff_control_sd15_depth_fp16.safetensors", + "model": [ + "34", + 0 + ] + }, + "class_type": "DiffControlNetLoader" + }, + "34": { + "inputs": { + "ckpt_name": "v1-5-pruned-emaonly.ckpt" + }, + "class_type": "CheckpointLoaderSimple" + } + } + } + } +} \ No newline at end of file diff --git a/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_image2image.json b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_image2image.json new file mode 100644 index 00000000..29745590 --- /dev/null +++ b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_image2image.json @@ -0,0 +1,109 @@ +{ + "input": { + "handler": "RawWorkflow", + "aws_access_key_id": "your-s3-access-key", + "aws_secret_access_key_id": "your-s3-secret-access-key", + "aws_endpoint_url": "https://my-endpoint.backblaze.com", + "aws_bucket_name": "your-bucket", + "workflow_json": { + { + "3": { + "inputs": { + "seed": 280823642470253, + "steps": 20, + "cfg": 8, + "sampler_name": "dpmpp_2m", + "scheduler": "normal", + "denoise": 0.8700000000000001, + "model": [ + "14", + 0 + ], + "positive": [ + "6", + 0 + ], + "negative": [ + "7", + 0 + ], + "latent_image": [ + "12", + 0 + ] + }, + "class_type": "KSampler" + }, + "6": { + "inputs": { + "text": "photograph of victorian woman with wings, sky clouds, meadow grass", + "clip": [ + "14", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "7": { + "inputs": { + "text": "watermark, text", + "clip": [ + "14", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "14", + 2 + ] + }, + "class_type": "VAEDecode" + }, + "9": { + "inputs": { + "filename_prefix": "ComfyUI", + "images": [ + "8", + 0 + ] + }, + "class_type": "SaveImage" + }, + "10": { + "inputs": { + "image": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/input/example.png", + "upload": "image" + }, + "class_type": "LoadImage" + }, + "12": { + "inputs": { + "pixels": [ + "10", + 0 + ], + "vae": [ + "14", + 2 + ] + }, + "class_type": "VAEEncode" + }, + "14": { + "inputs": { + "ckpt_name": "v1-5-pruned-emaonly.ckpt" + }, + "class_type": "CheckpointLoaderSimple" + } + } + } + } +} \ No newline at end of file diff --git a/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_text2image.json b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_text2image.json new file mode 100644 index 00000000..9cd5d084 --- /dev/null +++ b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_text2image.json @@ -0,0 +1,97 @@ +{ + "input": { + "handler": "RawWorkflow", + "aws_access_key_id": "your-s3-access-key", + "aws_secret_access_key_id": "your-s3-secret-access-key", + "aws_endpoint_url": "https://my-endpoint.backblaze.com", + "aws_bucket_name": "your-bucket", + "workflow_json": { + { + "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": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle", + "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" + } + } + } + } +} \ No newline at end of file diff --git a/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_upscale.json b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_upscale.json new file mode 100644 index 00000000..f08c7630 --- /dev/null +++ b/build/COPY_ROOT/opt/serverless/docs/example_payloads/raw_upscale.json @@ -0,0 +1,116 @@ +{ + "input": { + "handler": "RawWorkflow", + "aws_access_key_id": "your-s3-access-key", + "aws_secret_access_key_id": "your-s3-secret-access-key", + "aws_endpoint_url": "https://my-endpoint.backblaze.com", + "aws_bucket_name": "your-bucket", + "workflow_json": { + { + "3": { + "inputs": { + "seed": 833543590226030, + "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": "masterpiece best quality girl standing in victorian clothing", + "clip": [ + "4", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "7": { + "inputs": { + "text": "bad hands", + "clip": [ + "4", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "4", + 2 + ] + }, + "class_type": "VAEDecode" + }, + "9": { + "inputs": { + "filename_prefix": "ComfyUI", + "images": [ + "14", + 0 + ] + }, + "class_type": "SaveImage" + }, + "13": { + "inputs": { + "model_name": "RealESRGAN_x4.pth" + }, + "class_type": "UpscaleModelLoader" + }, + "14": { + "inputs": { + "upscale_model": [ + "13", + 0 + ], + "image": [ + "8", + 0 + ] + }, + "class_type": "ImageUpscaleWithModel" + } + } + } + } +} \ No newline at end of file diff --git a/build/COPY_ROOT_EXTRA/opt/storage/ckpt/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/ckpt/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/controlnet/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/controlnet/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/esrgan/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/esrgan/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/lora/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/lora/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/ckpt/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/ckpt/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/controlnet/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/controlnet/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/esrgan/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/esrgan/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/lora/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/lora/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/vae/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/stable_diffusion/models/vae/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/storage/vae/.gitkeep b/build/COPY_ROOT_EXTRA/opt/storage/vae/.gitkeep new file mode 100644 index 00000000..e69de29b