Skip to content

Commit

Permalink
Add batch_size back into pipeLoader and tinyLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTerra committed May 21, 2024
1 parent e5c16f2 commit 454aa90
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ttNpy/tinyterraNodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ def textfile(self, text, filename_prefix, output_type, group_id=0, ext='txt'):

#---------------------------------------------------------------ttN/pipe START----------------------------------------------------------------------#
class ttN_pipeLoader_v2:
version = '2.0.0'
version = '2.1.0'
@classmethod
def INPUT_TYPES(cls):
aspect_ratios = ["width x height [custom]",
Expand Down Expand Up @@ -1049,6 +1049,7 @@ def INPUT_TYPES(cls):
"empty_latent_aspect": (aspect_ratios, {"default":"512 x 512 [S] 1:1"}),
"empty_latent_width": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
"empty_latent_height": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
"batch_size": ("INT", {"default": 1, "min": 1, "max": 64}),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
},
"optional": {
Expand All @@ -1071,7 +1072,7 @@ def adv_pipeloader(self, ckpt_name, config_name, vae_name, clip_skip,
loras,
positive, positive_token_normalization, positive_weight_interpretation,
negative, negative_token_normalization, negative_weight_interpretation,
empty_latent_aspect, empty_latent_width, empty_latent_height, seed,
empty_latent_aspect, empty_latent_width, empty_latent_height, batch_size, seed,
model_override=None, clip_override=None, optional_lora_stack=None, optional_controlnet_stack=None, prepend_positive=None, prepend_negative=None,
prompt=None, my_unique_id=None):

Expand All @@ -1080,7 +1081,7 @@ def adv_pipeloader(self, ckpt_name, config_name, vae_name, clip_skip,
vae: VAE | None = None

# Create Empty Latent
latent = sampler.emptyLatent(empty_latent_aspect, 1, empty_latent_width, empty_latent_height)
latent = sampler.emptyLatent(empty_latent_aspect, batch_size, empty_latent_width, empty_latent_height)
samples = {"samples":latent}

model, clip, vae = loader.load_main3(ckpt_name, config_name, vae_name, loras, clip_skip, model_override, clip_override, optional_lora_stack)
Expand Down Expand Up @@ -2126,7 +2127,7 @@ def stack(self, toggle, mode, num_loras, optional_pipe=None, lora_stack=None, mo

#--------------------------------------------------------------ttN/base START-----------------------------------------------------------------------#
class ttN_tinyLoader:
version = '1.0.0'
version = '1.1.0'
@classmethod
def INPUT_TYPES(cls):
aspect_ratios = ["width x height [custom]",
Expand Down Expand Up @@ -2174,7 +2175,8 @@ def INPUT_TYPES(cls):
"empty_latent_aspect": (aspect_ratios, {"default":"512 x 512 [S] 1:1"}),
"empty_latent_width": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
"empty_latent_height": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
},
"batch_size": ("INT", {"default": 1, "min": 1, "max": 64}),
},
"hidden": {"prompt": "PROMPT", "ttNnodeVersion": ttN_tinyLoader.version, "my_unique_id": "UNIQUE_ID",}
}

Expand All @@ -2185,15 +2187,15 @@ def INPUT_TYPES(cls):
CATEGORY = "🌏 tinyterra/base"

def miniloader(self, ckpt_name, config_name, sampling, zsnr, cfg_rescale_mult, vae_name, clip_skip,
empty_latent_aspect, empty_latent_width, empty_latent_height,
empty_latent_aspect, empty_latent_width, empty_latent_height, batch_size,
prompt=None, my_unique_id=None):

model: ModelPatcher | None = None
clip: CLIP | None = None
vae: VAE | None = None

# Create Empty Latent
latent = sampler.emptyLatent(empty_latent_aspect, 1, empty_latent_width, empty_latent_height)
latent = sampler.emptyLatent(empty_latent_aspect, batch_size, empty_latent_width, empty_latent_height)
samples = {"samples": latent}

model, clip, vae = loader.load_checkpoint(ckpt_name, config_name, clip_skip)
Expand Down

0 comments on commit 454aa90

Please sign in to comment.