34 Commits
Author SHA1 Message Date
Austin Mroz 76d4d8e91e WIP cache rewrite
A more correct implementation that instead extends the caching subsystem
of execution should be used, but is still work in progress
2024-10-17 14:09:22 -05:00
Austin Mroz dfaf02a946 Minimal compatibility with execution inversion
Bare bones changes to make individual node caching work post execution
inversion. This is likely non-viable moving forward information is
pushed into the output cache too late to block prior steps.

I plan a more correct implementation that instead wraps the cache. This
would mean that no changes to the actual execution pathing are required,
but prevents making things forward and backwards compatible
2024-08-22 13:38:37 -05:00
Austin Mroz fc677bb04c Fix license reference 2024-08-01 13:43:31 -05:00
Austin Mroz c286fbecd3 Support auth token in orchestration connection 2024-07-19 14:21:47 -05:00
Austin Mroz 1b8ed8a661 Add command for dumping logs 2024-07-03 16:55:07 -05:00
Austin Mroz 8e16554331 Unify Error responses, signing, caching
Error responses are now always part of a dict with lowercase error as
key.

Files are cached across restarts by url. Likely needs additional
testing for checkpoints.

Fixed an error where booleans could not be eserialized as part of the
change to sign file uploads.
2024-07-03 03:03:49 -05:00
Austin Mroz 9a42e29b49 Fruther orchestration implementation
Responses to orchestration are now wrapped and contain always contain a
message id to keep requests syncronized.

On connection failure, a reconnection is attempted.

Execution time is tracked and included in response data.

Response urls are now signed
2024-07-03 01:58:16 -05:00
Austin Mroz c3f11fa212 I attempt to keep socket open on exception
Exceptions while executing a command are now caught and sent back to the
socket server
2024-06-29 17:56:27 -05:00
Austin Mroz 1089d6e68f Orchestrate by outbound websocket
Responsiveness has been a point of major frustration when debugging.
In an attempt to isolate performance issues and move closer to the end
goal of sophisticated orchestration, an additional means of control has
been added where workers connect to a control server and open a
websocket for two-way communications
2024-06-29 15:26:37 -05:00
Austin Mroz 31e677ba25 Pass on_call args without parsing
With improved logging, I believe I misinterpreted the original error
message. The version of comfy used inside the current container is out
of date, and has fewer args for call_on_start.
2024-06-28 01:29:01 -05:00
Austin Mroz 0e0856ffcb Explicitly define args for wrapped server start 2024-06-27 14:01:41 -05:00
Austin Mroz 58d3d9e475 Fix ready probe, nested target folders
Fixed a minor mistake in reference used for readyness queue

When creating the linked file on disk, subfolder are created first if
needed
2024-06-26 18:40:04 -05:00
Austin Mroz 6267d79a29 Swap license to AGPLV3
As the new code is more targeted to the interests of Banodoco and made
with the express purpose of being run as hosted server code, The license
has been changed to AGLPV3.
2024-06-25 21:05:03 -05:00
Austin Mroz 5d57303356 Fix mistaken index on priority update 2024-06-25 20:22:50 -05:00
Austin Mroz a7846f09c0 Re-enable net checkpointing under new fetch code 2024-06-25 19:39:47 -05:00
Austin Mroz 0b3f5fca9d Include orchestration, rework execution wrapping
Orchestration code (mostly endpoints for probes) was intended as a
seperate plugin, but given the tight tying of asynchronous dependency
code, it has been included in this history and will likely be branched
off as a dedicated repo not available for non client/server
architectures.

much of the execution wrapping code has been moved into a wrapper on
execute instead of recursive executed. This cleans up logic and fixes
issues with collecting all outputs when multiple output nodes exist
2024-06-25 15:49:21 -05:00
Austin Mroz ef3f67fcb3 Rework large file shunking
Rather than requesting as chunks, the stream is kept open and re-added
to the queue every 32MB. This removes the need for the server to report
ranges, or content length, or to recombine chunks, which greatly
simplifies logic.
2024-06-25 14:28:21 -05:00
Austin Mroz 9ada89ebe9 Fix chunk_index for big files, allow dump reqs
Added an environment variable to dump a prompt request and exit, for
easier testing.

