Commit 2bd3cf2
authored
nodes phase 5: workflow saving and loading (#4353)
## What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Community Node Submission
## Description
- Workflows are saved to image files directly
- Image-outputting nodes have an `Embed Workflow` checkbox which, if
enabled, saves the workflow
- `BaseInvocation` now has an `workflow: Optional[str]` field, so all
nodes automatically have the field (but again only image-outputting
nodes display this in UI)
- If this field is enabled, when the graph is created, the workflow is
stringified and set in this field
- Nodes should add `workflow=self.workflow` when they save their output
image to have the workflow written to the image
- Uploads now have their metadata retained so that you can upload
somebody else's image and have access to that workflow
- Graphs are no longer saved to images, workflows replace them
### TODO
- Images created in the linear UI do not have a workflow saved yet. Need
to write a function to build a workflow around the linear UI graph when
using linear tabs. Unfortunately it will not have the nice positioning
and size data the node editor gives you when you save a workflow...
we'll have to figure out how to handle this.
## 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.
-->
- Related Issue #
- Closes #
## QA Instructions, Screenshots, Recordings
<!--
Please provide steps on how to test changes, any hardware or
software specifications as well as any other pertinent information.
-->File tree
103 files changed
+3404
-2699
lines changed- docs/contributing
- invokeai
- app
- invocations
- services
- models
- frontend/web
- public/locales
- src
- common/components
- features
- gallery/components
- Boards
- CurrentImage
- ImageContextMenu
- ImageMetadataViewer
- nodes
- components
- flow
- nodes
- Invocation
- fields
- inputs
- common
- panels/TopCenterPanel
- sidePanel/inspector
- outputs
- hooks
- store
- types
- util
- graphBuilders
- parameters
- components/Parameters/ControlNet
- hooks
- services/api
- endpoints
- thunks
- theme
- tests/nodes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
103 files changed
+3404
-2699
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | | - | |
24 | | - | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
144 | | - | |
145 | 147 | | |
146 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
| |||
365 | 370 | | |
366 | 371 | | |
367 | 372 | | |
368 | | - | |
369 | | - | |
| 373 | + | |
370 | 374 | | |
371 | 375 | | |
372 | | - | |
373 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
374 | 379 | | |
375 | 380 | | |
376 | 381 | | |
| |||
383 | 388 | | |
384 | 389 | | |
385 | 390 | | |
386 | | - | |
| 391 | + | |
| 392 | + | |
387 | 393 | | |
388 | | - | |
389 | | - | |
| 394 | + | |
| 395 | + | |
390 | 396 | | |
391 | 397 | | |
392 | 398 | | |
| |||
422 | 428 | | |
423 | 429 | | |
424 | 430 | | |
425 | | - | |
426 | | - | |
427 | 431 | | |
| 432 | + | |
| 433 | + | |
428 | 434 | | |
429 | | - | |
430 | | - | |
| 435 | + | |
| 436 | + | |
431 | 437 | | |
432 | 438 | | |
433 | 439 | | |
| |||
466 | 472 | | |
467 | 473 | | |
468 | 474 | | |
| 475 | + | |
| 476 | + | |
469 | 477 | | |
470 | 478 | | |
471 | 479 | | |
| |||
505 | 513 | | |
506 | 514 | | |
507 | 515 | | |
508 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
509 | 519 | | |
510 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
511 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
512 | 538 | | |
513 | 539 | | |
514 | 540 | | |
515 | | - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
516 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
517 | 555 | | |
518 | | - | |
519 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
520 | 561 | | |
521 | | - | |
| 562 | + | |
522 | 563 | | |
523 | 564 | | |
524 | 565 | | |
525 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
526 | 585 | | |
527 | 586 | | |
528 | 587 | | |
529 | 588 | | |
530 | 589 | | |
531 | | - | |
532 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
533 | 619 | | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | 620 | | |
540 | 621 | | |
541 | 622 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
15 | | - | |
| 13 | + | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 17 | | |
23 | 18 | | |
24 | 19 | | |
| |||
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
36 | | - | |
37 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
| |||
49 | 45 | | |
50 | 46 | | |
51 | 47 | | |
52 | | - | |
53 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
265 | 262 | | |
266 | 263 | | |
267 | 264 | | |
268 | | - | |
269 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
273 | | - | |
274 | | - | |
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
| |||
324 | 323 | | |
325 | 324 | | |
326 | 325 | | |
327 | | - | |
328 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
332 | | - | |
333 | | - | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
| |||
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
| 376 | + | |
375 | 377 | | |
376 | 378 | | |
377 | 379 | | |
378 | | - | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
382 | | - | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | 387 | | |
390 | 388 | | |
391 | 389 | | |
| |||
0 commit comments