MCPcopy Create free account
hub / github.com/DenOfEquity/ersatzForge / ui

Method ui

scripts/prompt_matrix.py:44–56  ·  view source on GitHub ↗
(self, is_img2img)

Source from the content-addressed store, hash-verified

42
43 combination_count = 2 ** last_part_index
44 for combination_num in range(combination_count):
45 selected_prompts = [text.strip().strip(",") for n, text in enumerate(prompt_matrix_parts[1:]) if combination_num & (1 << n)]
46
47 if put_at_start:
48 selected_prompts = selected_prompts + [prompt_matrix_parts[0]]
49 else:
50 selected_prompts = [prompt_matrix_parts[0]] + selected_prompts
51
52 all_prompts.append(delimiter.join(selected_prompts))
53
54 prompt_count = len(all_prompts)
55 p.n_iter = prompt_count
56 p.batch_size = 1 # cond padding will change results
57
58 p.do_not_save_grid = True
59

Callers

nothing calls this directly

Calls 1

elem_idMethod · 0.95

Tested by

no test coverage detected