Code for big files is executing, but I'm noticing but it produces
output files that are not correct and has incorrectly inserted bytes.

Will either disable or swap to different method of keeping the request
but re-acquiring the connection semaphore
2024-06-25 12:29:52 -05:00
Austin Mroz b02d301970 Implement standalone priority queue for fetches 2024-06-25 03:24:00 -05:00
Austin Mroz 28a710ebf0 Include output files in response
The list of output files needs to bubble back up to the async request
code so that it can be included in the response.
2024-06-24 18:25:37 -05:00
Austin Mroz ec95a0c9b2 Add output tracking.
Will need additional pass to figure out sending the result
2024-06-24 13:22:18 -05:00
Austin Mroz 8debd2cfaf Implement priority system for fetches. 2024-06-24 00:41:22 -05:00
Austin Mroz f0aeafdd6f Merge pyproject and publish branches 2024-06-19 16:18:30 -05:00
snomiao 5c7c719195 chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-06-19 07:00:13 +00:00
snomiao db8f7a770c chore(publish): Add Github Action for Publishing to Comfy Registry 2024-06-19 07:00:12 +00:00
Austin Mroz 0839fbd33c Flesh out readme, Utilize client_id of comfy_runner 2024-06-18 15:14:55 -05:00
Austin Mroz 0375df5465 Successfully wrap the /prompt route
The implementation requires modifying frozen parameters, but I still
consider it by far preferable to needing the logic to select the
modified endpoint.
2024-06-18 14:29:32 -05:00
Austin Mroz 53cc59e535 Implement reset operation for net checkpoints
Fix duplicate prompt checks
2024-06-18 04:01:28 -05:00
Austin Mroz 8f34bf21dd Implement remote storage of checkpoints of S4
Working implementation of external checkpoints using Salad Simple Storage
Service
2024-06-17 22:06:10 -05:00
Austin Mroz 2d61e214b3 LICENSE, README, net fixes, SSS Specifics
Added LICENSE and brief readme

Updated network checking with more specifics to Salad Simple Storage.
The access token is now fetched, checkpoint size is checked before
uploading and checkpoints are read from the inputs folder to ease file
management on workflow dispatch
2024-06-15 15:31:16 -05:00
Austin Mroz 003ca04049 Implement checkpointing over http put requests
Aimed at targeting the Salad Simple Storage,
When net checkpointing is used, there is a system of priority to
requests and requests are uploaded asynchronously.
2024-06-15 00:17:18 -05:00
Austin Mroz 0ac9ad6fbe Save as single file, support cache completed nodes
Logic has been further cleaned up in preparation for networking
integration. There's not longer unique behaviour for what is being saved
and the onus is placed on the caller to provide data in a safetensor
appropriate format

Supported has been added to cache the output of completed nodes. This
code should be trivially expandable to non-sampler nodes, but will need
to be cautiously enabled on a per-node basis to better regulate dataflow
2024-06-14 18:02:41 -05:00
Austin Mroz 83dde78f0c Improved isolation of saving checkpoints.
In preperation for saving checkpoints remotely, all checkpoint
transactions are now wrapped.

Fixed step accumulation on consecutive failures

Support all builtin samplers
2024-06-14 04:25:50 -05:00
Austin Mroz 531fa3f9f2 Base checkpointing implementation
When sampling occurs, intermediate steps are cached to disk.
If at any point execution is halted, interrupted, or crashes, these
checkpoints are loaded from to restore execution from the previous step

Currently largely proof of concept. All samplers will cache, but
restoring is only applied to CustomSampler. Boilerplate is largely in
place to allow for caching output of other non-sampling nodes and will
be investigated later.
2024-06-14 02:40:50 -05:00