Repository navigation
Conversation
|
Why does this having its own scripting language? As opposed to any of: |
|
Some of the motivations for the weird made up language is in the readme https://github.com/Berni-k/SwarmUI-FlyPatch#why-a-script-language a) Was not aware swarm can dynamically load extensions. I thought new extensions can only load at Swarm startup (and this made fine tweaking extensions annoying to me, having to constantly restart). But would it even be acceptable to accept C# code text trough a UI and build it at runtime? (it sounds risky to me). Or is there some way to rebuild extensions from disk while running that i missed? b) The c) Custom workflows with SwarmInput nodes is exactly what i been using for the past 2 years (and still use for the Simple Tab, works great!). But it takes time to wire up SwarmInput nodes. More importantly it "hard forks" the workflow from being able to use the proper full Generate tab. Not having to hand craft ComfyUI workflows is the reason i use SwarmUI. So with FlyPatch it me lets me access a reusable workflow modification using 1 dropdown menu click on any Generation tab workflow. Especially for Comfy nodes/models not yet supported by Swarm. But in general the motivation is to let the average Joe make their own workflow tweaks with 0 coding experience by just hand modifying the Comfy tab workflow and saving the difference as a patch script (takes <1 minute to adapt an example workflow to Swarm with it). In that case the scripting language is merely a save format in a more human readable form. I am open to suggestions for switching to a better language/UI that fits into Swarm better. |
|
I meant just. Making the node tweaks via the SwarmInput node setup and then saving it as a workflow, as opposed to a whole new system for how to define and track them |
|
Which one of these things do you mean by that? Or do you mean just not having an extension at all for this and using the existing Custom workflow functionality? |
My new, rather large extension has reached a mature enough state that I'm confident submitting it to the official extension list.
https://github.com/Berni-k/SwarmUI-FlyPatch
It lets users patch any part of the Generate tab workflow, adding extra nodes or modifying existing ones. I made it for my own needs: tweaking and trying things without writing a whole extension for each one and restarting Swarm every time. But I think others can benefit from it too, eg to quickly try a hot new custom node without waiting for someone else to make yet another extension for it.
The custom scripting language is intentionally limited to workflow operations rather than using a real scripting language. It can offer ways to download missing nodes or models, but never does so without the user's permission/assistance.
A lot of it was written with Claude Opus but with manual code review done on top. The javascript side is less reviewed as i am not much of a web developer.
It has been tested by a number of users so far in the extensions discord thread.
The extension does a few hacky things with Swarm that I couldn't find a cleaner way around so far:
comfyImportWorkflow, then puts them back.I realize some of these should really be fixed with core PRs, but they touch fairly vital machinery in Swarm, so it is likely best to leave it to someone more experienced with the codebase