Skip to content

Conversation

@psychedelicious
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • 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

  • Related Issue #
  • Closes #

QA Instructions, Screenshots, Recordings

was causing failure to save images
…y) to decorator

All invocation metadata (type, title, tags and category) are now defined in decorators.

The decorators add the `type: Literal["invocation_type"]: "invocation_type"` field to the invocation.

Category is a new invocation metadata, but it is not used by the frontend just yet.

- `@invocation()` decorator for invocations

```py
@invocation(
    "sdxl_compel_prompt",
    title="SDXL Prompt",
    tags=["sdxl", "compel", "prompt"],
    category="conditioning",
)
class SDXLCompelPromptInvocation(BaseInvocation, SDXLPromptInvocationBase):
    ...
```

- `@invocation_output()` decorator for invocation outputs

```py
@invocation_output("clip_skip_output")
class ClipSkipInvocationOutput(BaseInvocationOutput):
    ...
```

- update invocation docs
- add category to decorator
- regen frontend types
@psychedelicious
Copy link
Contributor Author

There's a circular dependency in the frontend code that I'm not going to get around to fixing. This can be force-merged.

@hipsterusername hipsterusername merged commit 2bd3cf2 into main Aug 30, 2023
@hipsterusername hipsterusername deleted the feat/nodes-phase-5 branch August 30, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants