Giter VIP home page Giter VIP logo

comfyui-browser's Introduction

ComfyUI Browser

中文说明

This is an image/video/workflow browser and manager for ComfyUI. You can sync your workflows to a remote Git repository and use them everywhere.

Welcome to submit your workflow source by submitting an issue. Let's build the workflows together.

comfyui_browser_231215_subtitle.mov

Features

  • Browse and manage your images/videos/workflows in the output folder.
  • Add your workflows to the 'Saves' so that you can switch and manage them more easily.
  • Sync your 'Saves' anywhere by Git.
  • Subscribe workflow sources by Git and load them more easily.
  • Search your workflow by keywords.
  • Some useful custom nodes like xyz_plot, inputs_select.

Custom Nodes

Select Inputs

  • Select any inputs of the current graph.
image

XYZ Plot

  • Simple XYZ Plot by selecting inputs and filling in the values.
image image

Preview

Outputs

Outputs

Saves

Saves

Sources

Sources Recommended Sources

Models

Models

Side Bar View

SideBar

Installation

ComfyUI Manager

Install ComfyUI Manager, search comfyui-browser in Install Custom Node and install it.

Configuring

In your comfyui-browser directory, you can add a config.json to override the directories that comfyui-browser uses. Ex:

{
  "collections": "/var/lib/comfyui/comfyui-browser-collections",
  "download_logs": "/var/lib/comfyui/comfyui-browser-download-logs",
  "outputs": "/var/lib/comfyui/outputs",
  "sources": "/var/lib/comfyui/comfyui-browser-sources"
}

The default configuration values are:

{
  "collections": "[comfyui-browser]/collections",
  "download_logs": "[comfyui-browser]/download-logs",
  "outputs": "[comfyui]/outputs",
  "sources": "[comfyui-browser]/sources"
}

Where [comfyui-browser] is the automatically determined path of your comfyui-browser installation, and [comfyui] is the automatically determined path of your comfyui server. Notably, the outputs directory defaults to the --output-directory argument to comfyui itself, or the default path that comfyui wishes to use for the --output-directory argument.

Manually

Clone this repo into the custom_nodes folder and restart the ComfyUI.

cd custom_nodes && git clone https://github.com/tzwm/comfyui-browser.git

Notes

  • Your 'Saves' are stored in the collections configuration value. See Configuring for its default, and how to set the path to something different.
  • Press 'B' to toggle the Browser dialog in the ComfyUI.

Development

  • Prerequisite

  • Framework

  • Project Structure

├── __init__.py  (Backend Server)
├── web          (Frontend code loaded by ComfyUI)
    ├── build    (Built in Svelte)
    └── index.js (Frontend that interact with ComfyUI)
├── svelte       (Frontend in the Modal as a iframe, written in Svelte)
  • Build and Run

    • Copy or link comfyui-browser to ComfyUI/custom_nodes/
    • Start backend by cd ComfyUI && python main.py --enable-cors-header
    • Start frontend by cd ComfyUI/custom_nodes/comfyui-browser/svelte && npm i && npm run dev
    • Open and debug by http://localhost:5173/?comfyUrl=http://localhost:8188
      • It will use localhost:8188 as ComfyUI server
      • localhost:5173 is a Vite dev server
  • Notes

    • Please try to test on Windows, because I only have Linux/macOS

TODO

  • Sync collections to remote git repository
  • Add external git repository to local collections
  • Search workflow by node name and model name

ChangeLog

To see ChangeLog.

Credits

comfyui-browser's People

Contributors

haohaocreates avatar huxiuhan avatar limbowang avatar loganbarnett avatar miaobuao avatar tzwm avatar xinlijia 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

comfyui-browser's Issues

Add auto sync workflows with git function

Git is cool to save revisions of workflows.

Is it possible :

  1. Auto save current workflow as "working-workflow.json" to the repository.
  2. A option to allow auto sync with remote repository every N minutes.

[FEATURE REQUEST] - Show Image Metadata

This extension is an incredible time-saver and it's getting more polished at light speed. Thank you for sharing it with the community.

A great addition to its current features, assuming it's in scope with the goal of the project, would be the capability to display the image metadata in the gallery.

Today, I save the metadata via the SD Prompt Saver node, part of the SD Prompt Reader custom node suite, because it's the most reliable and comprehensive node around for the job:

Screenshot 2023-12-19 at 10 20 21

When I have to check that image metadata, I have to go the file explorer, reach the ComfyUI output image, and finally open the image inside the standalone app SD Prompt Reader (which is great, from the same author of the nodes).

