### Install Transformers Library Source: https://learn.thinkdiffusion.com/automatic1111-in-the-cloud-guide Command to install the Hugging Face transformers library. ```bash pip install transformers ``` -------------------------------- ### Launch Automatic1111 Source: https://learn.thinkdiffusion.com/automatic1111-in-the-cloud-guide Command to start the web interface. ```bash python launch.py ``` -------------------------------- ### Load Image Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/04/Video2Video-Wan-Style-Transfer.json Sets up the image loading node for the starting frame of the video-to-video process. ```json { "id": 63, "type": "LoadImage", "pos": [ -1498.0606689453125, -1153.4552001953125 ], "size": [ 350, 350 ], "flags": { "collapsed": false }, "order": 42, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 94 ] }, { "name": "MASK", "type": "MASK", "links": null } ], "title": "Load Image: Start image", "properties": { "cnr_id": "comfy-core", "ver": "0.3.27", "Node name for S&R": "LoadImage" }, "widgets_values": [ "t2i_00018_.png", "image", "" ], "color": "#2a363b", "bgcolor": "#3f5159" } ``` -------------------------------- ### Install InsightFace dependency Source: https://learn.thinkdiffusion.com/face-swapping-with-roop Run this command in a command window to install the required InsightFace package for face swapping functionality. ```bash pip install insightface==0.7.3 ``` -------------------------------- ### Configure Automatic1111 Paths Source: https://learn.thinkdiffusion.com/automatic1111-in-the-cloud-guide Example of setting command line arguments for custom model and output directories. ```bash set COMMANDLINE_ARGS=--ckpt-dir /path/to/models --outdir /path/to/outputs ``` -------------------------------- ### ComfyUI Node Configuration Examples Source: https://learn.thinkdiffusion.com/content/files/2025/09/ThinkDiffusion-StableDiffusion-ComfyUI-Reference2Video-VACE-Control-with-Reference-FIXED-2.json JSON definitions for WanVideoSampler, GetNode, and AddLabel nodes used in ComfyUI workflows. ```json { "name": "fantasytalking_embeds", "shape": 7, "type": "FANTASYTALKING_EMBEDS", "link": null }, { "name": "uni3c_embeds", "shape": 7, "type": "UNI3C_EMBEDS", "link": null }, { "name": "multitalk_embeds", "shape": 7, "type": "MULTITALK_EMBEDS", "link": null }, { "name": "freeinit_args", "shape": 7, "type": "FREEINITARGS", "link": null }, { "name": "teacache_args", "shape": 7, "type": "TEACACHEARGS", "link": 334 } ], "outputs": [ { "name": "samples", "type": "LATENT", "links": [ 298 ] }, { "name": "denoised_samples", "type": "LATENT", "links": null } ], "properties": { "cnr_id": "ComfyUI-WanVideoWrapper", "ver": "2d2a184723dae88388e130659f51c36fcadeaba8", "Node name for S&R": "WanVideoSampler", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 20, 4.000000000000001, 8.000000000000002, 267786354346554, "randomize", true, "unipc", 0, 1, false, "comfy", 0, -1, false ] }, { "id": 166, "type": "GetNode", "pos": [ 2469.59619140625, -1097.7593994140625 ], "size": [ 210, 58 ], "flags": { "collapsed": true }, "order": 17, "mode": 0, "inputs": [], "outputs": [ { "name": "WANVAE", "type": "WANVAE", "links": [ 297 ] } ], "title": "Get_WanVAE", "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "WanVAE" ], "color": "#322", "bgcolor": "#533" }, { "id": 153, "type": "GetNode", "pos": [ 2529.59619140625, -867.7593994140625 ], "size": [ 233.0802459716797, 60.23356246948242 ], "flags": { "collapsed": true }, "order": 18, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 319 ] } ], "title": "Get_reference_image", "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "reference_image" ], "color": "#2a363b", "bgcolor": "#3f5159" }, { "id": 250, "type": "GetNode", "pos": [ 2539.59619140625, -807.7593994140625 ], "size": [ 257.8947448730469, 58 ], "flags": { "collapsed": true }, "order": 19, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 456 ] } ], "title": "Get_original_video", "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "original_video" ], "color": "#2a363b", "bgcolor": "#3f5159" }, { "id": 156, "type": "AddLabel", "pos": [ 2579.59619140625, -857.7593994140625 ], "size": [ 315, 274 ], "flags": { "collapsed": true }, "order": 33, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 319 }, { "name": "caption", "shape": 7, "type": "STRING", "link": null } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 290 ] } ], "properties": { "cnr_id": "comfyui-kjnodes", "ver": "52c2e31a903fec2dd654fb614ea82ba2757d5028", "Node name for S&R": "AddLabel", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 10, 2, 48, 32, "white", "black", "FreeMono.ttf" ``` -------------------------------- ### Preview Image Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/04/Style-Transfer-Dance-Noodle-1.json Sets up a node to preview images with custom background overrides. ```json { "id": 210, "type": "PreviewImage", "pos": [ -2470, 1920 ], "size": [ 223.60797119140625, 246 ], "flags": {}, "order": 48, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 472, "slot_index": 0 } ], "outputs": [], "title": "Preview Mask", "properties": { "Node name for S&R": "PreviewImage", "ttNbgOverride": { "color": "#222", "bgcolor": "#000", "groupcolor": "#444" } }, "widgets_values": [], "color": "#222", "bgcolor": "#000" } ``` -------------------------------- ### Get Width Node Source: https://learn.thinkdiffusion.com/content/files/2025/08/ThinkDiffusion-StableDiffusion-ComfyUI-Image2Video-Wan-Uni3C-FIXED-2.json A collapsed utility node used to retrieve the width parameter. ```json { "id": 178, "type": "GetNode", "pos": [ -772.6264038085938, -1570 ], "size": [ 210, 58 ], "flags": { "collapsed": true }, "order": 5, "mode": 0, "inputs": [], "outputs": [ { "label": "WANVAE", "name": "INT", "type": "INT", "links": [ 219 ] } ], "title": "Get_width", "properties": {}, "widgets_values": [ "width" ], "color": "#1b4669", "bgcolor": "#29699c" } ``` -------------------------------- ### Clone and Navigate Automatic1111 Repository Source: https://learn.thinkdiffusion.com/automatic1111-in-the-cloud-guide Commands to download the repository and enter the directory. ```bash git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git cd stable-diffusion-webui ``` -------------------------------- ### Preview Image Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/01/ThinkDiffusion-StableDiffusion-ComfyUI-Style-Transfer-Dance-Noodle.json Sets up a node to display image outputs within the ComfyUI workspace. ```json { "id": 210, "type": "PreviewImage", "pos": [ -2470, 1920 ], "size": [ 223.60797119140625, 246 ], "flags": {}, "order": 48, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 472, "slot_index": 0 } ], "outputs": [], "title": "Preview Mask", "properties": { "Node name for S&R": "PreviewImage", "ttNbgOverride": { "color": "#222", "bgcolor": "#000", "groupcolor": "#444" } }, "widgets_values": [], "color": "#222", "bgcolor": "#000" } ``` -------------------------------- ### Get and Set Node Configurations Source: https://learn.thinkdiffusion.com/content/files/2025/09/ThinkDiffusion-StableDiffusion-ComfyUI-Wan2.1-InfiniteTalk_V2V.json JSON definitions for GetNode and SetNode utility nodes used for managing workflow variables. ```json { "id": 272, "type": "GetNode", "pos": [ 2054.598876953125, -2717.357666015625 ], "size": [ 210, 60 ], "flags": { "collapsed": true }, "order": 12, "mode": 0, "inputs": [], "outputs": [ { "name": "INT", "type": "INT", "links": [ 544 ] } ], "title": "Get_max_frames", "properties": {}, "widgets_values": [ "max_frames" ], "color": "#1b4669", "bgcolor": "#29699c" }, { "id": 253, "type": "SetNode", "pos": [ 2048.661865234375, -2716.11669921875 ], "size": [ 210, 60 ], "flags": { "collapsed": true }, "order": 37, "mode": 0, "inputs": [ { "name": "AUDIO", "type": "AUDIO", ``` -------------------------------- ### Get Image Size and Count Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/03/ThinkDiffusion-StableDiffusion-ComfyUI-Hunyuan-Video2Video.json Configuration for the GetImageSizeAndCount node used to extract metadata from input images. ```json { "id": 39, "type": "GetImageSizeAndCount", "pos": [ -309.3996887207031, -284.49066162109375 ], "size": [ 277.20001220703125, 86 ], "flags": { "collapsed": true }, "order": 13, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 81 } ], "outputs": [ { "name": "image", "type": "IMAGE", "links": [ 49, 58 ], "slot_index": 0 }, { "name": "width", "label": "768 width", "type": "INT", "links": [ 55 ], "slot_index": 1 }, { "name": "height", "label": "448 height", "type": "INT", "links": [ 56 ], "slot_index": 2 }, { "name": "count", "label": "21 count", "type": "INT", "links": [ 57 ], "slot_index": 3 } ], "properties": { "Node name for S&R": "GetImageSizeAndCount" }, "widgets_values": [] } ``` -------------------------------- ### Define ComfyUI Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2024/06/TD_Odyssey.json Example of a node definition within a ComfyUI workflow, showing properties, widget values, and input/output connections. ```json ], "properties": { "Node name for S&R": "CLIPTextEncode" }, "widgets_values": [ "ugly, deformed, bad lighting, blurry, text, watermark, extra hands, bad quality, deformed hands, deformed fingers, nostalgic, drawing, painting, bad anatomy, worst quality, blurry, blurred, normal quality, bad focus, tripod, three legs, weird legs, short legs" ], "color": "#322", "bgcolor": "#533" }, { "id": 111, "type": "VHS_LoadVideo", "pos": [ -991, -998 ], "size": [ 235.1999969482422, 658.5777723524305 ], "flags": {}, "order": 8, "mode": 0, "inputs": [ { "name": "meta_batch", "type": "VHS_BatchManager", "link": null } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 230 ], "shape": 3, "slot_index": 0 }, { "name": "frame_count", "type": "INT", "links": null, "shape": 3 }, { "name": "audio", "type": "VHS_AUDIO", "links": null, "shape": 3 }, { "name": "video_info", "type": "VHS_VIDEOINFO", "links": null, "shape": 3 } ], "properties": { "Node name for S&R": "VHS_LoadVideo" }, "widgets_values": { "video": "main.mp4", "force_rate": 0, "force_size": "Disabled", "custom_width": 520, "custom_height": 512, "frame_load_cap": 12, "skip_first_frames": 0, "select_every_nth": 1, "choose video to upload": "image", "videopreview": { "hidden": false, "paused": false, "params": { "frame_load_cap": 12, "skip_first_frames": 0, "force_rate": 0, "filename": "main.mp4", "type": "input", "format": "video/mp4", "select_every_nth": 1, "force_size": "Disabled" } } } } ``` -------------------------------- ### GetNode Configurations Source: https://learn.thinkdiffusion.com/content/files/2025/04/ThinkDiffusion-StableDiffusion-ComfyUI-Vid2Vid-Wan-ReCamMaster-v3.json Configurations for retrieving WanVideo model and text embedding nodes. ```json { "id": 141, "type": "GetNode", "pos": [ 692.23876953125, -729.8995971679688 ], "size": [ 210, 60 ], "flags": { "collapsed": true }, "order": 26, "mode": 0, "inputs": [], "outputs": [ { "label": "WANVIDEOMODEL", "name": "MODEL", "type": "MODEL", "links": [ 407 ] } ], "title": "Get_wan_model", "properties": {}, "widgets_values": [ "wan_model" ], "color": "#223", "bgcolor": "#335" } ``` ```json { "id": 143, "type": "GetNode", "pos": [ 669.94970703125, -589.6582641601562 ], "size": [ 250.43063354492188, 58 ], "flags": { "collapsed": true }, "order": 27, "mode": 0, "inputs": [], "outputs": [ { "label": "WANVIDEOTEXTEMBEDS", "name": "WANVIDEOTEXTEMBEDS", "type": "WANVIDEOTEXTEMBEDS", "links": [ 267 ] } ], "title": "Get_wan_txt_embeds", "properties": {}, "widgets_values": [ "wan_txt_embeds" ], "color": "#432", "bgcolor": "#653" } ``` -------------------------------- ### Wan Video Model Loader Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/04/ThinkDiffusion-StableDiffusion-ComfyUI-Video2Video-Wan-Style-Transfer.json Configuration for loading the Wan Video model with specific device and precision settings. ```json { "id": 22, "type": "WanVideoModelLoader", "pos": [ -1127.0413818359375, -996.92724609375 ], "size": [ 398.23052978515625, 234 ], "flags": {}, "order": 22, "mode": 0, "inputs": [ { "name": "compile_args", "shape": 7, "type": "WANCOMPILEARGS", "link": null }, { "name": "block_swap_args", "shape": 7, "type": "BLOCKSWAPARGS", "link": null }, { "name": "lora", "shape": 7, "type": "WANVIDLORA", "link": null }, { "name": "vram_management_args", "shape": 7, "type": "VRAM_MANAGEMENTARGS", "link": null }, { "name": "vace_model", "shape": 7, "type": "VACEPATH", "link": null } ], "outputs": [ { "name": "model", "type": "WANVIDEOMODEL", "slot_index": 0, "links": [ 29, 103 ] } ], "properties": { "cnr_id": "ComfyUI-WanVideoWrapper", "ver": "d20baf00247fd06553fdc9253e18732244e54172", "Node name for S&R": "WanVideoModelLoader" }, "widgets_values": [ "Wan2.1-Fun-Control-14B_fp8_e4m3fn.safetensors", "fp16", "fp8_e4m3fn", "offload_device", "sdpa" ], "color": "#323", "bgcolor": "#535" } ``` -------------------------------- ### WanVideoExperimentalArgs Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/09/ThinkDiffusion-StableDiffusion-ComfyUI-Reference2Video-VACE-Control-with-Reference-FIXED-2.json Configuration for the WanVideoExperimentalArgs node, defining various experimental parameters. ```json { "id": 150, "type": "WanVideoExperimentalArgs", "pos": [ 1679.595947265625, -337.7593994140625 ], "size": [ 327.5999755859375, 298 ], "flags": {}, "order": 16, "mode": 0, "inputs": [], "outputs": [ { "name": "exp_args", "type": "EXPERIMENTALARGS", "links": [ 306 ] } ], "properties": { "cnr_id": "ComfyUI-WanVideoWrapper", "ver": "2d2a184723dae88388e130659f51c36fcadeaba8", "Node name for S&R": "WanVideoExperimentalArgs", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "", true, false, 0, false, 1, 1.25, 20, false, 0, false ] } ``` -------------------------------- ### Configure DownloadAndLoadCogVideoModel Node Source: https://learn.thinkdiffusion.com/content/files/2024/12/ThinkDiffusion-StableDiffusion-ComfyUI-CogVideoX.json Sets up the model loader for CogVideoX, specifying the model repository and device settings. ```json { "id": 59, "type": "DownloadAndLoadCogVideoModel", "pos": [ 471, 66 ], "size": [ 315, 218 ], "flags": {}, "order": 6, "mode": 0, "inputs": [ { "name": "block_edit", "type": "TRANSFORMERBLOCKS", "link": null, "shape": 7 }, { "name": "lora", "type": "COGLORA", "link": null, "shape": 7 }, { "name": "compile_args", "type": "COMPILEARGS", "link": null, "shape": 7 } ], "outputs": [ { "name": "model", "type": "COGVIDEOMODEL", "links": [ 144 ] }, { "name": "vae", "type": "VAE", "links": [ 132, 141 ], "slot_index": 1 } ], "properties": { "Node name for S&R": "DownloadAndLoadCogVideoModel" }, "widgets_values": [ "kijai/CogVideoX-5b-1.5-I2V", "bf16", "disabled", false, "sdpa", "main_device" ], "color": "#323", "bgcolor": "#535" } ``` -------------------------------- ### Video Preview Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/04/ThinkDiffusion-StableDiffusion-ComfyUI-Vid2Vid_Depth_Control_LoRA_Comfy_v0329.json Configuration object for a video preview node, defining output paths and format settings. ```json "save_metadata": true, "trim_to_audio": false, "pingpong": false, "save_output": true, "videopreview": { "hidden": false, "paused": false, "params": { "filename": "WanVideo_00064.mp4", "subfolder": "", "type": "output", "format": "video/h264-mp4", "frame_rate": 16, "workflow": "WanVideo_00064.png", "fullpath": "/home/ubuntu/user_data/comfyui/outputs/WanVideo_00064.mp4" } } } } ``` -------------------------------- ### PreviewImage Node Configurations Source: https://learn.thinkdiffusion.com/content/files/2025/01/ThinkDiffusion_Character_Consistency_Flux.json Configurations for PreviewImage nodes used to display output images. ```json { "id": 356, "type": "PreviewImage", "pos": [ -1405.7767333984375, 937.5159912109375 ], "size": [ 429.7591247558594, 487.59930419921875 ], "flags": {}, "order": 42, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 703 } ], "outputs": [], "properties": { "Node name for S&R": "PreviewImage" }, "widgets_values": [] } ``` ```json { "id": 140, "type": "PreviewImage", "pos": [ -471.7761535644531, 907.5160522460938 ], "size": [ 466.0791320800781, 510.5869445800781 ], "flags": {}, "order": 47, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 285 } ], "outputs": [], "properties": { "Node name for S&R": "PreviewImage" }, "widgets_values": [] } ``` -------------------------------- ### WanVideoVAELoader Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/04/Video2Video-Wan-Style-Transfer.json Configuration for the WanVideoVAELoader node, specifying the VAE model file and precision settings. ```json "type": "WanVideoVAELoader", "pos": [ -1058.8778076171875, -715.0900268554688 ], "size": [ 290, 82 ], "flags": {}, "order": 23, "mode": 0, "inputs": [], "outputs": [ { "name": "vae", "type": "WANVAE", "slot_index": 0, "links": [ 239 ] } ], "properties": { "cnr_id": "ComfyUI-WanVideoWrapper", "ver": "d20baf00247fd06553fdc9253e18732244e54172", "Node name for S&R": "WanVideoVAELoader" }, "widgets_values": [ "Wan2_1_VAE_bf16.safetensors", "bf16" ], "color": "#323", "bgcolor": "#535" } ``` -------------------------------- ### Load Reference Video Node Configuration Source: https://learn.thinkdiffusion.com/content/files/2025/04/Video2Video-Wan-Style-Transfer.json Configuration for a UI node used to load reference video files. ```json { "allow_interaction": true }, "order": 19, "mode": 0, "inputs": [], "outputs": [], "title": "Load Reference Video", "properties": { "fontSize": 30, "fontFamily": "Arial", "fontColor": "#ffffff", "textAlign": "left", "backgroundColor": "transparent", "padding": 0, "borderRadius": 0 }, "color": "#fff0", "bgcolor": "#fff0" ```