{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import os\n", "import json\n", "import uuid\n", "from aiohttp import web, WSMsgType\n", "import asyncio" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import asyncio\n", "import json\n", "import math\n", "import random\n", "import requests\n", "import websockets" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "with open(\"workflow_api.json\", \"r\", encoding=\"utf-8\") as f:\n", " workflow_data = f.read()\n", "import json\n", "workflow = json.loads(workflow_data)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "workflow[\"168\"][\"inputs\"][\"filename_prefix\"] = 'test1'" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "workflow[\"8\"][\"inputs\"]['video'] = 'd0.mp4'" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [], "source": [ "workflow[\"196\"][\"inputs\"]['image'] = '/home/itek/Desktop/api comfyui/121.png'" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "import json\n", "from urllib import request, parse\n", "import random\n", "\n", "def queue_prompt(prompt):\n", " p = {\"prompt\": prompt}\n", " data = json.dumps(p).encode('utf-8')\n", " req = request.Request(\"http://127.0.0.1:8188/prompt\", data=data)\n", " return request.urlopen(req)\n", "\n", "a = queue_prompt(workflow)" ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 46, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a" ] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [], "source": [ "a.close()" ] }, { "cell_type": "code", "execution_count": 48, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "b''" ] }, "execution_count": 48, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.read()" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [], "source": [ "import urllib\n", "\n", "def get_history(prompt_id, server_address):\n", " with urllib.request.urlopen(\"http://{}/history/{}\".format(server_address, prompt_id)) as response:\n", " return json.loads(response.read())" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'eb2d4c60-10fd-4809-aced-82453efe6520': {'prompt': [16,\n", " 'eb2d4c60-10fd-4809-aced-82453efe6520',\n", " {'1': {'inputs': {'precision': 'fp16', 'mode': 'human'},\n", " 'class_type': 'DownloadAndLoadLivePortraitModels',\n", " '_meta': {'title': '(Down)Load LivePortraitModels'}},\n", " '8': {'inputs': {'video': 'd0.mp4',\n", " 'force_rate': 16,\n", " 'force_size': 'Disabled',\n", " 'custom_width': 512,\n", " 'custom_height': 512,\n", " 'frame_load_cap': 128,\n", " 'skip_first_frames': 0,\n", " 'select_every_nth': 1},\n", " 'class_type': 'VHS_LoadVideo',\n", " '_meta': {'title': 'Load Video (Upload) 🎥🅥🅗🅢'}},\n", " '78': {'inputs': {'image': ['165', 0]},\n", " 'class_type': 'GetImageSizeAndCount',\n", " '_meta': {'title': 'Get Image Size & Count'}},\n", " '81': {'inputs': {'expand': 0,\n", " 'incremental_expandrate': 0.0,\n", " 'tapered_corners': True,\n", " 'flip_input': False,\n", " 'blur_radius': 13.9,\n", " 'lerp_alpha': 1.0,\n", " 'decay_factor': 1.0,\n", " 'fill_holes': False,\n", " 'mask': ['83', 0]},\n", " 'class_type': 'GrowMaskWithBlur',\n", " '_meta': {'title': 'Grow Mask With Blur'}},\n", " '82': {'inputs': {'mask': ['81', 0]},\n", " 'class_type': 'MaskPreview+',\n", " '_meta': {'title': '🔧 Mask Preview'}},\n", " '83': {'inputs': {'shape': 'square',\n", " 'frames': 1,\n", " 'location_x': 256,\n", " 'location_y': 256,\n", " 'grow': 0,\n", " 'frame_width': 512,\n", " 'frame_height': 512,\n", " 'shape_width': 480,\n", " 'shape_height': 480},\n", " 'class_type': 'CreateShapeMask',\n", " '_meta': {'title': 'Create Shape Mask'}},\n", " '129': {'inputs': {'onnx_device': 'CUDA',\n", " 'keep_model_loaded': True,\n", " 'detection_threshold': 0.5},\n", " 'class_type': 'LivePortraitLoadCropper',\n", " '_meta': {'title': 'LivePortrait Load InsightFaceCropper'}},\n", " '134': {'inputs': {'image': ['197', 0]},\n", " 'class_type': 'GetImageSizeAndCount',\n", " '_meta': {'title': 'Get Image Size & Count'}},\n", " '165': {'inputs': {'width': 512,\n", " 'height': 512,\n", " 'upscale_method': 'lanczos',\n", " 'keep_proportion': True,\n", " 'divisible_by': 2,\n", " 'crop': 'disabled',\n", " 'image': ['196', 0]},\n", " 'class_type': 'ImageResizeKJ',\n", " '_meta': {'title': 'Resize Image'}},\n", " '168': {'inputs': {'frame_rate': 16.0,\n", " 'loop_count': 0,\n", " 'filename_prefix': 'test1',\n", " 'format': 'video/h264-mp4',\n", " 'pix_fmt': 'yuv420p',\n", " 'crf': 19,\n", " 'save_metadata': False,\n", " 'pingpong': False,\n", " 'save_output': True,\n", " 'images': ['181', 0],\n", " 'audio': ['8', 2]},\n", " 'class_type': 'VHS_VideoCombine',\n", " '_meta': {'title': 'Video Combine 🎥🅥🅗🅢'}},\n", " '180': {'inputs': {'eye_retargeting': True,\n", " 'eyes_retargeting_multiplier': 1,\n", " 'lip_retargeting': True,\n", " 'lip_retargeting_multiplier': 1,\n", " 'driving_crop_info': ['197', 1]},\n", " 'class_type': 'LivePortraitRetargeting',\n", " '_meta': {'title': 'LivePortrait Retargeting'}},\n", " '181': {'inputs': {'image': ['191', 0]},\n", " 'class_type': 'GetImageSizeAndCount',\n", " '_meta': {'title': 'Get Image Size & Count'}},\n", " '182': {'inputs': {'image': ['8', 0]},\n", " 'class_type': 'GetImageSizeAndCount',\n", " '_meta': {'title': 'Get Image Size & Count'}},\n", " '189': {'inputs': {'dsize': 512,\n", " 'scale': 2.3,\n", " 'vx_ratio': 0.0,\n", " 'vy_ratio': -0.125,\n", " 'face_index': 0,\n", " 'face_index_order': 'large-small',\n", " 'rotate': True,\n", " 'pipeline': ['1', 0],\n", " 'cropper': ['198', 0],\n", " 'source_image': ['78', 0]},\n", " 'class_type': 'LivePortraitCropper',\n", " '_meta': {'title': 'LivePortrait Cropper'}},\n", " '190': {'inputs': {'lip_zero': False,\n", " 'lip_zero_threshold': 0.03,\n", " 'stitching': True,\n", " 'delta_multiplier': 1.0,\n", " 'mismatch_method': 'constant',\n", " 'relative_motion_mode': 'relative',\n", " 'driving_smooth_observation_variance': 3e-06,\n", " 'expression_friendly': True,\n", " 'expression_friendly_multiplier': 1.0,\n", " 'pipeline': ['1', 0],\n", " 'crop_info': ['189', 1],\n", " 'source_image': ['78', 0],\n", " 'driving_images': ['182', 0]},\n", " 'class_type': 'LivePortraitProcess',\n", " '_meta': {'title': 'LivePortrait Process'}},\n", " '191': {'inputs': {'source_image': ['78', 0],\n", " 'cropped_image': ['190', 0],\n", " 'liveportrait_out': ['190', 1],\n", " 'mask': ['81', 0]},\n", " 'class_type': 'LivePortraitComposite',\n", " '_meta': {'title': 'LivePortrait Composite'}},\n", " '196': {'inputs': {'image': '/home/itek/Desktop/api comfyui/test.png',\n", " 'upload': 'image'},\n", " 'class_type': 'LoadImage',\n", " '_meta': {'title': 'Load Image'}},\n", " '197': {'inputs': {'dsize': 512,\n", " 'scale': 2.3,\n", " 'vx_ratio': 0,\n", " 'vy_ratio': -0.125,\n", " 'face_index': 0,\n", " 'face_index_order': 'large-small',\n", " 'rotate': True,\n", " 'pipeline': ['1', 0],\n", " 'cropper': ['198', 0],\n", " 'source_image': ['182', 0]},\n", " 'class_type': 'LivePortraitCropper',\n", " '_meta': {'title': 'LivePortrait Cropper'}},\n", " '198': {'inputs': {'landmarkrunner_onnx_device': 'torch_gpu',\n", " 'keep_model_loaded': True},\n", " 'class_type': 'LivePortraitLoadMediaPipeCropper',\n", " '_meta': {'title': 'LivePortrait Load MediaPipeCropper'}},\n", " '201': {'inputs': {'face_detector': 'blazeface_back_camera',\n", " 'landmarkrunner_device': 'torch_gpu',\n", " 'face_detector_device': 'cuda',\n", " 'face_detector_dtype': 'fp16',\n", " 'keep_model_loaded': True},\n", " 'class_type': 'LivePortraitLoadFaceAlignmentCropper',\n", " '_meta': {'title': 'LivePortrait Load FaceAlignmentCropper'}}},\n", " {},\n", " ['82', '168']],\n", " 'outputs': {'168': {'gifs': [{'filename': 'test1_00003.mp4',\n", " 'subfolder': '',\n", " 'type': 'output',\n", " 'format': 'video/h264-mp4',\n", " 'frame_rate': 16.0}]},\n", " '78': {'text': ['1x512x512']},\n", " '181': {'text': ['50x512x512']},\n", " '82': {'images': [{'filename': 'ComfyUI_temp_elkck_00001_.png',\n", " 'subfolder': '',\n", " 'type': 'temp'}]},\n", " '182': {'text': ['50x512x512']}},\n", " 'status': {'status_str': 'success',\n", " 'completed': True,\n", " 'messages': [['execution_start',\n", " {'prompt_id': 'eb2d4c60-10fd-4809-aced-82453efe6520',\n", " 'timestamp': 1725354009638}],\n", " ['execution_cached',\n", " {'nodes': ['1',\n", " '8',\n", " '78',\n", " '81',\n", " '82',\n", " '83',\n", " '165',\n", " '168',\n", " '181',\n", " '182',\n", " '189',\n", " '190',\n", " '191',\n", " '196',\n", " '198'],\n", " 'prompt_id': 'eb2d4c60-10fd-4809-aced-82453efe6520',\n", " 'timestamp': 1725354009643}],\n", " ['execution_success',\n", " {'prompt_id': 'eb2d4c60-10fd-4809-aced-82453efe6520',\n", " 'timestamp': 1725354009644}]]},\n", " 'meta': {'168': {'node_id': '168',\n", " 'display_node': '168',\n", " 'parent_node': None,\n", " 'real_node_id': '168'},\n", " '78': {'node_id': '78',\n", " 'display_node': '78',\n", " 'parent_node': None,\n", " 'real_node_id': '78'},\n", " '181': {'node_id': '181',\n", " 'display_node': '181',\n", " 'parent_node': None,\n", " 'real_node_id': '181'},\n", " '82': {'node_id': '82',\n", " 'display_node': '82',\n", " 'parent_node': None,\n", " 'real_node_id': '82'},\n", " '182': {'node_id': '182',\n", " 'display_node': '182',\n", " 'parent_node': None,\n", " 'real_node_id': '182'}}}}" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_history(\"eb2d4c60-10fd-4809-aced-82453efe6520\" , '127.0.0.1:8188')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 87, "metadata": {}, "outputs": [], "source": [ "import websocket #NOTE: websocket-client (https://github.com/websocket-client/websocket-client)\n", "import uuid\n", "import json\n", "import urllib.request\n", "import urllib.parse\n", "\n", "server_address = \"127.0.0.1:8188\"\n", "client_id = str(uuid.uuid4())\n", "\n", "def queue_prompt(prompt):\n", " p = {\"prompt\": prompt, \"client_id\": client_id}\n", " data = json.dumps(p).encode('utf-8')\n", " req = urllib.request.Request(\"http://{}/prompt\".format(server_address), data=data)\n", " return json.loads(urllib.request.urlopen(req).read())\n", "\n", "def get_image(filename, subfolder, folder_type):\n", " data = {\"filename\": filename, \"subfolder\": subfolder, \"type\": folder_type}\n", " url_values = urllib.parse.urlencode(data)\n", " with urllib.request.urlopen(\"http://{}/view?{}\".format(server_address, url_values)) as response:\n", " return response.read()\n", "\n", "def get_history(prompt_id):\n", " with urllib.request.urlopen(\"http://{}/history/{}\".format(server_address, prompt_id)) as response:\n", " return json.loads(response.read())\n", "\n", "def get_images(ws, prompt):\n", " prompt_id = queue_prompt(prompt)['prompt_id']\n", " output_images = {}\n", " while True:\n", " out = ws.recv()\n", " print(out)\n", " if isinstance(out, str):\n", " message = json.loads(out)\n", " if message['type'] == 'executing':\n", " data = message['data']\n", " if data['node'] is None and data['prompt_id'] == prompt_id:\n", " break #Execution is done\n", " else:\n", " continue #previews are binary data\n", "\n", " history = get_history(prompt_id)[prompt_id]\n", " for node_id in history['outputs']:\n", " node_output = history['outputs'][node_id]\n", " images_output = []\n", " if 'images' in node_output:\n", " for image in node_output['images']:\n", " image_data = get_image(image['filename'], image['subfolder'], image['type'])\n", " images_output.append(image_data)\n", " output_images[node_id] = images_output\n", "\n", " return output_images\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "output_file = history['outputs']['168']['gifs'][0]['filename']" ] }, { "cell_type": "code", "execution_count": 88, "metadata": {}, "outputs": [], "source": [ "def get_images(ws, prompt):\n", " prompt_id = queue_prompt(prompt)['prompt_id']\n", " count = 1\n", " while True:\n", " print(count)\n", " count = count + 1\n", " out = ws.recv()\n", " #print(out)\n", " if isinstance(out, str):\n", " message = json.loads(out)\n", " if message['type'] == 'executing':\n", " data = message['data']\n", " if data['node'] is None and data['prompt_id'] == prompt_id:\n", " break #Execution is done\n", " else:\n", " continue #previews are binary data\n", "\n", " history = get_history(prompt_id)[prompt_id]\n", " output_file = history['outputs']['168']['gifs'][0]['filename']\n", "\n", " return output_file" ] }, { "cell_type": "code", "execution_count": 91, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'7663cc12-d749-4216-bc9f-3591e2b52b98'" ] }, "execution_count": 91, "metadata": {}, "output_type": "execute_result" } ], "source": [ "queue_prompt(prompt)['prompt_id']" ] }, { "cell_type": "code", "execution_count": 98, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1\n", "2\n", "3\n", "4\n", "5\n", "6\n", "7\n", "8\n", "9\n", "10\n", "11\n", "12\n", "13\n", "14\n", "15\n", "16\n", "17\n", "18\n", "19\n", "20\n", "21\n", "22\n", "23\n", "24\n", "25\n", "26\n", "27\n", "28\n", "29\n", "30\n", "31\n", "32\n", "33\n", "34\n", "35\n", "36\n", "37\n", "38\n", "39\n", "40\n", "41\n", "42\n", "43\n", "44\n", "45\n", "46\n", "47\n", "48\n", "49\n", "50\n", "51\n", "52\n", "53\n", "54\n", "55\n", "56\n", "57\n", "58\n", "59\n", "60\n", "61\n", "62\n", "63\n", "64\n", "65\n", "66\n", "67\n", "68\n", "69\n", "70\n", "71\n", "72\n", "73\n", "74\n", "75\n", "76\n", "77\n", "78\n", "79\n", "80\n", "81\n", "82\n", "83\n", "84\n", "85\n", "86\n", "87\n", "88\n", "89\n", "90\n", "91\n", "92\n", "93\n", "94\n", "95\n", "96\n", "97\n", "98\n", "99\n", "100\n", "101\n", "102\n", "103\n", "104\n", "105\n", "106\n", "107\n", "108\n", "109\n", "110\n", "111\n", "112\n", "113\n", "114\n", "115\n", "116\n", "117\n", "118\n", "119\n", "120\n", "121\n", "122\n", "123\n", "124\n", "125\n", "126\n", "127\n", "128\n", "129\n", "130\n", "131\n", "132\n", "133\n", "134\n", "135\n", "136\n", "137\n", "138\n", "139\n", "140\n", "141\n", "142\n", "143\n", "144\n", "145\n", "146\n", "147\n", "148\n", "149\n", "150\n", "151\n", "152\n", "153\n", "154\n", "155\n", "156\n", "157\n", "158\n", "159\n", "160\n", "161\n", "162\n", "163\n", "164\n", "165\n", "166\n", "167\n", "168\n", "169\n", "170\n", "171\n", "172\n", "173\n", "174\n", "175\n", "176\n", "177\n", "178\n", "179\n", "180\n", "181\n", "182\n", "183\n", "184\n", "185\n", "186\n", "187\n", "188\n", "189\n", "190\n", "191\n", "192\n", "193\n", "194\n", "195\n", "196\n", "197\n", "198\n", "199\n", "200\n", "201\n", "202\n", "203\n", "204\n", "205\n", "206\n", "207\n", "208\n", "209\n", "210\n", "211\n", "212\n", "213\n", "214\n", "215\n", "216\n", "217\n", "218\n", "219\n", "220\n", "221\n", "222\n", "223\n", "224\n", "225\n", "226\n", "227\n", "228\n", "229\n", "230\n", "231\n", "232\n", "233\n", "234\n", "235\n", "236\n", "237\n", "238\n", "239\n", "240\n", "241\n", "242\n", "243\n", "244\n", "245\n", "246\n", "247\n", "248\n", "249\n", "250\n", "251\n", "252\n", "253\n", "254\n", "255\n", "256\n", "257\n", "258\n", "259\n", "260\n", "261\n", "262\n", "263\n", "264\n", "265\n", "266\n", "267\n", "268\n", "269\n", "270\n", "271\n", "272\n", "273\n", "274\n", "275\n", "276\n", "277\n", "278\n", "279\n", "280\n", "281\n", "282\n", "283\n", "284\n", "285\n", "286\n", "287\n", "288\n", "289\n", "290\n", "291\n", "292\n", "293\n", "294\n", "295\n", "296\n", "297\n", "298\n", "299\n", "300\n", "301\n", "302\n", "303\n", "304\n", "305\n", "306\n", "307\n", "308\n", "309\n", "310\n", "311\n", "312\n", "313\n", "314\n", "315\n", "316\n", "317\n", "318\n", "319\n", "320\n", "321\n", "322\n", "323\n", "324\n", "325\n", "326\n", "327\n", "328\n", "329\n", "330\n", "331\n", "332\n", "333\n", "334\n", "335\n", "336\n", "337\n", "338\n", "339\n", "340\n", "341\n", "342\n", "343\n", "344\n", "345\n", "346\n", "347\n", "348\n", "349\n", "350\n", "351\n", "352\n", "353\n", "354\n", "355\n", "356\n", "357\n", "358\n", "359\n", "360\n", "361\n", "362\n", "363\n", "364\n", "365\n", "366\n", "367\n", "368\n", "369\n", "370\n", "371\n", "372\n", "373\n", "374\n", "375\n", "376\n", "377\n", "378\n", "379\n", "380\n", "381\n", "382\n", "383\n", "384\n", "385\n", "386\n", "387\n", "388\n", "389\n", "390\n", "391\n", "392\n", "393\n", "394\n", "395\n", "396\n", "397\n", "398\n", "399\n", "400\n", "401\n", "402\n", "403\n", "404\n", "405\n", "406\n", "407\n", "408\n", "409\n", "410\n", "411\n", "412\n", "413\n", "414\n", "415\n", "416\n", "417\n", "418\n", "419\n", "420\n", "421\n", "422\n", "423\n", "424\n", "425\n", "426\n", "427\n", "428\n", "429\n", "430\n", "431\n", "432\n", "433\n", "434\n", "435\n", "436\n", "437\n", "438\n", "439\n", "440\n", "441\n", "442\n", "443\n", "444\n", "445\n", "446\n", "447\n", "448\n", "449\n", "450\n", "451\n", "452\n", "453\n", "454\n", "455\n", "456\n", "457\n", "458\n", "459\n", "460\n", "461\n", "462\n", "463\n", "464\n", "465\n", "466\n", "467\n", "468\n", "469\n", "470\n", "471\n", "472\n", "473\n", "474\n", "475\n", "476\n", "477\n", "478\n", "479\n", "480\n", "481\n", "482\n", "483\n", "484\n", "485\n", "486\n", "487\n", "488\n", "489\n", "490\n", "491\n", "492\n", "493\n", "494\n", "495\n", "496\n", "497\n", "498\n", "499\n", "500\n", "501\n", "502\n", "503\n", "504\n", "505\n", "506\n", "507\n", "508\n", "509\n", "510\n", "511\n", "512\n", "513\n", "514\n", "515\n", "516\n", "517\n", "518\n", "519\n", "520\n", "521\n", "522\n", "523\n", "524\n", "525\n", "526\n", "527\n", "528\n", "529\n", "530\n", "531\n", "532\n", "533\n", "534\n", "535\n", "536\n", "537\n", "538\n", "539\n", "540\n", "541\n", "542\n", "543\n", "544\n", "545\n", "546\n", "547\n", "548\n", "549\n", "550\n", "551\n", "552\n", "553\n", "554\n", "555\n", "556\n", "557\n", "558\n", "559\n", "560\n", "561\n", "562\n", "563\n", "564\n", "565\n", "566\n", "567\n", "568\n", "569\n", "570\n", "571\n", "572\n", "573\n", "574\n", "575\n", "576\n", "577\n", "578\n", "579\n", "580\n", "581\n", "582\n", "583\n", "584\n", "585\n", "586\n", "587\n", "588\n", "589\n" ] }, { "data": { "text/plain": [ "'13e3864a-6e65-4425-a1b6-99b30483843f_00001-audio.mp4'" ] }, "execution_count": 98, "metadata": {}, "output_type": "execute_result" } ], "source": [ "with open('/home/itek/Desktop/api comfyui/scripts/workflow/lp.json', \"r\", encoding=\"utf-8\") as f:\n", " workflow_data = f.read()\n", "prompt = json.loads(workflow_data)\n", "\n", "prompt[\"168\"]['inputs']['filename_prefix'] = client_id\n", "prompt['208']['inputs']['image'] = '/home/itek/Desktop/api comfyui/121.png'\n", "prompt['202']['inputs']['video'] = '/home/itek/Desktop/api comfyui/d0.mp4'\n", "\n", "ws = websocket.WebSocket()\n", "ws.connect(\"ws://{}/ws?clientId={}\".format(server_address, client_id))\n", "images = get_images(ws, prompt)\n", "images" ] }, { "cell_type": "code", "execution_count": 61, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'78': [],\n", " '82': [b'\\x89PNG\\r\\n\\x1a\\n\\x00\\x00\\x00\\rIHDR\\x00\\x00\\x02\\x00\\x00\\x00\\x02\\x00\\x08\\x02\\x00\\x00\\x00{\\x1aC\\xad\\x00\\x00\\x12\\xf3tEXtprompt\\x00{\"1\": {\"inputs\": {\"precision\": \"fp16\", \"mode\": \"human\"}, \"class_type\": \"DownloadAndLoadLivePortraitModels\", \"_meta\": {\"title\": \"(Down)Load LivePortraitModels\"}}, \"8\": {\"inputs\": {\"video\": \"d11.mp4\", \"force_rate\": 16, \"force_size\": \"Disabled\", \"custom_width\": 512, \"custom_height\": 512, \"frame_load_cap\": 128, \"skip_first_frames\": 0, \"select_every_nth\": 1}, \"class_type\": \"VHS_LoadVideo\", \"_meta\": {\"title\": \"Load Video (Upload) \\\\ud83c\\\\udfa5\\\\ud83c\\\\udd65\\\\ud83c\\\\udd57\\\\ud83c\\\\udd62\"}, \"is_changed\": [\"85bfd276cc78aabd13efbdbd1e890cbf8658fc503acc9eb7993e9e513a5efbfb\"]}, \"78\": {\"inputs\": {\"image\": [\"165\", 0]}, \"class_type\": \"GetImageSizeAndCount\", \"_meta\": {\"title\": \"Get Image Size & Count\"}}, \"81\": {\"inputs\": {\"expand\": 0, \"incremental_expandrate\": 0.0, \"tapered_corners\": true, \"flip_input\": false, \"blur_radius\": 13.9, \"lerp_alpha\": 1.0, \"decay_factor\": 1.0, \"fill_holes\": false, \"mask\": [\"83\", 0]}, \"class_type\": \"GrowMaskWithBlur\", \"_meta\": {\"title\": \"Grow Mask With Blur\"}}, \"82\": {\"inputs\": {\"mask\": [\"81\", 0]}, \"class_type\": \"MaskPreview+\", \"_meta\": {\"title\": \"\\\\ud83d\\\\udd27 Mask Preview\"}}, \"83\": {\"inputs\": {\"shape\": \"square\", \"frames\": 1, \"location_x\": 256, \"location_y\": 256, \"grow\": 0, \"frame_width\": 512, \"frame_height\": 512, \"shape_width\": 480, \"shape_height\": 480}, \"class_type\": \"CreateShapeMask\", \"_meta\": {\"title\": \"Create Shape Mask\"}}, \"129\": {\"inputs\": {\"onnx_device\": \"CUDA\", \"keep_model_loaded\": true, \"detection_threshold\": 0.5}, \"class_type\": \"LivePortraitLoadCropper\", \"_meta\": {\"title\": \"LivePortrait Load InsightFaceCropper\"}}, \"134\": {\"inputs\": {\"image\": [\"197\", 0]}, \"class_type\": \"GetImageSizeAndCount\", \"_meta\": {\"title\": \"Get Image Size & Count\"}}, \"165\": {\"inputs\": {\"width\": 512, \"height\": 512, \"upscale_method\": \"lanczos\", \"keep_proportion\": true, \"divisible_by\": 2, \"crop\": \"disabled\", \"image\": [\"196\", 0]}, \"class_type\": \"ImageResizeKJ\", \"_meta\": {\"title\": \"Resize Image\"}}, \"168\": {\"inputs\": {\"frame_rate\": 16.0, \"loop_count\": 0, \"filename_prefix\": \"LivePortrait\", \"format\": \"video/h264-mp4\", \"pix_fmt\": \"yuv420p\", \"crf\": 19, \"save_metadata\": false, \"pingpong\": false, \"save_output\": true, \"images\": [\"181\", 0], \"audio\": [\"8\", 2]}, \"class_type\": \"VHS_VideoCombine\", \"_meta\": {\"title\": \"Video Combine \\\\ud83c\\\\udfa5\\\\ud83c\\\\udd65\\\\ud83c\\\\udd57\\\\ud83c\\\\udd62\"}}, \"180\": {\"inputs\": {\"eye_retargeting\": true, \"eyes_retargeting_multiplier\": 1, \"lip_retargeting\": true, \"lip_retargeting_multiplier\": 1, \"driving_crop_info\": [\"197\", 1]}, \"class_type\": \"LivePortraitRetargeting\", \"_meta\": {\"title\": \"LivePortrait Retargeting\"}}, \"181\": {\"inputs\": {\"image\": [\"191\", 0]}, \"class_type\": \"GetImageSizeAndCount\", \"_meta\": {\"title\": \"Get Image Size & Count\"}}, \"182\": {\"inputs\": {\"image\": [\"8\", 0]}, \"class_type\": \"GetImageSizeAndCount\", \"_meta\": {\"title\": \"Get Image Size & Count\"}}, \"189\": {\"inputs\": {\"dsize\": 512, \"scale\": 2.3, \"vx_ratio\": 0.0, \"vy_ratio\": -0.125, \"face_index\": 0, \"face_index_order\": \"large-small\", \"rotate\": true, \"pipeline\": [\"1\", 0], \"cropper\": [\"198\", 0], \"source_image\": [\"78\", 0]}, \"class_type\": \"LivePortraitCropper\", \"_meta\": {\"title\": \"LivePortrait Cropper\"}}, \"190\": {\"inputs\": {\"lip_zero\": false, \"lip_zero_threshold\": 0.03, \"stitching\": true, \"delta_multiplier\": 1.0, \"mismatch_method\": \"constant\", \"relative_motion_mode\": \"relative\", \"driving_smooth_observation_variance\": 3e-06, \"expression_friendly\": true, \"expression_friendly_multiplier\": 1.0, \"pipeline\": [\"1\", 0], \"crop_info\": [\"189\", 1], \"source_image\": [\"78\", 0], \"driving_images\": [\"182\", 0]}, \"class_type\": \"LivePortraitProcess\", \"_meta\": {\"title\": \"LivePortrait Process\"}}, \"191\": {\"inputs\": {\"source_image\": [\"78\", 0], \"cropped_image\": [\"190\", 0], \"liveportrait_out\": [\"190\", 1], \"mask\": [\"81\", 0]}, \"class_type\": \"LivePortraitComposite\", \"_meta\": {\"title\": \"LivePortrait Composite\"}}, \"196\": {\"inputs\": {\"image\": \"/home/itek/Desktop/api comfyui/121.png\", \"upload\": \"image\"}, \"class_type\": \"LoadImage\", \"_meta\": {\"title\": \"Load Image\"}, \"is_changed\": [\"e7b44e8ab9281c19f8d7be6f8198bdccf143d568121d2d6fef1bcfe84bb6d3a5\"]}, \"197\": {\"inputs\": {\"dsize\": 512, \"scale\": 2.3, \"vx_ratio\": 0, \"vy_ratio\": -0.125, \"face_index\": 0, \"face_index_order\": \"large-small\", \"rotate\": true, \"pipeline\": [\"1\", 0], \"cropper\": [\"198\", 0], \"source_image\": [\"182\", 0]}, \"class_type\": \"LivePortraitCropper\", \"_meta\": {\"title\": \"LivePortrait Cropper\"}}, \"198\": {\"inputs\": {\"landmarkrunner_onnx_device\": \"torch_gpu\", \"keep_model_loaded\": true}, \"class_type\": \"LivePortraitLoadMediaPipeCropper\", \"_meta\": {\"title\": \"LivePortrait Load MediaPipeCropper\"}}, \"201\": {\"inputs\": {\"face_detector\": \"blazeface_back_camera\", \"landmarkrunner_device\": \"torch_gpu\", \"face_detector_device\": \"cuda\", \"face_detector_dtype\": \"fp16\", \"keep_model_loaded\": true}, \"class_type\": \"LivePortraitLoadFaceAlignmentCropper\", \"_meta\": {\"title\": \"LivePortrait Load FaceAlignmentCropper\"}}}b\\xaeHb\\x00\\x00\\x1b\\xe7IDATx^\\xed\\xdd]s\\xabX\\x92\\x05P@\\xaa\\x88\\xfe\\xff\\x7f\\xb7,\\x98\\x874\\xe9\\xd49\\xc8\\xd7\\xd53\\x15\\x13V\\xae\\xf5@\\'\\x08\\x0er?\\xec\\xad\\x0f_\\xd7\\xfa\\x9f\\xff\\xfcgY\\x96\\xf5T\\xe7K\\xdb\\xb6}\\xb3[\\xe5Ru\\x889\\xb7i\\xd8\\x05xo\\xc7q\\xcc\\xbby\\xf08\\x8e\\xdf\\x01\\xccj\\x8eo\\xdb\\x96q?\\xa4\\x7f\\x9eV\\x8f\\xcf\\xe2I,\\xcf\\x05\\x10\\xdbP\\xe7WG\\x00~\\xa9\\xc8\\xe5WG\\xe6\\x04\\x8f\\xbc\\x8e\\xac\\xaf\\xb6m\\x8b\\xc4_K\\x13\\xe4\\xa7=\\xb1\\xadK\\x1dg\\xf4G\\x14\\xe7\\xa3\\x11\\xb0\\xd7\\x050\\xc7z\\x1d\\xe6\\x83\\xf3\\x99\\x97\\xf2I\\xc4\\x10?\\xf9<\\x00\\xbc\\xb7\\x08\\xe8y\\x88\\xc8\\xcea\\x96\\x9f\\xf9\\xc46v\\xd7\\xe7\\xf4\\xaf\\xab\\xe5\\x87B\\xdb\\xf9\\x06\"N\\x08\\x17\\x05\\xf0*\\xd6\\xabz0\\xe7:|c\\x99\\xde\\x01\\x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cc\\xe889\\xde\\x07\\xc4\\xeb\\xfd\\x18\\xe2x\\x15\\x97\\xd49\\xb7\\x97\\x03@\\x07s\\xd8f4\\xc76\\xd49\\r\\xe1\\xfe\\xfd\\xee+\\xcb\\xb2|}\\x04\\xb4\\x96\\xf4\\xcf\\x83a/\\x1f\\x07\\xe56\\xaf\\x8as.\\xd3?\\x1e\\xads\\xee\\x9ek\\x7f\\xaaG\\xe6G\\x01\\xde\\xc0\\xab\\x8c\\xcd#y\\xf03\\xa4_\\x14\\xc0q\\x1c\\xf1\\x8a<\\x13\\xbf\\xceyB=\\x7f\\xb6,\\xcb\\xff\\x00Q\\xb3\\x85\\xf9\\xf1=%\\xd1\\x00\\x00\\x00\\x00IEND\\xaeB`\\x82'],\n", " '181': [],\n", " '168': [],\n", " '182': []}" ] }, "execution_count": 61, "metadata": {}, "output_type": "execute_result" } ], "source": [ "images" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "ai", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 2 }