It's fine, but this workflow could be really sped up if your ComfyUI Browser could show the metadata right inside the Outputs view.

Just an idea.

'grep' is not recognized

This is a great tool!

On windows, I have experienced an error:
[comfyui-browser] failed
[comfyui-browser] 'grep' is not recognized as an internal or external command,
operable program or batch file.

I will have to modify the code changing "grep -w" to "findstr" since windows platform does not have grep by default.

Maybe add a check of OS and use findstr for windows instead

Emily

My workflow repository link:
19429817

Description:

New workflow repo:

My workflow repository link:
Description:
image
一直在加载,但是找不到错误日志

Support git sync via token

This node is great for me. Awesome work!

It's good to add support of git sync via token. In gitlab , we can use https://oauth2:<your-access-token>@gitlab.com/your-username/your-repo.git to clone and sync files.the <your-access-token> is personalized for user from settings.

In github it looks like https://<token>@github.com/your-username/your-repo.git

If input this single line in the comfyui brower's git repository , can save workflows from cloud server like colab.

[FEATURE REQUEST] - SEPARATE NODE

Hi. Magnific extensions, I cannot use with windows 10 ( I am not expert but ever tell me error connection, and save local ).

I need some node (as separate extension) that take the value from another node, similar to your node "select node imput", in this form I can use the values to incorporate to korkgroups.

Sample. I use "global seed.seed" to use into text to watermark over the image. (It is a sample).
I need this node :) to copy "internal" value to make "public" value in another node.

Thanks.
PD.: Sorry my bad english.

Suggestion - save png to workflows?

Finally, a comfortable ComfyUI Browser is here, thanks!
However, I've got a suggestion regarding the saved workflows. Can you add an option to save the png to workflows, or just set a custom image for each? It'll be more comfortable to go through with images representing workflows, rather than names only. Other than that, all's great.
EDIT: Nevermind, I'm blind and didn't get that I can save to workflows through image browser itself.

XYZ Plot not working with any node.

Hello, thank you for developing this great tool.
I wanted to include your node in my workflow, but I only get empty grids when trying to alternate some primitive INT inputs.
It does work if I select inputs from the Ksampler, but that's what a normal xy plot already does.
Any idea on what could be the cause?
Thank you and keep up the great work!!

Here is the workflow:
xyz_INT_FAIL.json

XYZPlot replaces prompts Prompts instead of appends

Hi, thanks for the work on the project!

XYZPlot doesn't work with prompts like I'd expect them to. In my head, if I've already got a prompt, then the axis values for a prompt should be appended, not replaced. That said, I appreciate the generalized utility of XYZPlot and how it can be tied to any field. In most cases, a replace operation would be preferred (which XYZPlot does right now).

For prompts, I'd like to avoid human error and excessively large prompts in the XYZPlot node for doing replacing. In this way I'll have a sort of base prompt and the axis for that prompt will add its own values. I think this is what the screenshot is showing in the example of XYZPlot, but I haven't been able to reproduce it myself. When I inspected the data being sent to queue up the new prompt, it looks like my prompt was being overridden by one of the axis values entirely.

I have a branch at https://github.com/LoganBarnett/comfyui-browser/tree/debug-xyz-node which provides one means of doing this for XYZPlot by introducing an update_mode variable for each axis (I only cover X and Y at the moment). While it does function, I'm not convinced this is the ideal way to perform this task. I believe this requires each item in each prompt axis to have a comma to separate the prompt elements. Otherwise it's just a straight concatenation. For example, if you have a prompt of sunset on a beach and the axis values are 1girl; 1boy then you would get sunset on a beach1girl and sunset on a beach1boy. You could fix it with sunset on a beach, (note the added comma) and 1girl,; 1boy, (more commas, assuming you might use two or more axes for your prompt modifier.

I'm thinking maybe we should lean to have a substituter variable for each axis instead. You can leave it blank to replace the value. Then you would write a very semantic prompt like sunset on a beach, {person}, {time}, and your X axis could be 1girl; 1boy, and the Y axis could be day; night, and these would work very well together. You'd just have to give XYZPlot the additional {person} and {time} as x_substituter and y_substituter inputs, respectively. This approach will make the node a little larger / more noisy, but I think it gives us the power we are accustomed to seeing with ComfyUI (and XYZPlot) without adding magic that will later create a higher maintenance burden.

Thoughts?

I plan on implementing this, but I won't take offense if you'd rather see this done a different way and I've already arrived at a pull request before you could weigh in :)

