Compare commits

...
33 Commits
Author SHA1 Message Date
sakura1bgx 844bc7adad Update pyproject.toml 2026-09-21 11:34:07 +09:00
sakura1bgx cb06e1c129 Update README.md 2026-09-21 11:33:34 +09:00
sakura1bgx 62bf68f397 Update flipstreamviewer.js 2026-09-21 11:22:24 +09:00
sakura1bgx 5b85650858 Update flipstreamviewer.py
- Changed FlipStreamChatJson: `temperature` and `top_p` are now inputs.
- Add FlipStreamViewerVideo: streams frames and optional audio to the viewer.
- Add FlipStreamFileSelect_DiffusionModels.
- Add FlipStreamLogger.
- Some fixes.
2026-09-21 11:21:28 +09:00
sakura1bgx 98f3faabbc Update README.md 2026-01-17 09:27:38 +09:00
sakura1bgx 3339d466e5 Update pyproject.toml 2026-01-17 09:21:24 +09:00
sakura1bgx 085eb339df Update README.md 2026-01-17 09:20:47 +09:00
sakura1bgx bd9257763c Update README.md 2026-01-17 09:19:45 +09:00
sakura1bgx 5fd1ddcf24 Merge pull request #16 from sakura1bgx/develop
- Remove Tagger UI and WD14 functions.
- Remove wd14exc option from FlipStreamViewer
- Add FlipStreamButton
- Add FlipStreamGetFrame, it can be use with WD14Tagger node.
- Remove Tagger.
- AddFlipStreamFileSelect_Loras.
- Refine FlipStreamSetParam to refresh UI.
- Refine Section to folding UI.
- Add Secret xor_crypt function (joking level crypt).
- Fix FlipStreamFileSelect to be selectable collect path.
- Fix FlipStreamChat n_ctx, max_tokens option range.
- Add pingpong option to FlipStreamViewer.
- Add FlipStreamFileSelect_LLM node.
- Add elapsed time bar UI.
- Refine FlipStreamSource to support upscale with keep aspect.
- Add FlipStreamFileSelect_LLM node.
- Add elapsed time bar UI.
- Add FlipStreamPasteBox.
- Add FlipStreamTextConcat.
- Add loraMode selection and @mode{} format.
- Add FlipStreamLoraMode to set loraMode.
- Add FlipStreamLoadLora like Lora Tag Loader, it can select mode to apply @mode{} section.
- Refine updating status control to check Comfy task remaining.
- Add FlipStreamCurrent to show any text in status info.
- Change FlipStreamSetUpdateAndReload to FlipStreamRunOnce.
- Change progress bar range to 120 sec.
- Add FlipStreamSetState, FlipStreamGetState.
- Change FlipStreamGetParam outputs
- Add frame trimming options for FlipStreamGetFrame.
- Add FlipStreamSizeSelect.
- Add FlipStreamViewerSimple, FlipStreamAllowIp.
- Add FlipStreamSaveApiWorkflow, FlipStreamRunApiWorkflow.
- Add FlipStreamFree.
- Add FlipStreamShutdown.
- Add experimental nodes FlipStreamAnd, FlipStreamOr,  FlipStreamGet, FlipStreamChatJson.
- Depricated FlipStreamGate, FlipStreamSegMask.
- And some minor changes.
2026-01-17 09:14:30 +09:00
sakura1bgx 2bf629280c Update README.md 2026-01-17 09:03:27 +09:00
sakura1bgx dcaf4ac593 Update README.md 2026-01-17 09:00:50 +09:00
sakura1bgx 453caa62da Update README.md 2026-01-17 08:56:50 +09:00
sakura1bgx beea6b09cd Update README.md 2026-01-17 08:55:51 +09:00
sakura1bgx 47d0e5110c Create flipstreamviewer.js 2026-01-17 08:22:37 +09:00
sakura1bgx cd1ac4bd9e Update __init__.py 2026-01-17 08:19:01 +09:00
sakura1bgx ad959afa21 Update flipstreamviewer.py
- Add loraMode selection and @mode{} format.
- Add FlipStreamLoraMode to set loraMode.
- Add FlipStreamLoadLora like Lora Tag Loader, it can select mode to apply @mode{} section.
- Refine FlipStreamPasteBox.
- Refine updating status control to check Comfy task remaining.
- Add FlipStreamCurrent to show any text in status info.
- Change Update button to Run button.
- Change FlipStreamSetUpdateAndReload to FlipStreamRunOnce.
- Change progress bar range to 120 sec.
- Add FlipStreamSetState, FlipStreamGetState.
- Change FlipStreamGetParam outputs
- Add frame trimming options for FlipStreamGetFrame.
- Add FlipStreamSizeSelect.
- Add FlipStreamViewerSimple, FlipStreamAllowIp.
- Add FlipStreamSaveApiWorkflow, FlipStreamRunApiWorkflow.
- Add FlipStreamFree.
- Add FlipStreamShutdown.
- Add experimental nodes FlipStreamAnd, FlipStreamOr,  FlipStreamGet, FlipStreamChatJson.
- Depricated FlipStreamGate, FlipStreamSegMask.
- And some minor changes.
2026-01-17 08:17:57 +09:00
sakura1bgx 7520526dc1 Update README.md 2025-12-30 23:58:38 +09:00
sakura1bgx 1a7f142c9b Update flipstreamviewer.py
- Add FlipStreamTextConcat.
- Fix FlipStreamPasteBox.
- Refine some code.
2025-12-30 23:57:15 +09:00
sakura1bgx fb16962357 Update README.md 2025-12-28 11:55:13 +09:00
sakura1bgx 946a0106bb Update flipstreamviewer.py
- Add FlipStreamPasteBox.
- Change Capture button order.
2025-12-28 11:52:40 +09:00
sakura1bgx 88ab694ae4 Update flipstreamviewer.py
- Add FlipStreamFileSelect_LLM node.
- Add elapsed time bar UI.
- Refine FlipStreamSource to support upscale with keep aspect.
2025-12-21 20:31:09 +09:00
sakura1bgx 428f247253 Update flipstreamviewer.py
- Fix FlipStreamFileSelect to be selectable collect path.
- Fix FlipStreamChat n_ctx, max_tokens option range.
- Add pingpong option to FlipStreamViewer.
2025-11-19 00:42:36 +09:00
sakura1bgx 68370b4b82 Update flipstreamviewer.py
- Add Secret xor_crypt function.
2025-11-10 00:03:26 +09:00
sakura1bgx c0c5d924fd Update flipstreamviewer.py
- AddFlipStreamFileSelect_Loras.
- Refine FlipStreamSetParam to refresh UI.
- Refine Section to folding UI.
2025-11-09 19:58:04 +09:00
sakura1bgx a5e4f3893b Update README.md 2025-11-08 02:27:08 +09:00
sakura1bgx 6685866cd9 Update flipstreamviewer.py
- Changed FlipStreamButton order.
2025-11-08 02:25:56 +09:00
sakura1bgx 5b39eb16b2 Update README.md
- Remove Tagger.
- Update llama cpp python building description.
- Add sage attention building description.
2025-11-08 02:17:02 +09:00
sakura1bgx 0daa37e1c3 Update flipstreamviewer.py
- Remove Tagger UI and WD14 functions.
- Remove wd14exc option from FlipStreamViewer
- Add FlipStreamButton
- Add FlipStreamGetFrame, it can be use with WD14Tagger node.
2025-11-08 01:57:47 +09:00
sakura1bgx 947d1b942d Merge pull request #15 from sakura1bgx/main
Update
2025-11-08 01:54:32 +09:00
sakura1bgx eb9513674c Update pyproject.toml 2025-11-05 16:33:16 +09:00
sakura1bgx 93005dfc2c Update flipstreamviewer.py
- Add fontsize option for FlipStreamSetMessage.
- Changed to split json_input by "\n" for FlipStreamParseJson.
2025-11-05 16:32:15 +09:00
sakura1bgx b42d40addf Update pyproject.toml 2025-10-04 13:47:35 +09:00
sakura1bgx 9b6f84d187 Update flipstreamviewer.py
- Add reset_updating flag for FlipStreamViewer, it enable to use multiple FlipStreamViewer nodes.
2025-10-04 13:47:13 +09:00
5 changed files with 1897 additions and 412 deletions
+41 -23
View File
@@ -11,11 +11,9 @@
`http://localhost:8188/flipstreamviewer`
4. To respond to viewer input:
- Check 'Extra options', 'Auto Queue', and 'instant' on the ComfyUI control panel.
- Then click the 'Queue Prompt' button.
4. Run a workflow on the ComfyUI
5. The UI nodes will refresh after the workflow is completed once, so you need to click 'Update and reload' after that.
5. The UI nodes will refresh after the workflow is completed once, so you need to click 'Update' after that.
6. The 'preset' folder may be created in the current directory for saving and loading preset files.
@@ -27,14 +25,13 @@
## Optional Custom Nodes dependencies
The following custom nodes can be used as needed:
- ComfyUI-WD14-Tagger: For Tagger
- ComfyUI-Inspyrenet-Rembg: For FlipStreamRembg
- ComfyUI-Florence2: For FlipStreamSegMask
- ComfyUI-Frame-Interpolation: For FlipStreamFilmVfi
The following custom nodes may also be used within workflows:
- ComfyUI Impact Pack
- LoRA Tag Loader for ComfyUI
- ComfyUI-WD14-Tagger
- ComfyUI-AnimateDiff-Evolved
- ComfyUI-VideoHelperSuite
- ComfyUI-DepthAnythingV2
@@ -44,6 +41,8 @@ The following custom nodes may also be used within workflows:
llama-cpp-python for FlipStreamChat:
```
REM Before that, may be need to install Visual Studio 2022, VC++ development options and cmake
set PATH=D:\ComfyUI_windows_portable\python_embeded;D:\ComfyUI_windows_portable\python_embeded\Scripts;%PATH%
cd python_embeded
python -m pip install scikit-build-core
python -m pip install cmake
@@ -57,55 +56,72 @@ python -m pip install llama-cpp-python
- **UI Node Ordering**: These UI nodes are ordered by their titles, and you can change the node titles to something like '10.steps' or '11.cfg'. You can also click on the title to compact the node on the workflow.
- **Label Input**: Each UI node has a 'label' input, which should be a unique identifier used as the parameter name. 'lora' is internally used, so they cannot be used for labels.
- **Enable Output**: Each UI node also has an 'enable' output to use with 'Control Bridge' for switching to bypass some nodes or FlipStreamSwitch* for switching input.
- **Right Panel**: You can operate several prepared functions such as Status, Darker, Tagger, Preset, and Lora.
- **Right Panel**: You can operate several prepared functions such as Status, Darker, Preset, and Lora.
- **Status**: The right panel shows ComfyUI status and error information.
- **Darker**: You can adjust the image brightness on the viewer using the darker parameter. It can also be set via query:
`http://localhost:8188/flipstreamviewer?darker=0.33`
- **Tagger**: You can capture screenshots and generate tags from images using WD14. It depends on ComfyUI-WD14-Tagger.
- **Preset**: You can save and load parameters that are set on viewer controls. The 'M' button means Move to another folder. It can also be set via query:
- **Preset**: You can save and load parameters that are set on viewer controls. There are joking level XOR crypt mode for preset files, it can be use with &px query. The 'M' button means Move to another folder. It can also be set via query:
`http://localhost:8188/flipstreamviewer?showPresetDialog=1&presetFolder=folder_name&presetFile=file_name.json`
- **Lora**: You can select LoRA and choose tags. It can also choose random tags. The LoRA preview box can be clicked to jump to the Civitai LoRA page if found. The 'M' button means Move to another folder. The 'T' button means Toggle. The 'R' button means Random choose.
- **Toggle View**: You can click the center panel to hide the left/right panels and the message box, a subsequent click will show them. It can also be set via query:
`http://localhost:8188/flipstreamviewer?toggleView=1`
- **Run on Load**: The workflow can be run when the page is loaded via query:
`http://localhost:8188/flipstreamviewer?run=1`
- **Message Box**: If a message is set by FlipStreamSetMessage, you can view it at the top left of the center panel.
- **Auto Hide**: Stream and preview in the viewer will automatically hide after 5 minutes if the page is not reloaded.
- **Reset**: clears the queue, interrupts the current run and resets all viewer parameters, state and stream. It can be called via query:
`http://localhost:8188/flipstreamviewer?reset=1`
## UI Nodes
- **FlipStreamSection**: A section label for UI Nodes.
- **FlipStreamSection**: A section label for UI Nodes. 'closed' makes the section collapsed initially.
- **FlipStreamButton**: Run and Capture buttons. The Capture button can be use with FlipStreamGetFrame to get captured image.
- **FlipStreamSlider**: A slider for adjusting values.
- **FlipStreamTextBox**: A text box for inputting multiline text.
- **FlipStreamInputBox**: An input box for various boxtype inputs. The 'U' button means update. You can choose special boxtype 'seed' or 'r4d' with the 'R' button, which means randomize. The boxtype 'r4d' can be used to generate a 4-digit part of a prompt like 'MOV_{num}'. In this case, FlipStreamTextReplace can help find '{num}' and replace with the output of the input box.
- **FlipStreamSelectBox_Samplers**: A select box for choosing samplers.
- **FlipStreamSelectBox_Scheduler**: A select box for choosing schedulers.
- **FlipStreamSizeSelect**: A select box for choosing size by aspect ratio. The size can also get using FlipStreamGetSize.
- **FlipStreamFileSelect_Checkpoints**: A file selector for checkpoints. 'mode' is used to select a subfolder such as 'sd15', 'sdxl', 'pony', or 'flux' in 'checkpoints'. 'use_sub' means using subfolders in the 'mode' folder. 'use_move' means using the move file selector.
- **FlipStreamFileSelect_DiffusionModels**: A file selector for diffusion models.
- **FlipStreamFileSelect_VAE**: A file selector for VAE models.
- **FlipStreamFileSelect_LLM**: A file selector for LLM models.
- **FlipStreamFileSelect_ControlNetModel**: A file selector for ControlNet models.
- **FlipStreamFileSelect_TensorRT**: A file selector for TensorRT models. It may be used with ComfyUI_TensorRT.
- **FlipStreamFileSelect_AnimateDiffModel**: A file selector for AnimateDiff models. It may be used with ComfyUI-AnimateDiff-Evolved.
- **FlipStreamFileSelect_Input**: A file selector for ComfyUI input folder.
- **FlipStreamFileSelect_Output**: A file selector for ComfyUI output folder.
- **FlipStreamPreviewBox**: A box for previewing the input image. You can select the ROI (Region of Interest) in the preview by dragging the mouse.
- **FlipStreamPasteBox**: A box for paste an input image. You can select the box by click once, then you can paste image from clipboard by Ctrl+V or delete image by DEL.
- **FlipStreamLogBox**: A box for displaying logs on the screen.
## Other Nodes
- **FlipStreamSetUpdateAndReload**: Updates parameters and reloads pages after a delay.
- **FlipStreamRunOnce**: Updates parameters, reloads pages, and run the current workflow once.
- **FlipStreamSetMessage**: Sets a message for the message box at the bottom of the center panel.
- **FlipStreamAnd(experimental)**: Multiple inputs AND operation node.
- **FlipStreamOr(experimental)**: Multiple inputs OR operation node.
- **FlipStreamSetState**: A node for setting internal state.
- **FlipStreamGetState**: A node for getting internal state.
- **FlipStreamSetParam**: A node for setting parameters. However, it needs a reload to update the value in the viewer UI.
- **FlipStreamGetParam**: A node for getting parameters. 'lora' is a prepared parameter that contains text at the Lora input. Some prompts can contain '{lora}' and FlipStreamTextReplace can help find '{lora}' and replace it with the output of the get param node of 'lora'. 'b64dec' is true for 'lora' and other 'FlipStreamTextBox' parameters, because these multiline parameters are internally base64 encoded.
- **FlipStreamGet(experimental)**: A node for getting internal state and parameters with independent node cache.
- **FlipStreamGetFrame**: A node for get image from frame buffer. It can be use with FlipStreamButton - Capture button to get captured image.
- **FlipStreamGetPreviewRoi**: A node for obtaining the preview ROI (Region of Interest) selection.
- **FlipStreamImageSize**: A node for getting image size.
- **FlipStreamTextReplace**: A node for replacing text. It will output the result of `text.replace(find, replace.format(value))`.
- **FlipStreamTextConcat**: A node for concatenate text.
- **FlipStreamScreenGrabber**: A node for grab multiframe screenshots.
- **FlipStreamVideoInput**: A node for input video frames.
- **FlipStreamSource**: A node for prepare image or latent source.
- **FlipStreamSwitchImage**: A node for switching images.
- **FlipStreamSwitchLatent**: A node for switching latents.
- **FlipStreamGate**: A node for consolidating input timing to ensure that inputs to the sampler do not occur sequentially.
- **FlipStreamGate(deprecated)**: A node for consolidating input timing to ensure that inputs to the sampler do not occur sequentially.
- **FlipStreamRembg**: A node for remove background. It depends on ComfyUI-Inspyrenet-Rembg.
- **FlipStreamSegMask**: A node for segmentation masks. The target can contain multiple words separated by commas for segmentation. It will use the 'microsoft/Florence-2-large' model, which you can download using the DownloadAndLoadFlorence2Model node of ComfyUI-Florence2. Segmentation sometimes fails, so you may need to try some other random seeds.
- **FlipStreamSegMask(deprecated)**: Currently cannot use, so please use original node ComfyUI-Florence2.
- **FlipStreamChat**: Loads an LLM (Large Language Model) and obtains chat responses. It only supports *.gguf files in the models/LLM folder and uses llama-cpp-python. The output format can be customized using the response_format parameter, which supports [JSON Schema](https://llama-cpp-python.readthedocs.io/en/latest/#json-schema-mode) for structured responses.
- **FlipStreamParseJson**: Extracts values for multiple keys from a JSON string and joins them using a specified delimiter.
- **FlipStreamChatJson**: Mix and simplified FlipStreamChat and FlipStreamParseJson using auto generated json scheme.
- **FlipStreamBatchPrompt**: A node for simple batch prompting. Use the following format for the input prompt of this node. The 'pre text' and 'append text' sections apply to all frames. The separator `----` should consist of four hyphens, and each line of 'frame text' applies evenly to the number of frames specified in 'frames'. For example, if 'frames' is 8 and there are 2 'frame text' lines, they will be applied starting from frames 0 and 4.
```
pre text,
@@ -117,19 +133,21 @@ append text
```
- **FlipStreamFilmVfi**: A node for video frame interpolation. It depends on ComfyUI-Frame-Interpolation.
- **FlipStreamViewer**: A node for viewing content. The 'allowip' parameter allows you to set IP addresses that can access the viewer. ComfyUI commandline options "--listen 0.0.0.0" and appropriate firewall settings are also needed for that. The 'w14exc' parameter is used to set exclude_tags for the WD14 Tagger. 'fps' can control flip speed.
## For More Quality
- Use more higher-quality checkpoint models.
- To enhance stability between frames, use a deliberate prompt in the 'pre text' to establish a consistent background, such as `ideal background, on desk`.
- Select the appropriate words or LoRA in 'frame text' to achieve the desired motion.
## For More Speed
- ComfyUI commandline options '--fast --fp8_e4m3fn-unet' are good for speed, however it depends on system and model.
- **FlipStreamViewerSimple**: Simplified FlipStreamViewer.
- **FlipStreamViewerVideo**: Streams frames (and optional audio) to the viewer as a single MP4 instead of PNG frames, it is much faster for long or large videos. Audio is muted and the volume is 0 by default, the mute button and volume slider appear at the top left. FlipStreamGetFrame cannot get frames from the video stream.
- **FlipStreamLogger**: Prints the input data to the console with a label.
- **FlipStreamCurrent**: A node for setting current information text on the right panel status info.
- **FlipStreamAllowIp**: A node for setting allowip.
- **FlipStreamLoraMode**: A node for setting loraMode.
- **FlipStreamSaveApiWorkflow**: A node for save current workflow as api workflow.
- **FlipStreamRunApiWorkflow**: A node for run an api workflow.
- **FlipStreamFree**: A node for free model and comfy caches.
- **FlipStreamShutdown**: A node for scheduling shutdown (Windows only).
## Workflow Examples
These workflow are sometimes old.
- **simple.json**: Customized a ComfyUI default workflow for FlipStreamViewer UI nodes.
- **dmd2_lora.json**: Using DMD2 and some LoRA, only needs 5 steps to generate an image.
- **segmask.json**: A 2-step process for generating frames using batch prompts and segmentation mask, followed by interpolation.
+2 -3
View File
@@ -1,3 +1,2 @@
from .flipstreamviewer import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
from .flipstreamviewer import WEB_DIRECTORY, NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
__all__ = ['WEB_DIRECTORY', 'NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
+1785 -385
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui_flipstreamviewer"
description = "ComfyUI_FlipStreamViewer is a tool that provides a customizable viewer interface for flipping images with frame interpolation."
version = "3.5.1"
version = "4.1.0"
license = {file = "LICENSE.txt"}
[project.urls]
+68
View File
@@ -0,0 +1,68 @@
import { app } from "../../../scripts/app.js";
import { api } from "../../../scripts/api.js";
app.registerExtension({
name: "FlipStreamViewer.RunOnce",
async setup() {
api.addEventListener("FlipStreamViewer_run_once", async () => {
await api.interrupt();
await api.fetchApi("/queue", {
method: "POST",
body: JSON.stringify({ clear: true }),
});
await app.queuePrompt(0, 1);
});
}
});
app.registerExtension({
name: "FlipStreamViewer.FlipStreamChatJson",
async beforeRegisterNodeDef(t, d) {
const config = {
"FlipStreamGet": { in: 0, out: 2, range: 20, iname:'label', oname:'value', useo: true },
"FlipStreamChatJson": { in: 11, out: 3, range: 20, iname:'label', oname:'value', useo: true },
"FlipStreamTextConcat": { in: 2, out: 1, range: 20, iname:'text', oname:'', useo: false }
};
const CFG = config[d.name];
if (!CFG) return;
const sync = (n) => {
const w = n.widgets;
if (CFG.useo) {
while (n.outputs.length > w.length + CFG.out - CFG.in) {
if (n.outputs.length < CFG.out || n.outputs[n.outputs.length - 1]?.links?.length) break;
n.removeOutput(n.outputs.length - 1);
n.outputs_dirty = true;
}
}
if (w.length < CFG.in + CFG.range && (w.at(-1)?.value || n.inputs[w.length - 1]?.link !== null)) {
if (CFG.useo) {
n.addOutput(`${CFG.oname}${w.length - CFG.in}`, "*");
n.outputs_dirty = true;
}
const inputName = `${CFG.iname}${w.length - CFG.in}`;
n.addWidget("string", inputName, "", () => {}, { forceInput: true });
n.inputs_dirty = true;
}
while (w.length > CFG.in + 1 && (!w.at(-1).value && n.inputs[w.length - 1]?.link === null) && (!w.at(-2).value && n.inputs[w.length - 2]?.link === null)) {
if (n.outputs[w.length + CFG.out - CFG.in - 1]?.links?.length) break;
if (CFG.useo) {
n.removeOutput(w.length + CFG.out - CFG.in - 1);
n.outputs_dirty = true;
}
w.pop();
n.inputs_dirty = true;
}
n.setSize(n.computeSize());
n.setDirtyCanvas(true, true);
};
t.prototype.onNodeCreated = function() { sync(this); };
t.prototype.onWidgetChanged = function() { sync(this); };
t.prototype.onConnectionsChange = function(type, slot, connected, info) { requestAnimationFrame(() => sync(this)); };
t.prototype.onConfigure = function(c) {
c.widgets_values.forEach((v, i) => { if (this.widgets[i]) this.widgets[i].value = v; sync(this);});
};
}
});