Giter VIP home page Giter VIP logo

comfyflowapp's People

Contributors

rayadaschn avatar xingren23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

comfyflowapp's Issues

workflow解析不出来

在Creator模式下,上传工作流图片上去的时候,显示图片里没有工作流信息是为什么?

Sharing public using tunnel

This document will explain how to share your local ComfyFlowApp with public users through ngrok.

Overview

  1. Deploy ComfyUI instance and ComfyFlowApp on your PC.
  2. Deploy ngrok on your PC.
  3. Publish the applications developed in ComfyFlowApp through ngrok to https://comfyflow.app.
  4. User use application in https://comfyflow.app
image

Installation Steps

  1. Install ComfyUI and Run it
Simply download, extract using 7-Zip, and run it.
Make sure you place your Stable Diffusion checkpoints/models (the large ckpt/safetensors files) in: ComfyUI\models\checkpoints.
Click run_nvidia_gpu.bat to run ComfyUI; the default is http://127.0.0.1:8188/.
Refer to the official installation tutorial for ComfyUI on GitHub at https://github.com/comfyanonymous/ComfyUI.
  1. Install ComfyFlowApp
You can download the integrated package for Windows, comfyflowapp-python-3.11-amd64.7z.
Click run.bat to run ComfyFlowApp; the default is http://127.0.0.1:8501/.
Refer to the official installation tutorial for ComfyFlowApp on GitHub at https://github.com/xingren23/ComfyFlowApp.
  1. Install ngrok
Refer to the official ngrok website tutorial at https://dashboard.ngrok.com/get-started/setup/windows.
Download a standalone executable with zero runtime dependencies: ngrok-v3-stable-windows-amd64.
Put your app online with ephemeral domain forwarding to your local port 8188 by running:
ngrok http 8188

Once it's running, your endpoints will be listed on the endpoints page, e.g., https://35d3-2408-8207-2539-a7b0-3988-7bd0-6a4c-2d4e.ngrok-free.app/.

Application Development

  1. Develop and Debug ComfyUI Workflow
    Using Rui's CuteYou workflow as an example, it contains 7 ComfyUI nodes and 92 custom nodes, as shown in the image below.

image

  1. Develop a Web Application from the ComfyUI Workflow
    Create a web application, upload an image generated by the workflow, and configure the relevant input parameters and output results as shown in the image below.

image

  1. Publish the Web Application

(1) Preview the application locally to test if it's working correctly.

image

(2) Bind ngrok's endpoint to comfyflow.app
On https://comfyflow.app/, create a ComfyUI Node and activate your access permissions with a key.

image

image

image

(3)Publish the application
Creators can publish the application to the bound endpoint from their local ComfyFlowApp.

image

  1. Users can access the application
    After users activate their Access Key, they can access the application published at the endpoint via https://comfyflow.app/ (public network).

image

Upload Error

File "C:\comfyflowapp-python-3.11-amd64\python-3.11.7-embed-amd64\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 530, in _run_script
    self._session_state.on_script_will_rerun(rerun_data.widget_states)
File "C:\comfyflowapp-python-3.11-amd64\python-3.11.7-embed-amd64\Lib\site-packages\streamlit\runtime\state\safe_session_state.py", line 61, in on_script_will_rerun
    self._state.on_script_will_rerun(latest_widget_states)
File "C:\comfyflowapp-python-3.11-amd64\python-3.11.7-embed-amd64\Lib\site-packages\streamlit\runtime\state\session_state.py", line 500, in on_script_will_rerun
    self._call_callbacks()
File "C:\comfyflowapp-python-3.11-amd64\python-3.11.7-embed-amd64\Lib\site-packages\streamlit\runtime\state\session_state.py", line 513, in _call_callbacks
    self._new_widget_state.call_callback(wid)
File "C:\comfyflowapp-python-3.11-amd64\python-3.11.7-embed-amd64\Lib\site-packages\streamlit\runtime\state\session_state.py", line 260, in call_callback
    callback(*args, **kwargs)
