MCPcopy Create free account
hub / github.com/vladmandic/sdnext / before_process_batch

Method before_process_batch

modules/scripts_manager.py:129–139  ·  view source on GitHub ↗

Called before extra networks are parsed from the prompt, so you can add new extra network keywords to the prompt with this callback. **kwargs will have those items: - batch_number - index of current batch, from 0 to number of batches-1 - prompts - list of

(self, p: StableDiffusionProcessing, *args, **kwargs)

Source from the content-addressed store, hash-verified

127 pass # pylint: disable=unnecessary-pass
128
129 def before_process_batch(self, p: StableDiffusionProcessing, *args, **kwargs):
130 """
131 Called before extra networks are parsed from the prompt, so you can add
132 new extra network keywords to the prompt with this callback.
133 **kwargs will have those items:
134 - batch_number - index of current batch, from 0 to number of batches-1
135 - prompts - list of prompts for current batch; you can change contents of this list but changing the number of entries will likely break things
136 - seeds - list of seeds for current batch
137 - subseeds - list of subseeds for current batch
138 """
139 pass # pylint: disable=unnecessary-pass
140
141 def process_batch(self, p: StableDiffusionProcessing, *args, **kwargs):
142 """

Callers 2

process_images_innerFunction · 0.45
before_process_batchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected