From f309ea77f4ee06abd867a272ca2898fc0834c5a2 Mon Sep 17 00:00:00 2001 From: benzguo Date: Fri, 3 May 2024 14:33:57 -0400 Subject: [PATCH] make sync --- substrate/GEN_VERSION | 2 +- substrate/__init__.py | 8 +- substrate/core/future_directive.py | 22 ++++- substrate/core/models.py | 48 ---------- substrate/core/sb.py | 30 +++++++ substrate/future_dataclass_models.py | 60 ------------- substrate/nodes.py | 125 +++------------------------ substrate/typeddict_models.py | 48 ---------- 8 files changed, 65 insertions(+), 278 deletions(-) diff --git a/substrate/GEN_VERSION b/substrate/GEN_VERSION index 51a8d25..a46f8d8 100644 --- a/substrate/GEN_VERSION +++ b/substrate/GEN_VERSION @@ -1 +1 @@ -20240430.20240430 \ No newline at end of file +20240502.20240502 \ No newline at end of file diff --git a/substrate/__init__.py b/substrate/__init__.py index f5ed01c..3fdef23 100644 --- a/substrate/__init__.py +++ b/substrate/__init__.py @@ -1,20 +1,17 @@ """ ꩜ Substrate Python SDK -20240430.20240430 +20240502.20240502 """ from .nodes import ( CLIP, XTTSV2, JinaV2, - BigLaMa, RunCode, - DISISNet, FillMask, EmbedText, EmbedImage, - RealESRGAN, FetchVectors, Firellava13B, GenerateJSON, @@ -90,9 +87,6 @@ "FillMask", "UpscaleImage", "SegmentUnderPoint", - "DISISNet", - "BigLaMa", - "RealESRGAN", "SegmentAnything", "EmbedText", "MultiEmbedText", diff --git a/substrate/core/future_directive.py b/substrate/core/future_directive.py index 0b6e2d5..3546edc 100644 --- a/substrate/core/future_directive.py +++ b/substrate/core/future_directive.py @@ -11,8 +11,7 @@ ) from dataclasses import asdict, dataclass -OpType = Literal["trace", "string-concat", "jq"] -ConcatDirection = Literal["left", "right"] +OpType = Literal["trace", "string-concat", "jq", "short-circuit"] class BaseDirective(ABC): @@ -51,6 +50,25 @@ class JQDirective(BaseDirective): type: Literal["jq"] = "jq" +@dataclass +class ShortCircuitConditionTarget: + future_id: Optional[str] + val: Optional[bool] + + +@dataclass +class ShortCircuitInputTarget: + future_id: Optional[str] + val: Optional[bool] + + +@dataclass +class ShortCircuitDirective(BaseDirective): + condition: ShortCircuitConditionTarget + input: ShortCircuitInputTarget + type: Literal["short-circuit"] = "short-circuit" + + TraceType = Literal["attr", "item"] diff --git a/substrate/core/models.py b/substrate/core/models.py index 6c3093c..9071f87 100644 --- a/substrate/core/models.py +++ b/substrate/core/models.py @@ -167,10 +167,6 @@ class BatchGenerateTextIn(BaseModel): """ Maximum number of tokens to generate. """ - node: Literal["Mistral7BInstruct"] = "Mistral7BInstruct" - """ - Selected node. - """ class BatchGenerateTextOut(BaseModel): @@ -231,10 +227,6 @@ class BatchGenerateJSONIn(BaseModel): """ Maximum number of tokens to generate. """ - node: Literal["Mistral7BInstruct"] = "Mistral7BInstruct" - """ - Selected node. - """ class BatchGenerateJSONOut(BaseModel): @@ -405,10 +397,6 @@ class GenerateTextVisionIn(BaseModel): """ Maximum number of tokens to generate. """ - node: Literal["Firellava13B"] = "Firellava13B" - """ - Selected node. - """ class GenerateTextVisionOut(BaseModel): @@ -449,10 +437,6 @@ class GenerateImageIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXL"] = "StableDiffusionXL" - """ - Selected node. - """ class GenerateImageOut(BaseModel): @@ -475,10 +459,6 @@ class MultiGenerateImageIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXL"] = "StableDiffusionXL" - """ - Selected node. - """ class MultiGenerateImageOut(BaseModel): @@ -692,10 +672,6 @@ class GenerativeEditImageIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXLInpaint"] = "StableDiffusionXLInpaint" - """ - Selected node. - """ class GenerativeEditImageOut(BaseModel): @@ -726,10 +702,6 @@ class MultiGenerativeEditImageIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXLInpaint"] = "StableDiffusionXLInpaint" - """ - Selected node. - """ class MultiGenerativeEditImageOut(BaseModel): @@ -828,10 +800,6 @@ class FillMaskIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["BigLaMa"] = "BigLaMa" - """ - Selected node. - """ class FillMaskOut(BaseModel): @@ -880,10 +848,6 @@ class RemoveBackgroundIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["DISISNet"] = "DISISNet" - """ - Selected node. - """ class RemoveBackgroundOut(BaseModel): @@ -920,10 +884,6 @@ class UpscaleImageIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["RealESRGAN"] = "RealESRGAN" - """ - Selected node. - """ class UpscaleImageOut(BaseModel): @@ -964,10 +924,6 @@ class SegmentUnderPointIn(BaseModel): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["SegmentAnything"] = "SegmentAnything" - """ - Selected node. - """ class SegmentUnderPointOut(BaseModel): @@ -1111,10 +1067,6 @@ class GenerateSpeechIn(BaseModel): """ Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the audio data will be returned as a base64-encoded string. """ - node: Literal["XTTSV2"] = "XTTSV2" - """ - Selected node. - """ class GenerateSpeechOut(BaseModel): diff --git a/substrate/core/sb.py b/substrate/core/sb.py index 4c6a12e..4991ebb 100644 --- a/substrate/core/sb.py +++ b/substrate/core/sb.py @@ -10,10 +10,14 @@ ConcatDirective, JQDirectiveTarget, ConcatDirectiveItem, + ShortCircuitDirective, + ShortCircuitInputTarget, + ShortCircuitConditionTarget, ) StringConcatable = Union[str, None, Future] JQCompatible = Union[Future, JQTargetType] +ConditionCompatible = Union[Future, bool] class sb: @@ -64,3 +68,29 @@ def jq(cls, target: JQCompatible, query: str) -> Any: if isinstance(target, Future): result.FutureG.add_edge(target, result) return result # type: ignore + + @classmethod + def only_if(cls, condition: ConditionCompatible, input: Union[Future, Any]) -> Any: + """ + Short-circuiting conditional edge. + Only evaluate the subsequent node with the provided input if the condition is true. + :param condition: A boolean or a future reference to a boolean. + :param input: A future reference to the output of another node. + :return: A future reference to the short-circuiting `only_if` operator. + """ + c_future_id = condition.id if isinstance(condition, Future) else None + c_val = condition if not isinstance(condition, Future) else None + i_future_id = input.id if isinstance(input, Future) else None + i_val = input if not isinstance(input, Future) else None + directive = ShortCircuitDirective( + condition=ShortCircuitConditionTarget(future_id=c_future_id, val=c_val), + input=ShortCircuitInputTarget(future_id=i_future_id, val=i_val), + ) + result = Future(directive=directive) + # add edge to the condition future + if isinstance(condition, Future): + result.FutureG.add_edge(condition, result) + # add edge to the input future + if isinstance(input, Future): + result.FutureG.add_edge(input, result) + return result # type: ignore diff --git a/substrate/future_dataclass_models.py b/substrate/future_dataclass_models.py index c2f5e6f..cc18edc 100644 --- a/substrate/future_dataclass_models.py +++ b/substrate/future_dataclass_models.py @@ -245,11 +245,6 @@ class FutureBatchGenerateTextIn: (Future reference) Maximum number of tokens to generate. """ - node: Literal["Mistral7BInstruct"] = "Mistral7BInstruct" - """ - (Future reference) - Selected node. - """ @dataclass @@ -342,11 +337,6 @@ class FutureBatchGenerateJSONIn: (Future reference) Maximum number of tokens to generate. """ - node: Literal["Mistral7BInstruct"] = "Mistral7BInstruct" - """ - (Future reference) - Selected node. - """ @dataclass @@ -619,11 +609,6 @@ class FutureGenerateTextVisionIn: (Future reference) Maximum number of tokens to generate. """ - node: Literal["Firellava13B"] = "Firellava13B" - """ - (Future reference) - Selected node. - """ @dataclass @@ -691,11 +676,6 @@ class FutureGenerateImageIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXL"] = "StableDiffusionXL" - """ - (Future reference) - Selected node. - """ @dataclass @@ -732,11 +712,6 @@ class FutureMultiGenerateImageIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXL"] = "StableDiffusionXL" - """ - (Future reference) - Selected node. - """ @dataclass @@ -1050,11 +1025,6 @@ class FutureGenerativeEditImageIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXLInpaint"] = "StableDiffusionXLInpaint" - """ - (Future reference) - Selected node. - """ @dataclass @@ -1101,11 +1071,6 @@ class FutureMultiGenerativeEditImageIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["StableDiffusionXLInpaint"] = "StableDiffusionXLInpaint" - """ - (Future reference) - Selected node. - """ @dataclass @@ -1254,11 +1219,6 @@ class FutureFillMaskIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["BigLaMa"] = "BigLaMa" - """ - (Future reference) - Selected node. - """ @dataclass @@ -1336,11 +1296,6 @@ class FutureRemoveBackgroundIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["DISISNet"] = "DISISNet" - """ - (Future reference) - Selected node. - """ @dataclass @@ -1403,11 +1358,6 @@ class FutureUpscaleImageIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["RealESRGAN"] = "RealESRGAN" - """ - (Future reference) - Selected node. - """ @dataclass @@ -1475,11 +1425,6 @@ class FutureSegmentUnderPointIn: (Future reference) Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: Literal["SegmentAnything"] = "SegmentAnything" - """ - (Future reference) - Selected node. - """ @dataclass @@ -1697,11 +1642,6 @@ class FutureGenerateSpeechIn: (Future reference) Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the audio data will be returned as a base64-encoded string. """ - node: Literal["XTTSV2"] = "XTTSV2" - """ - (Future reference) - Selected node. - """ @dataclass diff --git a/substrate/nodes.py b/substrate/nodes.py index 5d4ae28..10a6fac 100644 --- a/substrate/nodes.py +++ b/substrate/nodes.py @@ -1,20 +1,17 @@ """ ꩜ Substrate @GENERATED FILE -20240430.20240430 +20240502.20240502 """ from .core.models import ( CLIPOut, JinaV2Out, XTTSV2Out, - BigLaMaOut, RunCodeOut, - DISISNetOut, FillMaskOut, EmbedTextOut, EmbedImageOut, - RealESRGANOut, FetchVectorsOut, Firellava13BOut, GenerateJSONOut, @@ -57,13 +54,10 @@ CLIPIn, JinaV2In, XTTSV2In, - BigLaMaIn, RunCodeIn, - DISISNetIn, FillMaskIn, EmbedTextIn, EmbedImageIn, - RealESRGANIn, FetchVectorsIn, Firellava13BIn, GenerateJSONIn, @@ -105,13 +99,10 @@ FutureCLIPOut, FutureJinaV2Out, FutureXTTSV2Out, - FutureBigLaMaOut, FutureRunCodeOut, - FutureDISISNetOut, FutureFillMaskOut, FutureEmbedTextOut, FutureEmbedImageOut, - FutureRealESRGANOut, FutureFetchVectorsOut, FutureFirellava13BOut, FutureGenerateJSONOut, @@ -250,7 +241,7 @@ class BatchGenerateText(CoreNode[BatchGenerateTextOut]): def __init__(self, args: BatchGenerateTextIn, hide: bool = False): """ - Input arguments: `prompts`, `temperature` (optional), `max_tokens` (optional), `node` (optional) + Input arguments: `prompts`, `temperature` (optional), `max_tokens` (optional) Output fields: `future.outputs` @@ -280,7 +271,7 @@ class BatchGenerateJSON(CoreNode[BatchGenerateJSONOut]): def __init__(self, args: BatchGenerateJSONIn, hide: bool = False): """ - Input arguments: `prompts`, `json_schema`, `temperature` (optional), `max_tokens` (optional), `node` (optional) + Input arguments: `prompts`, `json_schema`, `temperature` (optional), `max_tokens` (optional) Output fields: `future.outputs` @@ -370,7 +361,7 @@ class GenerateTextVision(CoreNode[GenerateTextVisionOut]): def __init__(self, args: GenerateTextVisionIn, hide: bool = False): """ - Input arguments: `prompt`, `image_uris`, `max_tokens` (optional), `node` (optional) + Input arguments: `prompt`, `image_uris`, `max_tokens` (optional) Output fields: `future.text` @@ -550,7 +541,7 @@ class GenerateImage(CoreNode[GenerateImageOut]): def __init__(self, args: GenerateImageIn, hide: bool = False): """ - Input arguments: `prompt`, `store` (optional), `node` (optional) + Input arguments: `prompt`, `store` (optional) Output fields: `future.image_uri` @@ -580,7 +571,7 @@ class MultiGenerateImage(CoreNode[MultiGenerateImageOut]): def __init__(self, args: MultiGenerateImageIn, hide: bool = False): """ - Input arguments: `prompt`, `num_images`, `store` (optional), `node` (optional) + Input arguments: `prompt`, `num_images`, `store` (optional) Output fields: `future.outputs` @@ -610,7 +601,7 @@ class GenerativeEditImage(CoreNode[GenerativeEditImageOut]): def __init__(self, args: GenerativeEditImageIn, hide: bool = False): """ - Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `store` (optional), `node` (optional) + Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `store` (optional) Output fields: `future.image_uri` @@ -640,7 +631,7 @@ class MultiGenerativeEditImage(CoreNode[MultiGenerativeEditImageOut]): def __init__(self, args: MultiGenerativeEditImageIn, hide: bool = False): """ - Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `num_images`, `store` (optional), `node` (optional) + Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `num_images`, `store` (optional) Output fields: `future.outputs` @@ -850,7 +841,7 @@ class GenerateSpeech(CoreNode[GenerateSpeechOut]): def __init__(self, args: GenerateSpeechIn, hide: bool = False): """ - Input arguments: `text`, `store` (optional), `node` (optional) + Input arguments: `text`, `store` (optional) Output fields: `future.audio_uri` @@ -910,7 +901,7 @@ class RemoveBackground(CoreNode[RemoveBackgroundOut]): def __init__(self, args: RemoveBackgroundIn, hide: bool = False): """ - Input arguments: `image_uri`, `return_mask` (optional), `background_color` (optional), `store` (optional), `node` (optional) + Input arguments: `image_uri`, `return_mask` (optional), `background_color` (optional), `store` (optional) Output fields: `future.image_uri` @@ -940,7 +931,7 @@ class FillMask(CoreNode[FillMaskOut]): def __init__(self, args: FillMaskIn, hide: bool = False): """ - Input arguments: `image_uri`, `mask_image_uri`, `store` (optional), `node` (optional) + Input arguments: `image_uri`, `mask_image_uri`, `store` (optional) Output fields: `future.image_uri` @@ -970,7 +961,7 @@ class UpscaleImage(CoreNode[UpscaleImageOut]): def __init__(self, args: UpscaleImageIn, hide: bool = False): """ - Input arguments: `image_uri`, `store` (optional), `node` (optional) + Input arguments: `image_uri`, `store` (optional) Output fields: `future.image_uri` @@ -1000,7 +991,7 @@ class SegmentUnderPoint(CoreNode[SegmentUnderPointOut]): def __init__(self, args: SegmentUnderPointIn, hide: bool = False): """ - Input arguments: `image_uri`, `point`, `store` (optional), `node` (optional) + Input arguments: `image_uri`, `point`, `store` (optional) Output fields: `future.mask_image_uri` @@ -1021,96 +1012,6 @@ def future(self) -> FutureSegmentUnderPointOut: # type: ignore return super().future # type: ignore -class DISISNet(CoreNode[DISISNetOut]): - """ - Segment image foreground using [DIS IS-Net](https://github.com/xuebinqin/DIS). - - https://substrate.run/library#DISISNet - """ - - def __init__(self, args: DISISNetIn, hide: bool = False): - """ - Input arguments: `image_uri`, `store` (optional) - - Output fields: `future.image_uri` - - https://substrate.run/library#DISISNet - """ - super().__init__(hide=hide, out_type=DISISNetOut, **args) - self.node = "DISISNet" - - @property - def future(self) -> FutureDISISNetOut: # type: ignore - """ - Future reference to this node's output. - - Output fields: `future.image_uri` - - https://substrate.run/library#DISISNet - """ - return super().future # type: ignore - - -class BigLaMa(CoreNode[BigLaMaOut]): - """ - Inpaint a mask using [LaMa](https://github.com/advimman/lama). - - https://substrate.run/library#BigLaMa - """ - - def __init__(self, args: BigLaMaIn, hide: bool = False): - """ - Input arguments: `image_uri`, `mask_image_uri`, `store` (optional) - - Output fields: `future.image_uri` - - https://substrate.run/library#BigLaMa - """ - super().__init__(hide=hide, out_type=BigLaMaOut, **args) - self.node = "BigLaMa" - - @property - def future(self) -> FutureBigLaMaOut: # type: ignore - """ - Future reference to this node's output. - - Output fields: `future.image_uri` - - https://substrate.run/library#BigLaMa - """ - return super().future # type: ignore - - -class RealESRGAN(CoreNode[RealESRGANOut]): - """ - Upscale an image using [RealESRGAN](https://github.com/xinntao/Real-ESRGAN). - - https://substrate.run/library#RealESRGAN - """ - - def __init__(self, args: RealESRGANIn, hide: bool = False): - """ - Input arguments: `image_uri`, `store` (optional) - - Output fields: `future.image_uri` - - https://substrate.run/library#RealESRGAN - """ - super().__init__(hide=hide, out_type=RealESRGANOut, **args) - self.node = "RealESRGAN" - - @property - def future(self) -> FutureRealESRGANOut: # type: ignore - """ - Future reference to this node's output. - - Output fields: `future.image_uri` - - https://substrate.run/library#RealESRGAN - """ - return super().future # type: ignore - - class SegmentAnything(CoreNode[SegmentAnythingOut]): """ Segment an image using [SegmentAnything](https://github.com/facebookresearch/segment-anything). diff --git a/substrate/typeddict_models.py b/substrate/typeddict_models.py index 2c12eb2..3ba6319 100644 --- a/substrate/typeddict_models.py +++ b/substrate/typeddict_models.py @@ -169,10 +169,6 @@ class BatchGenerateTextIn(TypedDict): """ Maximum number of tokens to generate. """ - node: NotRequired[Literal["Mistral7BInstruct"]] - """ - Selected node. - """ class BatchGenerateTextOut(TypedDict): @@ -233,10 +229,6 @@ class BatchGenerateJSONIn(TypedDict): """ Maximum number of tokens to generate. """ - node: NotRequired[Literal["Mistral7BInstruct"]] - """ - Selected node. - """ class BatchGenerateJSONOut(TypedDict): @@ -407,10 +399,6 @@ class GenerateTextVisionIn(TypedDict): """ Maximum number of tokens to generate. """ - node: NotRequired[Literal["Firellava13B"]] - """ - Selected node. - """ class GenerateTextVisionOut(TypedDict): @@ -451,10 +439,6 @@ class GenerateImageIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["StableDiffusionXL"]] - """ - Selected node. - """ class GenerateImageOut(TypedDict): @@ -477,10 +461,6 @@ class MultiGenerateImageIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["StableDiffusionXL"]] - """ - Selected node. - """ class MultiGenerateImageOut(TypedDict): @@ -694,10 +674,6 @@ class GenerativeEditImageIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["StableDiffusionXLInpaint"]] - """ - Selected node. - """ class GenerativeEditImageOut(TypedDict): @@ -728,10 +704,6 @@ class MultiGenerativeEditImageIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["StableDiffusionXLInpaint"]] - """ - Selected node. - """ class MultiGenerativeEditImageOut(TypedDict): @@ -830,10 +802,6 @@ class FillMaskIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["BigLaMa"]] - """ - Selected node. - """ class FillMaskOut(TypedDict): @@ -882,10 +850,6 @@ class RemoveBackgroundIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["DISISNet"]] - """ - Selected node. - """ class RemoveBackgroundOut(TypedDict): @@ -922,10 +886,6 @@ class UpscaleImageIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["RealESRGAN"]] - """ - Selected node. - """ class UpscaleImageOut(TypedDict): @@ -966,10 +926,6 @@ class SegmentUnderPointIn(TypedDict): """ Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["SegmentAnything"]] - """ - Selected node. - """ class SegmentUnderPointOut(TypedDict): @@ -1113,10 +1069,6 @@ class GenerateSpeechIn(TypedDict): """ Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the audio data will be returned as a base64-encoded string. """ - node: NotRequired[Literal["XTTSV2"]] - """ - Selected node. - """ class GenerateSpeechOut(TypedDict):