File "C:\comfyflowapp-python-3.11-amd64\ComfyFlowApp\modules\new_app.py", line 276, in submit_app
    app_config = gen_app_config()
                 ^^^^^^^^^^^^^^^^
File "C:\comfyflowapp-python-3.11-amd64\ComfyFlowApp\modules\new_app.py", line 241, in gen_app_config
    node_id, param, input_param1_inputs = get_node_input_config(
                                          ^^^^^^^^^^^^^^^^^^^^^^
File "C:\comfyflowapp-python-3.11-amd64\ComfyFlowApp\modules\new_app.py", line 155, in get_node_input_config
    if isinstance(class_input[param][0], str):

How to go public?

Hey there!
I've tried your app and it looks really promising!
However, there're some things I don't understand. Can I go public with it? I mean, get a public link to the webapp when I run my workflow?
Edit: I've made a simple workflow with ComfyUI_IPadapter_Plus and ComfyUI_Reactor and Efficiency Nodes (looks like I have to upload the nodes..?)

KeyError: 'upload',创建app不成功

2024-02-14 15:47:19.643 Uncaught app exception
Traceback (most recent call last):
File "D:\anaconda3\envs\comfyflowapp\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 530, in _run_script
self._session_state.on_script_will_rerun(rerun_data.widget_states)
File "D:\anaconda3\envs\comfyflowapp\Lib\site-packages\streamlit\runtime\state\safe_session_state.py", line 61, in on_script_will_rerun
self._state.on_script_will_rerun(latest_widget_states)
File "D:\anaconda3\envs\comfyflowapp\Lib\site-packages\streamlit\runtime\state\session_state.py", line 500, in on_script_will_rerun
self._call_callbacks()
File "D:\anaconda3\envs\comfyflowapp\Lib\site-packages\streamlit\runtime\state\session_state.py", line 513, in _call_callbacks
self._new_widget_state.call_callback(wid)
File "D:\anaconda3\envs\comfyflowapp\Lib\site-packages\streamlit\runtime\state\session_state.py", line 260, in call_callback
callback(*args, **kwargs)
File "D:\Git\ComfyFlowApp\modules\new_app.py", line 276, in submit_app
app_config = gen_app_config()
^^^^^^^^^^^^^^^^
File "D:\Git\ComfyFlowApp\modules\new_app.py", line 241, in gen_app_config
node_id, param, input_param1_inputs = get_node_input_config(
^^^^^^^^^^^^^^^^^^^^^^
File "D:\Git\ComfyFlowApp\modules\new_app.py", line 155, in get_node_input_config
if isinstance(class_input[param][0], str):
~~~~~~~~~~~^^^^^^^
KeyError: 'upload'

工作流在本地comfyui里运行正常的,
comfyflowapp也安装正常,但创建不成功。报错如上。

API是否支持自建?

你好,api服务是否支持自建?

set COMFYFLOW_API_URL=https://api.comfyflow.app

API必须用这个地址吗?

How to upload .mp4 file?

The node video-uploader is below:

image

When I chose it as input, I can not see the video upload button:

image

And there is no way to upload video files when the app running:

image

Is there something I missed?

Share your comfyflow app

The sharing of ComfyUI workflows is a challenge because everyone has different operating environments, local models, and extension nodes. Running someone else's workflow always involves a lot of difficulties.

ComfyFlowApp aims to explore a solution to this problem by allowing users to publish their ComfyFlowApp on the web and make it available on app stores. Other users can then download the app and run it locally.

MathExpression node error when preview app

ERROR:root:Traceback (most recent call last):
File "E:\IMAGE\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\IMAGE\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\IMAGE\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: MathExpression.evaluate() missing 1 required positional argument: 'extra_pnginfo'

Unable to get the outputs from comfyui

The below workflow is works fine in comfyui:
workflow.json

Input image:
girl_0

Output image:
output

But comfyflowapp can not get the outputs from comfyui after this workflow finished:

2024-03-22 00:32:21.281 | INFO     | modules.comfyclient:_websocket_loop:131 - workflow finished, exiting websocket loop
2024-03-22 00:32:21.281 | INFO     | modules.comfyclient:get_history:71 - Getting history from server, 5a01f108-d252-4756-961a-9c1ed846a2dc
2024-03-22 00:32:23.315 | WARNING  | modules.comfyflow:create_ui:271 - get progress exception, '938'

Build your workflow app on RunPod

Creating a workflow application website can be challenging for ComfyUI developers.
Developing the workflow is demanding, and getting others to use it is even more so, due to environment setup issues, custom ComfyUI node issues, model downloading problems, among others. With ComfyFlowApp and ComfyUI, creators can easily build their own workflow application websites.

Taking RunPod as an example, this explains how to use ComfyFlowApp and ComfyUI to construct your own workflow application website.

1. Deploy RunPod GPU instance

Choose an RTX 3080 Ti with 12GB VRAM as an example. The cost is $0.19 per hour. If we opt for Spot mode, the price drops to $0.15 per hour.
image

After the instance is launched, you can connect to the RunPod instance using SSH, or access the instance through Jupyter Notebook. The following is an explanation using SSH as an example.
Configure port mapping and modify ports 8888, 8188, 8501.
Changing the mapped ports will cause the server to restart. Content outside the /workspace directory will be lost, so we map the port first.
image

2. Deploy and start ComfyUI

# enter workspace
cd /workspace

# git clone comfyui
root@bee82bea846d:/workspace# git clone https://github.com/comfyanonymous/ComfyUI
Cloning into 'ComfyUI'...
remote: Enumerating objects: 9222, done.
remote: Counting objects: 100% (2875/2875), done.
remote: Compressing objects: 100% (309/309), done.
remote: Total 9222 (delta 2668), reused 2573 (delta 2565), pack-reused 6347
Receiving objects: 100% (9222/9222), 3.75 MiB | 16.08 MiB/s, done.
Resolving deltas: 100% (6232/6232), done.

# download runway-sd-1.5 from huggingface to models/checkpoints
cd ComfyUI
wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors?download=true -O models/checkpoints/v1-5-pruned-emaonly.safetensors

# install comfyui
 pip install -r requirements.txt
 
 # start comfyui
root@ec4c6cf781e2:/workspace/ComfyUI# python main.py --listen=0.0.0.0
Total VRAM 12045 MB, total RAM 257901 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3080 Ti : cudaMallocAsync
VAE dtype: torch.bfloat16
Using pytorch cross attention
Starting server

To see the GUI go to: http://0.0.0.0:8188

3. Deploy and start ComfyFlowApp

cd /workspace

# clone comfyflowapp
git clone https://github.com/xingren23/ComfyFlowApp

# install comfyflowapp
cd ComfyFlowApp
pip install -r requirement

# start comfyflowapp
root@ec4c6cf781e2:/workspace/ComfyFlowApp# sh bin/creator_run.sh
/workspace/ComfyFlowApp

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.


  You can now view your Streamlit app in your browser.

  Network URL: http://172.24.0.2:8501
  External URL: http://194.26.196.133:8501

4. Access

Check ComfyUI and ComfyFlowApp is alive, click the button to access in public
image

Gen a image from ComfyUI default workflow, and download image local
image

Create app from comfyui workflow,
image

Run, preview/install and then run app in My Apps
image

parse workflow from image error, please check up comfyui is alive and can run the workflow.

This is the error log
2023-12-13 10:08:27.170 | INFO | main::297 - Loading workspace page
2023-12-13 10:08:27.173 | INFO | modules.page:change_mode_pages:23 - pages: ['Home', 'Workspace', 'My_Apps'], mode: Creator
2023-12-13 10:08:27.178 | INFO | modules.new_app:new_app_ui:480 - Loading create page
2023-12-13 10:08:30.061 | INFO | main::297 - Loading workspace page
2023-12-13 10:08:30.064 | INFO | modules.page:change_mode_pages:23 - pages: ['Home', 'Workspace', 'My_Apps'], mode: Creator
2023-12-13 10:08:30.067 | INFO | modules.new_app:new_app_ui:480 - Loading create page
2023-12-13 10:08:30.069 | INFO | modules.new_app:process_workflow_meta:32 - process_workflow_meta, UploadedFile(file_id='381c2789-65ef-4274-b350-90dba953377b', name='ComfyUI_temp_gxvae_00098_.png', type='image/png', size=535490, _file_urls=file_id: "381c2789-65ef-4274-b350-90dba953377b"
upload_url: "/_stcore/upload_file/b229f049-1a28-4422-ad86-71f3d3ad95e7/381c2789-65ef-4274-b350-90dba953377b"
delete_url: "/_stcore/upload_file/b229f049-1a28-4422-ad86-71f3d3ad95e7/381c2789-65ef-4274-b350-90dba953377b"
)
2023-12-13 10:08:30.092 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, PreviewImage
2023-12-13 10:08:30.135 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, SaveImageExtended
2023-12-13 10:08:30.141 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, PreviewImage
2023-12-13 10:08:30.387 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, PreviewImage
2023-12-13 10:08:30.395 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, PlaySound|pysssss
2023-12-13 10:08:30.402 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, PlaySound|pysssss
2023-12-13 10:08:30.453 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, PreviewImage
2023-12-13 10:08:30.569 | WARNING | modules.new_app:parse_prompt:78 - Only support SaveImage as output node, Seed Everywhere

Comfy is up and running and all seems well, but i get this error nevertheless.

'streamlit' is not recognized

"H:\ComfyFlowApp\bin>run.bat
'streamlit' is not recognized as an internal or external command,
operable program or batch file."

Cloned repo and ran pip + set server, but get the above.

In the install folder, my file list is as follows:
image

Any ideas?

Unknown message type crystools.monitor should be hidden

The crystools.monitor regularly communicates with comfyui through websocket to obtain the status of CPU, GPU and other resources, like below:

image

When comfyflowapp communicates with comfyui through websocket, it will receives and outputs many Unknown messages. It is recommended to hide them:

2024-03-22 00:32:06.950 | INFO     | modules.comfyclient:upload_image:64 - Uploading image to server, {'subfolder': '', 'type': 'input', 'overwrite': 'true'}
2024-03-22 00:32:07.697 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:08.714 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:09.000 | INFO     | modules.comfyclient:queue_remaining:34 - Got remaining from http://localhost:9000/prompt
2024-03-22 00:32:09.734 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:10.744 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:11.753 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:12.772 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:13.785 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:14.794 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:15.813 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:16.819 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:17.823 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:18.839 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:19.847 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:20.868 | WARNING  | modules.comfyclient:_websocket_loop:146 - Unknown message type crystools.monitor
2024-03-22 00:32:21.281 | INFO     | modules.comfyclient:_websocket_loop:131 - workflow finished, exiting websocket loop2024-03-22 00:32:21.281 | INFO     | modules.comfyclient:get_history:71 - Getting history from server, 5a01f108-d252-4756-961a-9c1ed846a2dc
2024-03-22 00:32:23.315 | WARNING  | modules.comfyflow:create_ui:271 - get progress exception, '938'

ComfyFlowApp: Use case

to the best of my knowledge, some friends have already developed some interesting applications, welcome to show your use case of comfyflowapp in here.

Imagine Rui created a fancy text effect workflow in ComfyUI that had lots of nodes and input options. It was really confusing for people, and they had to be trained on how to use it, and often made mistakes while using it. Then, Rui used ComfyFlowApp to turn it into an app with just two simple options, making it super easy to understand and use.

image image

https://api.comfyflow.app不能访问

connect to comfyui node error, HTTPConnectionPool(host='localhost', port=8188): Max retries exceeded with url: /object_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000028EC094A090>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.