Ultimate SD Upscale extension を利用して画像をアップスケールする

ホネダー
質問: アップスケールのための拡張機能の導入
Ultimate SD Upscale extensionという拡張機能でのアップスケール手順を知りたいです。

事前準備: Ultimate SD Upscale extension のインストール

Ultimate SD Upscale extensionをインストールします。手順の詳細はこちらの記事を参照して下さい。

設定

下図のワークフローを作成します。
Ultimate SD Upscale extension を利用して画像をアップスケールする:画像1

[拡大モデルを読み込む]ノードには "DAT_x4.pth" を指定します。アップスケーラーのモデルは (ComfyUIの配置ディレクトリ)\ComfyUI\models\upscale_models にアップスケーラーのモデルを配置します。
Ultimate SD Upscale extension を利用して画像をアップスケールする:画像2

[ControlNetモデルを読み込む]ノードでは"xinsir controlnet-union-sdxl-1.0 promax" (9460e4db) を選択しています。
また、ContolNet Unionのどの機能を利用するかは、[Union ControlNetタイプを設定]ノードを配置して設定します。今回は"tile"を選択しています。
Ultimate SD Upscale extension を利用して画像をアップスケールする:画像3

[ControlNetを適用]ノードの[強度]は1.0としておきます。(後ほど変更して違いを確認します)
Ultimate SD Upscale extension を利用して画像をアップスケールする:画像4

[Ultimate SD Upscale]ノードを配置しします。今回はデフォルトの値を利用します。[upscale_by] の値が "2"となっており2倍にアップスケールする設定です。
Ultimate SD Upscale extension を利用して画像をアップスケールする:画像5

プロンプトは以下を入力します。

Prompt
Prompt: Panoramic view of the fantasy like europe city from above, distant view, cloudy weather, grass in the foreground, wide view scene, dramatic lighting, anime style realistic image.
Negative prompt: worst quality


入力画像を設定して[実行する]ボタンをクリックし、画像生成を開始します。
入力画像は下図です。
Ultimate SD Upscale extension を利用して画像をアップスケールする:画像6

Ultimate SD Upscale extension を利用して画像をアップスケールする:画像7

右側の[画像を保存]ノードに画像が保存されます。
Ultimate SD Upscale extension を利用して画像をアップスケールする:画像8

結果は下図です。ControlNetの[強度]を変更した結果も掲載します。
ControlNetの強度を変更してもそれほど大きな違いは出ない状況です。

WAI-Illustrious v16.0 [ControlNet強度 1.0]
WAI-Illustrious v16.0 [ControlNet強度 1.0] - Ultimate SD Upscale extension を利用して画像をアップスケールする:画像9
WAI-Illustrious v16.0 [ControlNet強度 0.5]
WAI-Illustrious v16.0 [ControlNet強度 0.5] - Ultimate SD Upscale extension を利用して画像をアップスケールする:画像10
WAI-Illustrious v16.0 [ControlNet強度 0.25]
WAI-Illustrious v16.0 [ControlNet強度 0.25] - Ultimate SD Upscale extension を利用して画像をアップスケールする:画像11
Nova Anikme v14.0 [ControlNet強度 0.5]
Nova Anikme v14.0 [ControlNet強度 0.5] - Ultimate SD Upscale extension を利用して画像をアップスケールする:画像12
Nova Anikme v14.0 [ControlNet強度 0.25]
Nova Anikme v14.0 [ControlNet強度 0.25] - Ultimate SD Upscale extension を利用して画像をアップスケールする:画像13
Nova Anikme v14.0 [ControlNet強度 0.1]
Nova Anikme v14.0 [ControlNet強度 0.1] - Ultimate SD Upscale extension を利用して画像をアップスケールする:画像14

参考:ワークフローJSON

{
  "id": "4d7b3878-b691-4be4-9547-1afb0bf10eb0",
  "revision": 0,
  "last_node_id": 58,
  "last_link_id": 76,
  "nodes": [
    {
      "id": 4,
      "type": "CheckpointLoaderSimple",
      "pos": [
        -138.1042750512044,
        -1123.5009592325023
      ],
      "size": [
        420,
        190.65625
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "slot_index": 0,
          "links": [
            74
          ]
        },
        {
          "name": "CLIP",
          "type": "CLIP",
          "slot_index": 1,
          "links": [
            3,
            5
          ]
        },
        {
          "name": "VAE",
          "type": "VAE",
          "slot_index": 2,
          "links": [
            57,
            70
          ]
        }
      ],
      "title": "Load Checkpoint - BASE",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.33",
        "Node name for S&R": "CheckpointLoaderSimple",
        "models": [
          {
            "name": "sd_xl_base_1.0.safetensors",
            "url": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors?download=true",
            "directory": "checkpoints"
          }
        ]
      },
      "widgets_values": [
        ""
      ],
      "color": "#323",
      "bgcolor": "#535"
    },
    {
      "id": 7,
      "type": "CLIPTextEncode",
      "pos": [
        434.5537941417215,
        -927.331732034614
      ],
      "size": [
        477.0625,
        231.09375
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 5
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "slot_index": 0,
          "links": [
            65
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.33",
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        ""
      ],
      "color": "#322",
      "bgcolor": "#533"
    },
    {
      "id": 6,
      "type": "CLIPTextEncode",
      "pos": [
        428.7481790106368,
        -1151.979392478821
      ],
      "size": [
        486.109375,
        209.03125
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 3
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "slot_index": 0,
          "links": [
            64
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.33",
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        ""
      ],
      "color": "#232",
      "bgcolor": "#353"
    },
    {
      "id": 19,
      "type": "SaveImage",
      "pos": [
        1845.389141596063,
        -1198.850980665231
      ],
      "size": [
        469.046875,
        430.859375
      ],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 71
        }
      ],
      "outputs": [],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.33"
      },
      "widgets_values": [
        "ComfyUI"
      ]
    },
    {
      "id": 53,
      "type": "ControlNetApplyAdvanced",
      "pos": [
        1136.1966861204382,
        -926.6781437863856
      ],
      "size": [
        273,
        270
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 64
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 65
        },
        {
          "name": "control_net",
          "type": "CONTROL_NET",
          "link": 59
        },
        {
          "name": "image",
          "type": "IMAGE",
          "link": 76
        },
        {
          "name": "vae",
          "shape": 7,
          "type": "VAE",
          "link": 57
        }
      ],
      "outputs": [
        {
          "name": "positive",
          "type": "CONDITIONING",
          "links": [
            73
          ]
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "links": [
            72
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.6.0",
        "Node name for S&R": "ControlNetApplyAdvanced"
      },
      "widgets_values": [
        0.65,
        0,
        1
      ]
    },
    {
      "id": 54,
      "type": "ControlNetLoader",
      "pos": [
        -388.65216995159557,
        -609.1583187968763
      ],
      "size": [
        284,
        112.65625
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "CONTROL_NET",
          "type": "CONTROL_NET",
          "links": [
            58
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.6.0",
        "Node name for S&R": "ControlNetLoader"
      },
      "widgets_values": [
        "sdxl\\xinsir_controlnet-union-promax-sdxl-1.0.safetensors"
      ]
    },
    {
      "id": 55,
      "type": "LoadImage",
      "pos": [
        398.0725658662402,
        -598.8633815576198
      ],
      "size": [
        345.875,
        271.0625
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            66,
            76
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.6.0",
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "ComfyUI_00423_.png",
        "image"
      ]
    },
    {
      "id": 56,
      "type": "SetUnionControlNetType",
      "pos": [
        -38.82253430487913,
        -609.1943842109137
      ],
      "size": [
        298.15625,
        112.65625
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "control_net",
          "type": "CONTROL_NET",
          "link": 58
        }
      ],
      "outputs": [
        {
          "name": "CONTROL_NET",
          "type": "CONTROL_NET",
          "links": [
            59
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.6.0",
        "Node name for S&R": "SetUnionControlNetType"
      },
      "widgets_values": [
        "tile"
      ]
    },
    {
      "id": 57,
      "type": "UltimateSDUpscale",
      "pos": [
        1505.0781631477385,
        -1204.3271265533394
      ],
      "size": [
        277.859375,
        808.625
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 66
        },
        {
          "name": "model",
          "type": "MODEL",
          "link": 74
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 73
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 72
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 70
        },
        {
          "name": "upscale_model",
          "type": "UPSCALE_MODEL",
          "link": 75
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            71
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfyui_ultimatesdupscale",
        "ver": "1.6.2",
        "Node name for S&R": "UltimateSDUpscale"
      },
      "widgets_values": [
        2,
        693101596824987,
        "randomize",
        25,
        7,
        "dpmpp_sde",
        "karras",
        0.2,
        "Linear",
        512,
        512,
        8,
        32,
        "None",
        1,
        64,
        8,
        16,
        true,
        false
      ]
    },
    {
      "id": 58,
      "type": "UpscaleModelLoader",
      "pos": [
        779.7811484241928,
        -503.26416826540276
      ],
      "size": [
        270,
        112.65625
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "UPSCALE_MODEL",
          "type": "UPSCALE_MODEL",
          "links": [
            75
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.6.0",
        "Node name for S&R": "UpscaleModelLoader"
      },
      "widgets_values": [
        "DAT_x4.pth"
      ]
    }
  ],
  "links": [
    [
      3,
      4,
      1,
      6,
      0,
      "CLIP"
    ],
    [
      5,
      4,
      1,
      7,
      0,
      "CLIP"
    ],
    [
      57,
      4,
      2,
      53,
      4,
      "VAE"
    ],
    [
      58,
      54,
      0,
      56,
      0,
      "CONTROL_NET"
    ],
    [
      59,
      56,
      0,
      53,
      2,
      "CONTROL_NET"
    ],
    [
      64,
      6,
      0,
      53,
      0,
      "CONDITIONING"
    ],
    [
      65,
      7,
      0,
      53,
      1,
      "CONDITIONING"
    ],
    [
      66,
      55,
      0,
      57,
      0,
      "IMAGE"
    ],
    [
      70,
      4,
      2,
      57,
      4,
      "VAE"
    ],
    [
      71,
      57,
      0,
      19,
      0,
      "IMAGE"
    ],
    [
      72,
      53,
      1,
      57,
      3,
      "CONDITIONING"
    ],
    [
      73,
      53,
      0,
      57,
      2,
      "CONDITIONING"
    ],
    [
      74,
      4,
      0,
      57,
      1,
      "MODEL"
    ],
    [
      75,
      58,
      0,
      57,
      5,
      "UPSCALE_MODEL"
    ],
    [
      76,
      55,
      0,
      53,
      3,
      "IMAGE"
    ]
  ],
  "groups": [
    {
      "id": 1,
      "title": "Prompt",
      "bounding": [
        398.55396039862046,
        -1245.9142358525014,
        555.6272151066702,
        560.8541303585763
      ],
      "color": "#3f789e",
      "font_size": 24,
      "flags": {}
    },
    {
      "id": 4,
      "title": "Load SDXL Model",
      "bounding": [
        -180.1526636999355,
        -1247.2578247509878,
        489.5787386693701,
        385.3120706255023
      ],
      "color": "#a1309b",
      "font_size": 24,
      "flags": {}
    },
    {
      "id": 13,
      "title": "Load ControlNet",
      "bounding": [
        -431.27218000408584,
        -708.2051269221256,
        743.4487179487081,
        233.5769230769206
      ],
      "color": "#a1309b",
      "font_size": 24,
      "flags": {}
    }
  ],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.48431863198614916,
      "offset": [
        621.9445107442103,
        1474.7174862242912
      ]
    },
    "frontendVersion": "1.35.9",
    "workflowRendererVersion": "Vue"
  },
  "version": 0.4
}
AuthorPortraitAlt
著者
iPentecのメインデザイナー
Webページ、Webクリエイティブのデザインを担当。PhotoshopやIllustratorの作業もする。 最近は生成AIの画像生成の沼に沈んでいる。
作成日: 2024-06-10