app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: comfyui
  use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
workflow:
  conversation_variables: []
  environment_variables:
  - description: ''
    id: d5f26c22-a359-4dd8-be9c-5ea566158135
    name: OSS_URL
    selector:
    - env
    - OSS_URL
    value: https:///
    value_type: string
  - description: ''
    id: aa12231c-b9c9-41ba-97ae-39ebfd6e64a9
    name: EAS_Token
    selector:
    - env
    - EAS_Token
    value: NzAwZWMwOG
    value_type: string
  - description: ''
    id: 613a0f2d-3de0-4ab8-b1df-ccdc001ec5f7
    name: EAS_URL
    selector:
    - env
    - EAS_URL
    value: http://
    value_type: string
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        image_file_size_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 3
    opening_statement: ''
    retriever_resource:
      enabled: true
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: http-request
        targetType: code
      id: 1753684277809-source-1753685026220-target
      selected: false
      source: '1753684277809'
      sourceHandle: source
      target: '1753685026220'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: code
        targetType: template-transform
      id: 1753686095898-source-1753690260920-target
      selected: false
      source: '1753686095898'
      sourceHandle: source
      target: '1753690260920'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: template-transform
        targetType: answer
      id: 1753690260920-source-1753690314642-target
      selected: false
      source: '1753690260920'
      sourceHandle: source
      target: '1753690314642'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: loop
        targetType: http-request
      id: 1753694597441-source-1753685667305-target
      source: '1753694597441'
      sourceHandle: source
      target: '1753685667305'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: http-request
        targetType: code
      id: 1753685667305-source-1753686095898-target
      source: '1753685667305'
      sourceHandle: source
      target: '1753686095898'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: true
        loop_id: '1753694597441'
        sourceType: loop-start
        targetType: http-request
      id: 1753694597441start-source-1753754991932-target
      source: 1753694597441start
      sourceHandle: source
      target: '1753754991932'
      targetHandle: target
      type: custom
      zIndex: 1002
    - data:
        isInLoop: false
        sourceType: template-transform
        targetType: http-request
      id: 1753777332689-source-1753684277809-target
      source: '1753777332689'
      sourceHandle: source
      target: '1753684277809'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: template-transform
        targetType: loop
      id: 1753777460894-source-1753694597441-target
      source: '1753777460894'
      sourceHandle: source
      target: '1753694597441'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: template-transform
      id: 1753685026220-source-1753777460894-target
      source: '1753685026220'
      sourceHandle: source
      target: '1753777460894'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: start
        targetType: template-transform
      id: 1753681428111-source-1753777332689-target
      source: '1753681428111'
      sourceHandle: source
      target: '1753777332689'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: true
        loop_id: '1753694597441'
        sourceType: http-request
        targetType: code
      id: 1753754991932-source-1753699053363-target
      source: '1753754991932'
      sourceHandle: source
      target: '1753699053363'
      targetHandle: target
      type: custom
      zIndex: 1002
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: positive_prompt
          max_length: 10000
          options: []
          required: true
          type: paragraph
          variable: positive_prompt
        - label: negative_prompt
          max_length: 10000
          options: []
          required: true
          type: paragraph
          variable: negative_prompt
      height: 116
      id: '1753681428111'
      position:
        x: -64.94955335891808
        y: 146.93442127866382
      positionAbsolute:
        x: -64.94955335891808
        y: 146.93442127866382
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config: null
          type: no-auth
        body:
          data:
          - id: key-value-418
            key: ''
            type: text
            value: "{\n\"prompt\":\n{\n  \"3\": {\n    \"inputs\": {\n      \"seed\"\
              : 655238881786183,\n      \"steps\": 30,\n      \"cfg\": 6,\n      \"\
              sampler_name\": \"uni_pc\",\n      \"scheduler\": \"simple\",\n    \
              \  \"denoise\": 1,\n      \"model\": [\n        \"48\",\n        0\n\
              \      ],\n      \"positive\": [\n        \"6\",\n        0\n      ],\n\
              \      \"negative\": [\n        \"7\",\n        0\n      ],\n      \"\
              latent_image\": [\n        \"40\",\n        0\n      ]\n    },\n   \
              \ \"class_type\": \"KSampler\",\n    \"_meta\": {\n      \"title\":\
              \ \"K采样器\"\n    }\n  },\n  \"6\": {\n    \"inputs\": {\n      \"text\"\
              : \"{{#1753681428111.positive_prompt#}}\",\n      \"clip\": [\n    \
              \    \"38\",\n        0\n      ]\n    },\n    \"class_type\": \"CLIPTextEncode\"\
              ,\n    \"_meta\": {\n      \"title\": \"CLIP Text Encode (Positive Prompt)\"\
              \n    }\n  },\n  \"7\": {\n    \"inputs\": {\n      \"text\": \"{{#1753681428111.negative_prompt#}}\"\
              ,\n      \"clip\": [\n        \"38\",\n        0\n      ]\n    },\n\
              \    \"class_type\": \"CLIPTextEncode\",\n    \"_meta\": {\n      \"\
              title\": \"CLIP Text Encode (Negative Prompt)\"\n    }\n  },\n  \"8\"\
              : {\n    \"inputs\": {\n      \"samples\": [\n        \"3\",\n     \
              \   0\n      ],\n      \"vae\": [\n        \"39\",\n        0\n    \
              \  ]\n    },\n    \"class_type\": \"VAEDecode\",\n    \"_meta\": {\n\
              \      \"title\": \"VAE解码\"\n    }\n  },\n  \"28\": {\n    \"inputs\"\
              : {\n      \"filename_prefix\": \"ComfyUI\",\n      \"fps\": 16,\n \
              \     \"lossless\": \"false\",\n      \"quality\": 90,\n      \"method\"\
              : \"default\",\n      \"images\": [\n        \"8\",\n        0\n   \
              \   ]\n    },\n    \"class_type\": \"SaveAnimatedWEBP\",\n    \"_meta\"\
              : {\n      \"title\": \"保存动画（WEBP）\"\n    }\n  },\n  \"37\": {\n   \
              \ \"inputs\": {\n      \"unet_name\": \"WanVideo/Phantom-Wan-1_3B_fp16.safetensors\"\
              ,\n      \"weight_dtype\": \"default\"\n    },\n    \"class_type\":\
              \ \"UNETLoader\",\n    \"_meta\": {\n      \"title\": \"UNet加载器\"\n\
              \    }\n  },\n  \"38\": {\n    \"inputs\": {\n      \"clip_name\": \"\
              umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n      \"type\": \"wan\",\n\
              \      \"device\": \"default\"\n    },\n    \"class_type\": \"CLIPLoader\"\
              ,\n    \"_meta\": {\n      \"title\": \"加载CLIP\"\n    }\n  },\n  \"\
              39\": {\n    \"inputs\": {\n      \"vae_name\": \"wan_2.1_vae.safetensors\"\
              \n    },\n    \"class_type\": \"VAELoader\",\n    \"_meta\": {\n   \
              \   \"title\": \"加载VAE\"\n    }\n  },\n  \"40\": {\n    \"inputs\":\
              \ {\n      \"width\": 832,\n      \"height\": 480,\n      \"length\"\
              : 33,\n      \"batch_size\": 1\n    },\n    \"class_type\": \"EmptyHunyuanLatentVideo\"\
              ,\n    \"_meta\": {\n      \"title\": \"空Latent视频（混元）\"\n    }\n  },\n\
              \  \"48\": {\n    \"inputs\": {\n      \"shift\": 8,\n      \"model\"\
              : [\n        \"37\",\n        0\n      ]\n    },\n    \"class_type\"\
              : \"ModelSamplingSD3\",\n    \"_meta\": {\n      \"title\": \"采样算法（SD3）\"\
              \n    }\n  }\n}\n}"
          type: json
        desc: ''
        headers: 'Content-Type:application/json

          Authorization:{{#env.EAS_Token#}}'
        method: post
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        ssl_verify: true
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 获取post请求
        type: http-request
        url: '{{#1753777332689.output#}}'
        variables: []
      height: 127
      id: '1753684277809'
      position:
        x: 372.39167092897867
        y: 358.70749888523295
      positionAbsolute:
        x: 372.39167092897867
        y: 358.70749888523295
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "\ndef main(arg: str) -> dict:\n    data = json.loads(arg)\n    return\
          \ {\"result\": data[\"prompt_id\"]}"
        code_language: python3
        desc: ''
        outputs:
          result:
            children: null
            type: string
        selected: false
        title: 获取prompt_id
        type: code
        variables:
        - value_selector:
          - '1753684277809'
          - body
          value_type: string
          variable: arg
      height: 54
      id: '1753685026220'
      position:
        x: 673.2319740439839
        y: 358.70749888523295
      positionAbsolute:
        x: 673.2319740439839
        y: 358.70749888523295
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config: null
          type: no-auth
        body:
          data: []
          type: none
        desc: ''
        headers: Authorization:{{#env.EAS_Token#}}
        method: get
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        ssl_verify: true
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 获取结果
        type: http-request
        url: '{{#1753777460894.output#}}'
        variables: []
      height: 127
      id: '1753685667305'
      position:
        x: 66.98188824499289
        y: 990.669916920522
      positionAbsolute:
        x: 66.98188824499289
        y: 990.669916920522
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "import json\n\ndef main(input_str: str) -> dict:\n    data = json.loads(input_str)\n\
          \    images = []\n    image_names = []\n    first_key = next(iter(data))\n\
          \    status = data[first_key][\"status\"]\n    \n    if status[\"completed\"\
          ] and status[\"status_str\"] == \"success\":\n        images = data[first_key][\"\
          outputs\"][\"28\"][\"images\"]\n    \n    for img in images:\n        image_names.append(img[\"\
          filename\"])\n    \n    # 将列表转换为字符串\n    image_names_str = \",\".join(image_names)\n\
          \    \n    return {\n        \"result\": image_names_str,\n    }"
        code_language: python3
        desc: ''
        outputs:
          result:
            children: null
            type: string
        selected: false
        title: 筛选结果
        type: code
        variables:
        - value_selector:
          - '1753685667305'
          - body
          value_type: string
          variable: input_str
      height: 54
      id: '1753686095898'
      position:
        x: 350.57775213096556
        y: 990.669916920522
      positionAbsolute:
        x: 350.57775213096556
        y: 990.669916920522
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ OSS_URL }}{{ arg1 }}'
        title: 模板转换
        type: template-transform
        variables:
        - value_selector:
          - '1753686095898'
          - result
          value_type: string
          variable: arg1
        - value_selector:
          - env
          - OSS_URL
          variable: OSS_URL
      height: 54
      id: '1753690260920'
      position:
        x: 673.2319740439839
        y: 990.669916920522
      positionAbsolute:
        x: 673.2319740439839
        y: 990.669916920522
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '![这是图片]({{#1753690260920.output#}})'
        desc: ''
        selected: false
        title: 直接回复
        type: answer
        variables: []
      height: 121
      id: '1753690314642'
      position:
        x: 1080.7347142869273
        y: 990.669916920522
      positionAbsolute:
        x: 1080.7347142869273
        y: 990.669916920522
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        break_conditions:
        - comparison_operator: contains
          id: 98cd9289-ace4-45d7-80ad-165ac7e51e0e
          value: prompt_id
          varType: string
          variable_selector:
          - '1753754991932'
          - body
        desc: ''
        error_handle_mode: terminated
        height: 284
        logical_operator: or
        loop_count: 50
        loop_variables: []
        selected: false
        start_node_id: 1753694597441start
        title: 判断执行是否结束
        type: loop
        width: 545
      height: 284
      id: '1753694597441'
      position:
        x: 372.39167092897867
        y: 581.3047704974373
      positionAbsolute:
        x: 372.39167092897867
        y: 581.3047704974373
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 545
      zIndex: 1
    - data:
        desc: ''
        isInLoop: true
        selected: false
        title: ''
        type: loop-start
      draggable: false
      height: 48
      id: 1753694597441start
      parentId: '1753694597441'
      position:
        x: 60
        y: 63
      positionAbsolute:
        x: 432.39167092897867
        y: 644.3047704974373
      selectable: false
      sourcePosition: right
      targetPosition: left
      type: custom-loop-start
      width: 44
      zIndex: 1002
    - data:
        code: "\nimport time\n\ndef main()-> dict:\n    time.sleep(12)\n    return\
          \ {\n        \"result\": \"\"\n    }"
        code_language: python3
        desc: ''
        isInIteration: false
        isInLoop: true
        loop_id: '1753694597441'
        outputs:
          result:
            children: null
            type: string
        selected: false
        title: 等待十分钟
        type: code
        variables: []
      height: 54
      id: '1753699053363'
      parentId: '1753694597441'
      position:
        x: 189.40144844313704
        y: 205.90981189917227
      positionAbsolute:
        x: 561.7931193721157
        y: 787.2145823966096
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
      zIndex: 1002
    - data:
        authorization:
          config: null
          type: no-auth
        body:
          data: []
          type: none
        desc: ''
        headers: Authorization:{{#env.EAS_Token#}}
        isInIteration: false
        isInLoop: true
        loop_id: '1753694597441'
        method: get
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        ssl_verify: true
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 获取prompt_id执行内容
        type: http-request
        url: '{{#1753777460894.output#}}'
        variables: []
      height: 127
      id: '1753754991932'
      parentId: '1753694597441'
      position:
        x: 186.60197122712225
        y: 65
      positionAbsolute:
        x: 558.9936421561009
        y: 646.3047704974373
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
      zIndex: 1002
    - data:
        author: Dify
        desc: ''
        height: 252
        selected: false
        showAuthor: true
        text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"font-size:
          14px;","text":"Post获取Prompt ID","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textStyle":"font-size:
          14px;","textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1,"textStyle":"font-size:
          14px;"}}'
        theme: blue
        title: ''
        type: ''
        width: 1096
      height: 252
      id: '1753770546603'
      position:
        x: -53.186001811206665
        y: 298.48403310356025
      positionAbsolute:
        x: -53.186001811206665
        y: 298.48403310356025
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom-note
      width: 1096
    - data:
        author: Dify
        desc: ''
        height: 282
        selected: false
        showAuthor: true
        text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Get获取filename","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0,"textStyle":""}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
        theme: blue
        title: ''
        type: ''
        width: 1096
      height: 282
      id: '1753770624169'
      position:
        x: -53.186001811206665
        y: 899.599122535622
      positionAbsolute:
        x: -53.186001811206665
        y: 899.599122535622
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom-note
      width: 1096
    - data:
        author: Dify
        desc: ''
        height: 330
        selected: false
        showAuthor: true
        text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"保证生成完成","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0,"textStyle":""}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
        theme: pink
        title: ''
        type: ''
        width: 1096
      height: 330
      id: '1753770707816'
      position:
        x: -53.186001811206665
        y: 563.0809904045228
      positionAbsolute:
        x: -53.186001811206665
        y: 563.0809904045228
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom-note
      width: 1096
    - data:
        desc: ''
        selected: false
        template: '{{ eas_prompt_url }}prompt'
        title: PromptID_url
        type: template-transform
        variables:
        - value_selector:
          - env
          - EAS_URL
          value_type: string
          variable: eas_prompt_url
      height: 54
      id: '1753777332689'
      position:
        x: 71.9428262428379
        y: 358.70749888523295
      positionAbsolute:
        x: 71.9428262428379
        y: 358.70749888523295
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ eas_filename_urlfilename }}history/{{ result }}'
        title: Filename_URL
        type: template-transform
        variables:
        - value_selector:
          - env
          - EAS_URL
          value_type: string
          variable: eas_filename_urlfilename
        - value_selector:
          - '1753685026220'
          - result
          variable: result
      height: 54
      id: '1753777460894'
      position:
        x: 66.98188824499289
        y: 574.1469413209888
      positionAbsolute:
        x: 66.98188824499289
        y: 574.1469413209888
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 436.77718090265694
      y: -4.435086210407576
      zoom: 0.6332007822940441
