Commit 78cc5a7
authored
feat(nodes): versioning (#4449)
## What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Community Node Submission
## Have you discussed this change with the InvokeAI team?
- [x] Yes
- [ ] No, because:
## Have you updated all relevant documentation?
- [x] Yes
- [ ] No
## Description
This PR is based on #4423 and should not be merged until it is merged.
[feat(nodes): add version to node
schemas](c179d4c)
The `@invocation` decorator is extended with an optional `version` arg.
On execution of the decorator, the version string is parsed using the
`semver` package (this was an indirect dependency and has been added to
`pyproject.toml`).
All built-in nodes are set with `version="1.0.0"`.
The version is added to the OpenAPI Schema for consumption by the
client.
[feat(ui): handle node
versions](03de3e4)
- Node versions are now added to node templates
- Node data (including in workflows) include the version of the node
- On loading a workflow, we check to see if the node and template
versions match exactly. If not, a warning is logged to console.
- The node info icon (top-right corner of node, which you may click to
open the notes editor) now shows the version and mentions any issues.
- Some workflow validation logic has been shifted around and is now
executed in a redux listener.
## Related Tickets & Documents
<!--
For pull requests that relate or close an issue, please include them
below.
For example having the text: "closes #1234" would connect the current
pull
request to issue 1234. And when we merge the pull request, Github will
automatically close the issue.
-->
- Closes #4393
## QA Instructions, Screenshots, Recordings
<!--
Please provide steps on how to test changes, any hardware or
software specifications as well as any other pertinent information.
-->
Loading old workflows should prompt a warning, and the node status icon
should indicate some action is needed.
## [optional] Are there any post deployment tasks we need to perform?
I've updated the default workflows:
- Bump workflow versions from 1.0 to 1.0.1
- Add versions for all nodes in the workflows
- Test workflows
[Default
Workflows.zip](https://github.com/invoke-ai/InvokeAI/files/12511911/Default.Workflows.zip)
I'm not sure where these are being stored right now @MilluFile tree
38 files changed
+504
-164
lines changed- docs/contributing
- invokeai
- app/invocations
- frontend/web
- src
- app/store/middleware/listenerMiddleware
- listeners
- features
- gallery/components
- CurrentImage
- ImageContextMenu
- nodes
- components/flow
- nodes/Invocation
- hooks
- store
- types
- util
- services/api
- tests/nodes
38 files changed
+504
-164
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
247 | 251 | | |
248 | | - | |
| 252 | + | |
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| |||
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
282 | | - | |
283 | | - | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
401 | 406 | | |
402 | 407 | | |
403 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
404 | 412 | | |
405 | 413 | | |
406 | 414 | | |
| |||
499 | 507 | | |
500 | 508 | | |
501 | 509 | | |
| 510 | + | |
| 511 | + | |
502 | 512 | | |
503 | 513 | | |
504 | 514 | | |
| |||
567 | 577 | | |
568 | 578 | | |
569 | 579 | | |
570 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
571 | 585 | | |
572 | 586 | | |
573 | 587 | | |
| |||
594 | 608 | | |
595 | 609 | | |
596 | 610 | | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
597 | 617 | | |
598 | 618 | | |
599 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| |||
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| 355 | + | |
354 | 356 | | |
355 | 357 | | |
356 | 358 | | |
| |||
403 | 405 | | |
404 | 406 | | |
405 | 407 | | |
406 | | - | |
| 408 | + | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| |||
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
| |||
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| |||
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| 228 | + | |
224 | 229 | | |
225 | 230 | | |
226 | 231 | | |
| |||
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| |||
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
| 273 | + | |
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
| |||
288 | 295 | | |
289 | 296 | | |
290 | 297 | | |
| 298 | + | |
291 | 299 | | |
292 | 300 | | |
293 | 301 | | |
| |||
314 | 322 | | |
315 | 323 | | |
316 | 324 | | |
| 325 | + | |
317 | 326 | | |
318 | 327 | | |
319 | 328 | | |
| |||
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
332 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
333 | 344 | | |
334 | 345 | | |
335 | 346 | | |
| |||
350 | 361 | | |
351 | 362 | | |
352 | 363 | | |
353 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
354 | 367 | | |
355 | 368 | | |
356 | 369 | | |
| |||
376 | 389 | | |
377 | 390 | | |
378 | 391 | | |
| 392 | + | |
379 | 393 | | |
380 | 394 | | |
381 | 395 | | |
| |||
405 | 419 | | |
406 | 420 | | |
407 | 421 | | |
| 422 | + | |
408 | 423 | | |
409 | 424 | | |
410 | 425 | | |
| |||
420 | 435 | | |
421 | 436 | | |
422 | 437 | | |
| 438 | + | |
423 | 439 | | |
424 | 440 | | |
425 | 441 | | |
| |||
442 | 458 | | |
443 | 459 | | |
444 | 460 | | |
| 461 | + | |
445 | 462 | | |
446 | 463 | | |
447 | 464 | | |
| |||
470 | 487 | | |
471 | 488 | | |
472 | 489 | | |
| 490 | + | |
473 | 491 | | |
474 | 492 | | |
475 | 493 | | |
| |||
509 | 527 | | |
510 | 528 | | |
511 | 529 | | |
| 530 | + | |
512 | 531 | | |
513 | 532 | | |
514 | 533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 13 | + | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
| |||
0 commit comments