Buckets:
| import node_helpers | |
| from typing_extensions import override | |
| from comfy_api.latest import ComfyExtension, io | |
| class ReferenceLatent(io.ComfyNode): | |
| def define_schema(cls): | |
| return io.Schema( | |
| node_id="ReferenceLatent", | |
| display_name="Set Reference Latent", | |
| category="model/conditioning", | |
| description="This node sets the guiding latent for an edit model. If the model supports it you can chain multiple to set multiple reference images.", | |
| inputs=[ | |
| io.Conditioning.Input("conditioning"), | |
| io.Latent.Input("latent", optional=True), | |
| ], | |
| outputs=[ | |
| io.Conditioning.Output(), | |
| ] | |
| ) | |
| def execute(cls, conditioning, latent=None) -> io.NodeOutput: | |
| if latent is not None: | |
| conditioning = node_helpers.conditioning_set_values(conditioning, {"reference_latents": [latent["samples"]]}, append=True) | |
| return io.NodeOutput(conditioning) | |
| class EditModelExtension(ComfyExtension): | |
| async def get_node_list(self) -> list[type[io.ComfyNode]]: | |
| return [ | |
| ReferenceLatent, | |
| ] | |
| def comfy_entrypoint() -> EditModelExtension: | |
| return EditModelExtension() | |
Xet Storage Details
- Size:
- 1.3 kB
- Xet hash:
- 20f2edfa566ddf89dda197ded72ecff07433df286bff56cbb97a1fa46c3fdbd3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.