[FEATURE REQUEST] Labels for the XYZ Plot

As I said on Reddit a few weeks ago, your XYZ Plot node is the elegant and powerful way to plot complex parameter variations in a complex workflow. Thanks for sharing it with the community.

I'm preparing to include this node in the upcoming AP Workflow 9.0 (it's already in the Early Access 3 prerelease), and I wanted to ask if you could add a way to show arbitrary axis labels.

It would make the plot easier to read, especially if you are showing the plot to people that didn't prepare the node configuration.

Thank you for considering my request.

Can't xyz plot a list of checkpoint names

I have this setup:

Screenshot 2024-04-22 at 09 54 45

The intention is to generate an XYZ plot that modifies the checkpoint name in the SDParameterGenerator node, part of the SD Prompt Reader suite. But I also tried doing the same with an Efficient Loader node.

Screenshot 2024-04-22 at 09 49 30

I receive this error:

Traceback (most recent call last):
File "D:\Tools\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\Tools\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\Tools\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\Tools\ComfyUI\custom_nodes\comfyui-browser\nodes\select_inputs.py", line 39, in run
node_id, node_title, widget_name = input.split("::")
ValueError: not enough values to unpack (expected 3, got 1)

I thought that perhaps I'm defining the list of checkpoints in the wrong way.

I use Vivaldi browser (a flavor of Chrome) on macOS to connect to a local ComfyUI server on Windows.
The checkpoints are in the Windows fileserver.

Any help would be greatly appreciated. Thank you.

[FEATURE REQUEST] Custom path definition for output folder

This seems like a very useful feature, but a bit more flexibility in terms of output path would make it even better.

It should either read the content of the --output-directory that is passed at startup time (not sure is possible) or, preferable, have an entry in the ComfyUI Manager settings menu where you can specify your output dir.

Thanks for considering the request.

Error: Max retries exceeded with url: /prompt

I am getting the following error with the XYZ Plot node:

File "D:\Tools\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\Tools\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\Tools\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\Tools\ComfyUI\custom_nodes\comfyui-browser\nodes\xyz_plot.py", line 157, in run
queue_new_prompt(new_prompt)
File "D:\Tools\ComfyUI\custom_nodes\comfyui-browser\nodes\xyz_plot.py", line 110, in queue_new_prompt
return requests.post(SERVER_BASE_URL + '/prompt', data=data, proxies=proxies)
File "D:\Tools\ComfyUI\venv\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\Tools\ComfyUI\venv\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\Tools\ComfyUI\venv\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\Tools\ComfyUI\venv\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\Tools\ComfyUI\venv\lib\site-packages\requests\adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=8188): Max retries exceeded with url: /prompt (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001E23270EA70>: Failed to establish a new connection: [WinError 10049] The requested address is not valid in its context'))

This is the default workflow I tested:

Screenshot 2024-05-13 at 21 51 25

I'm having this problem with both Vivaldi and Safari on macOS. I remotely connect to a ComfyUI server (on Windows) in the network.
The browser plugin, part of the suite, works fine. It's just the XYZ Plot node that causes this issue.

What am I doing wrong?

Thanks for your help.

Request: Save AD gif/mp4 files in xy result.

Add ability to save animated gifs or mp4 files in the xyz plot result page.

I set up this basic WF that should save AD runs as gif files that are sent to the xyz plot node.

Everything works but the xyz node only saves jpg files of the first frame rather than the gifs

AD-xyz-polt.json

vhs_filenames.py.txt

Save the vhs_filenames.py.txt in custom nodes folder and remove ".txt" (can not uplaod files with .py extension)

Thank you

not working with new style menue

Thx for this extension.

Unfortunately, this does not work with the new menue bar, as there is no button.

See screenshots:

"Browser" button visible on old side bar:
Screenshot 2024-07-08 at 18-03-38 ComfyUI

No "Browser" button on new menue bar:
Screenshot 2024-07-08 at 18-04-14 ComfyUI

关于gitcode.net

订阅github工作流,自动去gitcode.net拉取,可否取消这个设置,或者添加取消的入口,如果考虑到墙内用户,可以增加一个代理设置,用户自由选择,gitcode.net 太烂了,还不如gitee

【问题】关于浏览图片数量问题

不知道是不是我的个案问题,我浏览输出图像时,最多只能显示20个图片,且无法进行滚动浏览。

环境:
Windows11
Edge/谷歌浏览器
Comfyui:Released on '2024-01-13'
comfyui-browser也更新到了13日之后的最新版本

另,在我mac版本的comfyui下无此问题。

image

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.