Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Fuobe Connect 1.0.1: starts when ComfyUI's log goes to a file on Windows, and a shorter README

Adarsha7fdfeb54b40
diff --git a/integrations/fuobe-connect/README.md b/integrations/fuobe-connect/README.md
index 29845fbd..2c4d7a01 100644
--- a/integrations/fuobe-connect/README.md
+++ b/integrations/fuobe-connect/README.md
@@ -6,7 +6,7 @@ or a changed start file. It adds no nodes. It is optional: Fuobe also runs witho
The source of this pack is the `integrations/fuobe-connect` folder of the Fuobe repository:
<https://github.com/workingprototype/Fuobe/tree/main/integrations/fuobe-connect>. This repository is a copy of that
-folder, with its history. Every change is made there first.
+folder. Every change is made there first.
## Two modes
@@ -24,8 +24,8 @@ Fuobe Connect works in two ways. You can use one, both or neither.
Use one of these three ways. Then restart ComfyUI.
1. ComfyUI-Manager: open the Manager, choose **Custom Nodes Manager**, search for `Fuobe Connect` and press
- **Install**. The Manager finds Fuobe Connect only after it is listed in the
- [Comfy Registry](https://registry.comfy.org). Until then, use one of the two other ways.
+ **Install**. The Manager gets Fuobe Connect from the [Comfy Registry](https://registry.comfy.org). If it doesn't
+ show Fuobe Connect, or shows no version that you can install, use one of the two other ways.
2. ComfyUI-Manager's **Install via Git URL**: enter `https://github.com/workingprototype/ComfyUI-Fuobe-Connect`.
Recent versions of the Manager allow this only when two things are true: its `config.ini` has
`allow_git_url_install = true` in the `[default]` section, and ComfyUI listens only on this computer. Older versions
@@ -50,86 +50,51 @@ ComfyUI turns away requests from every other website. Fuobe Connect adds one exc
By default these are `https://fuobe.com` and `https://www.fuobe.com`. A studio's address must start with `https://`
(`http://` only for a studio on this computer, such as `http://localhost:3000`).
-A trusted studio reaches this ComfyUI only at `127.0.0.1`, `::1` or `localhost`. It never reaches it at a network
-address (unless you allow that, below) or under another name that leads to this computer, such as `127.0.0.1.nip.io`.
-Its page can:
+A trusted studio reaches this ComfyUI only at `127.0.0.1`, `::1` or `localhost`, or at a network address when you
+allow that (below). Its page can:
- read ComfyUI's facts (`/system_stats`: version, GPU, memory, start options), its node list and the file lists of its
model folders, with each folder's place on disk (every folder ComfyUI lists, except `custom_nodes` and `configs`). In
the node list, the loaders show only Fuobe's own input files, not your file names;
- upload a run's input into the input folder, only under a name Fuobe gives (`fuobe_<id>.png` and similar), only as a
- picture, clip, sound, 3D scene, array (`.npy`, `.npz`) or subtitle file (`.srt`, `.vtt`). Never a settings or text
- file (`.json`, `.txt`, `.csv`) or a file of no known type. It can replace an earlier Fuobe input, never a file of
- yours;
-- queue a workflow. Fuobe Connect checks every workflow here, in Python, before ComfyUI sees it:
+ picture, clip, sound, 3D scene, array (`.npy`, `.npz`) or subtitle file (`.srt`, `.vtt`). It can replace an
+ earlier Fuobe input, never a file of yours;
+- queue a workflow that passes Fuobe Connect's checks. Fuobe Connect checks every workflow here, in Python, before
+ ComfyUI sees it:
- every node type must be on the list this pack ships (`fuobe_connect/allowed_nodes.json`: the nodes Fuobe's own
workflows use), or on your own list (below). A studio can't add to either list;
- - no text may name a place: an absolute path in any form (`/x`, `\x`, `//host/share`, `\\?\C:\x`, `C:\x`, or a
- drive with no slash such as `D:x`), a `..` step, a home folder (`~`, `~user`), an environment variable at the start
- (`$HOME/`, `%USERPROFILE%\`), a URL, a ComfyUI folder tag such as `name [output]`, or a key in JSON that names a
- file, a folder or an address (`"video_path": …`). Spaces and quotes in front don't hide one;
- - an input that a listed node reads as a file or a folder, or a name that it downloads, takes only the one value or
- form that Fuobe's own workflows use, written in the workflow itself and never worked out by another node. For
- example, the source paths of `MiniMaxH3SourceTimeline` must be empty, the subtitle file of
- `AILab_Qwen3ASRSubtitle` must be empty or under `fuobe/` in your output folder, the model of
+ - no text may name a place on a disk or on the network: a path, a `..` step, a home folder, an environment variable,
+ a URL or a ComfyUI folder tag such as `name [output]`;
+ - an input that a listed node reads as a file or a folder, or a name that it downloads, takes only the value or form
+ that Fuobe's own workflows use, written in the workflow itself. For example, the model of
`DownloadAndLoadWav2VecModel` must be one of its two models, and the format of `VHS_VideoCombine` must be a plain
name such as `video/h264-mp4`. `PATH_INPUTS` in `fuobe_connect/graph.py` lists every one;
- every file loader must read a Fuobe input (`fuobe_<id>.<ext>`), never a file of yours;
- - a dropdown (a model name, a format, any list of choices) takes a link only where Fuobe's own workflows link one,
- because ComfyUI checks no value that reaches a dropdown through a link. A value written in the workflow is checked
- by ComfyUI against the dropdown's list, unless the node checks that input in its own way (a file loader, for
- example);
- - a link from an output that ComfyUI doesn't type-check (an "any" output such as `GetItemFromList`, `CreateList` or
- `VRAM_Debug`, a match-typed one such as `ComfySwitchNode`, or a dropdown-typed one) feeds only the inputs that
- Fuobe's own workflows feed from that node type. Inside ComfyUI, Fuobe Connect reads which outputs these are and
- which inputs are dropdowns from every node, your own listed ones too. The shipped list is in
- `fuobe_connect/allowed_nodes.json` (`loose` and `links`);
- - a link must name its node's output with a whole number from 0 (`["4", 0]`), the way Fuobe's own workflows and
- ComfyUI's page write it. ComfyUI also takes `true`, `false`, a number with a point (`0.0`) or `-1` as an output.
- Fuobe Connect sees each of these as a link, and refuses it;
- - `VHS_VideoCombine` puts its format's settings into ffmpeg's arguments, so each setting must be one plain word
- (`yuv420p`, `hq`), and it takes a link only for its pictures, sound, batch, VAE and frame rate;
- - a value written in the workflow is one plain thing: a text, a number, `true`, `false` or `null`. Never a list
- (ComfyUI reads a list as a link) and never a JSON object (ComfyUI passes one on unchecked), except a 3D view's
- entries, which must have the exact form of ComfyUI's own 3D nodes: the camera and the models' placements are
- numbers only. No object anywhere may hold a `"__value__"` key: ComfyUI takes the value out of one, so a link
- inside it would run a node that ComfyUI never checked;
- - a node holds only its type, its inputs and its title. ComfyUI reads other keys as its own (`is_changed`,
- `_loop_body`, `_loop_end`);
- - every node that ComfyUI runs must be one that ComfyUI checks first. A link goes only into an input that the node
- lists (ComfyUI runs a node linked from any other input name but never checks it), no input may name one of the
- node's hidden inputs, a node type that ComfyUI would swap for another before it checks the workflow is refused, and
- a workflow with a loop (`StartLoop`, `EndLoop`) may hold only nodes that lead to one of its outputs.
-
- A workflow that uses an installed node from the list can still do what that node does in ComfyUI's own folders: for
- example, save into your output folder, or keep a node pack's own cache. These checks follow what the listed nodes do
- at the versions Fuobe's workflows pin. A newer version of a node pack can read its inputs in a new way;
+ - a link into a dropdown (a model name, a format, any list of choices), or from a loosely typed output such as
+ `GetItemFromList` or `ComfySwitchNode`, goes only where Fuobe's own workflows put one (`loose` and `links` in
+ `fuobe_connect/allowed_nodes.json`);
+ - a link has the form that ComfyUI's page writes: a node's id and an output number from 0 (`["4", 0]`). A value
+ written in the workflow is a text, a number, `true`, `false` or `null`. A 3D view's entries have the form of
+ ComfyUI's own 3D nodes;
+ - a node holds only its type, its inputs and its title, and every node that ComfyUI runs is one that ComfyUI checks
+ first.
+
+ Its workflows save their results into your output folder, as ComfyUI's own page does;
- see, follow, cancel, stop and remove only the prompts it queued (and a batch's later passes, which save under
- `fuobe/<id>`). A prompt becomes the studio's only after ComfyUI takes it. Fuobe Connect refuses a prompt whose id
- ComfyUI already has in its queue or its history, so a studio that learns the id of a prompt of yours can't take
- that prompt over. In the queue, your own prompts show only as places in the line. It can't clear the queue or stop
+ `fuobe/<id>`). In the queue, your own prompts show only as places in the line. It can't clear the queue or stop
your own work;
- download only the results that its own prompts' history lists;
-- open ComfyUI's live socket only under a Fuobe client id (`fuobe-…`), never your own ComfyUI tab's. Note that
- ComfyUI itself sends the live messages of a prompt queued without a client id (many scripts and API tools queue
- that way) to every open socket, a studio's too: the prompt's id, its progress, its preview pictures, its errors and
- the names of the files it saves. The studio still can't download those files or control that prompt. A prompt
- queued from ComfyUI's own page carries that page's client id, and its messages go only to that page.
+- open ComfyUI's live socket only under a Fuobe client id (`fuobe-…`), never your own ComfyUI tab's.
A trusted studio can't reach the Manager's install calls, your user files or your settings: Fuobe Connect turns away
every request of a trusted studio outside the list above itself, whatever ComfyUI's start options say. It can't read a
-file of yours in the input folder or download a result of yours. Its workflows can't name a file of yours by its path:
-text that names a place (an absolute path, a `..` step, a home folder, a URL) is refused, an input that a listed node
-reads as a file takes only Fuobe's own form, and a value that another node works out can't reach such an input, a
-dropdown or ffmpeg's arguments. Of ComfyUI's folder lists it can't read `custom_nodes` (every file of your node packs)
-or `configs`. Every other website still meets ComfyUI's own check, unchanged. Nothing in ComfyUI's own files changes.
-
-If ComfyUI runs with `--enable-cors-header` (an older Fuobe setup), ComfyUI's own check is off. Fuobe Connect then also
-turns away every website except ComfyUI's own page, the site that the setting names and the trusted studios. This is
-what Fuobe's guard file did, so you can delete `fuobe_guard.py` and the setting. A trusted studio gets only the checked
-requests above even when the setting names it, so a trusted studio doesn't need the setting. With
-`--enable-cors-header *` (every website) Fuobe Connect adds no check for other websites, but a trusted studio still
-gets only the checked requests.
+file of yours in the input folder or download a result of yours, and its workflows can't name a file of yours by its
+path. Every other website still meets ComfyUI's own check, unchanged. Nothing in ComfyUI's own files changes.
+
+**An older Fuobe setup.** Fuobe Connect doesn't need `--enable-cors-header` or Fuobe's guard file. You can delete
+`fuobe_guard.py` from `custom_nodes` and start ComfyUI without `--enable-cors-header`. While ComfyUI still starts
+with `--enable-cors-header` and a site's address, Fuobe Connect lets in only ComfyUI's own page, that site and the
+trusted studios, as the guard file did. A trusted studio gets only the checked requests above.
## Choose your studios, or none
@@ -151,8 +116,7 @@ there.
**A name for ComfyUI's page.** Fuobe Connect's own window works when you open ComfyUI at `127.0.0.1`, `localhost` or
an IP address. If you open it by a name (for example `comfy.local`, or a domain in front of it), set
-`FUOBE_CONNECT_HOSTS=comfy.local` before you start ComfyUI. This keeps a website that points its own name at your
-computer out of the window's settings.
+`FUOBE_CONNECT_HOSTS=comfy.local` before you start ComfyUI, so that the window works under that name too.
## Pairing (for Safari, phones and PCs with no screen)
@@ -165,9 +129,9 @@ Pairing works only with a studio you trust, or with `https://fuobe.com`. Every j
mode, before it reaches ComfyUI. The job's inputs leave the input folder when the job is done.
The **Connect to Fuobe** window shows the studio, the account that approved the code (masked, for example
-`a•••@example.com`, when the studio says), and the last jobs with their node types and times. Fuobe doesn't fill in
-the code from a link: you type the code that your own ComfyUI shows, so a link that someone sends you can't connect
-their ComfyUI to your account. **Pause jobs** and **Disconnect** stop the jobs (see the next section).
+`a•••@example.com`, when the studio says), and the last jobs with their node types and times. In Fuobe, you type the
+code that your own ComfyUI shows: Fuobe doesn't fill it in from a link. **Pause jobs** and **Disconnect** stop the
+jobs (see the next section).
On a PC with no screen, start ComfyUI with `FUOBE_CONNECT_PAIR=1`. The code and the link then appear in ComfyUI's
console. `FUOBE_CONNECT_SITE=https://studio.example.com` chooses the studio for that.
@@ -227,12 +191,12 @@ They do not need models, a GPU or a running ComfyUI. The `tests` folder is not p
## Releases
-Each version is published to the [Comfy Registry](https://registry.comfy.org), where ComfyUI-Manager finds it. To
+Each version is published to the [Comfy Registry](https://registry.comfy.org), which ComfyUI-Manager searches. To
publish a version:
1. In the Fuobe repository, set the new version in `pyproject.toml` and in `fuobe_connect/__init__.py`. The tests
check that the two are the same.
-2. Bring that change into this repository.
+2. Bring that folder into this repository as one new commit.
3. Push a tag with the same version and a `v` in front, for example `v1.0.1`.
The tag starts the workflow `.github/workflows/publish.yml`. The workflow publishes nothing when the tag and the
diff --git a/integrations/fuobe-connect/fuobe_connect/__init__.py b/integrations/fuobe-connect/fuobe_connect/__init__.py
index 282d5c4b..87690a08 100644
--- a/integrations/fuobe-connect/fuobe_connect/__init__.py
+++ b/integrations/fuobe-connect/fuobe_connect/__init__.py
@@ -1,3 +1,3 @@
"""Fuobe Connect: use this ComfyUI from Fuobe with one install."""
-__version__ = "1.0.0"
+__version__ = "1.0.1"
diff --git a/integrations/fuobe-connect/fuobe_connect/plugin.py b/integrations/fuobe-connect/fuobe_connect/plugin.py
index 36e23409..9988a10a 100644
--- a/integrations/fuobe-connect/fuobe_connect/plugin.py
+++ b/integrations/fuobe-connect/fuobe_connect/plugin.py
@@ -208,4 +208,5 @@ def install():
# A PC with no screen: the code and the address go to ComfyUI's console.
agent.call(agent.start_pairing(studio(os.environ.get("FUOBE_CONNECT_SITE")) or sites[0]))
elif not store.load().get("token"):
- log.info("[Fuobe Connect] To run Fuobe jobs here with no browser tab open: ComfyUI menu → Extensions → Connect to Fuobe.")
+ # ASCII only: on Windows a log that goes to a file or a pipe takes only the system's code page.
+ log.info("[Fuobe Connect] To run Fuobe jobs here with no browser tab open: ComfyUI menu > Extensions > Connect to Fuobe.")
diff --git a/integrations/fuobe-connect/pyproject.toml b/integrations/fuobe-connect/pyproject.toml
index be253c87..5c13e218 100644
--- a/integrations/fuobe-connect/pyproject.toml
+++ b/integrations/fuobe-connect/pyproject.toml
@@ -1,7 +1,7 @@
[project]
name = "fuobe-connect"
description = "Use this ComfyUI from Fuobe with one install: no start flag, no extra file. Trusts only the Fuobe studios you name, checks every workflow they send against the node list it ships, keeps ComfyUI's own check for every other website, and can pair with your Fuobe account for Safari, phones and PCs with no screen."
-version = "1.0.0"
+version = "1.0.1"
license = { file = "LICENSE" }
requires-python = ">=3.9"
# aiohttp comes with ComfyUI: naming it here could make ComfyUI-Manager change ComfyUI's own copy.
diff --git a/integrations/fuobe-connect/tests/test_plugin.py b/integrations/fuobe-connect/tests/test_plugin.py
index 6b2e2e6b..ca9ffee5 100644
--- a/integrations/fuobe-connect/tests/test_plugin.py
+++ b/integrations/fuobe-connect/tests/test_plugin.py
@@ -10,7 +10,9 @@ from __future__ import annotations
import asyncio
import importlib.util
+import io
import json
+import logging
import os
import sys
import tempfile
@@ -260,6 +262,23 @@ class PluginTest(unittest.TestCase):
patcher.start()
self.addCleanup(patcher.stop)
+ def test_starts_when_the_log_goes_to_a_file(self):
+ # On Windows, ComfyUI's log written to a file or a pipe takes only the system's code page (cp1252 here).
+ out = io.TextIOWrapper(io.BytesIO(), encoding="cp1252", errors="strict", write_through=True)
+ handler = logging.StreamHandler(out)
+ root = logging.getLogger()
+ level = root.level
+ root.addHandler(handler)
+ root.setLevel(logging.INFO)
+ self.addCleanup(root.setLevel, level)
+ self.addCleanup(root.removeHandler, handler)
+ with mock.patch.object(sys, "stderr", out):
+ load_pack(self.user_dir)
+ text = out.buffer.getvalue().decode("cp1252")
+ self.assertNotIn("Couldn't start", text)
+ self.assertNotIn("Logging error", text)
+ self.assertIn("Extensions > Connect to Fuobe", text)
+
def test_loads_into_comfyui_and_pairs(self):
user_dir = self.user_dir
module, instance = load_pack(user_dir)