44 {'version': version_code,
45 'name': 'Inspire Pack',
46 'nodes': set(NODE_CLASS_MAPPINGS.keys()),
47 'description': 'This extension provides various nodes to support Lora Block Weight and the Impact Pack. Provides many easily applicable regional features and applications for Variation Seed.', })
48 except:
49 pass
254
255 return hcand, wcand
256
257
258 def random_divisor(value: int, min_value: int, /, max_options: int = 1, rand_obj=random.Random()) -> int:
259 # print(f"value={value}, min_value={min_value}, max_options={max_options}")
260 min_value = min(min_value, value)
261
317 def patch(self, model, tile_size, swap_size, max_depth, scale_depth, seed): 318 latent_tile_size = max(32, tile_size) // 8 319 temp = None 320 321 rand_obj = random.Random() 322 rand_obj.seed(seed) 323 324 def hypertile_in(q, k, v, extra_options):
84 self.base_value -= 1 85 if self.base_value < 0: 86 self.base_value = max_seed 87 elif self.action == SGmode.RAND: 88 self.base_value = random.randint(0, max_seed) 89 90 return seed 91
102 value -= 1 103 if value < 0: 104 value = max_seed 105 elif action == 'randomize' or action == 'randomize for each node': 106 value = random.randint(0, max_seed) 107 108 v['inputs']['value'] = value 109
285 continue
286 else:
287 print(f"[Inspire Pack] Only `ImpactInt`, `Seed (rgthree)` and `Primitive` Node are allowed as the seed for '{v['class_type']}'. It will be ignored. ")
288 continue
289 except:
290 continue
291 else:
292 input_seed = int(inputs['seed'])
293
313 continue
314 else:
315 print(f"[Inspire Pack] Only `ImpactInt`, `Seed (rgthree)` and `Primitive` Node are allowed as the seed for '{v['class_type']}'. It will be ignored. ")
316 continue
317 except:
318 continue
319 else:
320 input_seed = int(inputs['seed'])
321
34 if not os.path.exists(pb_yaml_path): 35 shutil.copy(pb_yaml_path_example, pb_yaml_path) 36 37 with open(pb_yaml_path, 'r', encoding="utf-8") as f: 38 prompt_builder_preset = yaml.load(f, Loader=yaml.FullLoader) 39 except Exception as e: 40 print(f"[Inspire Pack] Failed to load 'prompt-builder.yaml'") 41
698 count = list_counter_map[unique_id] 699 700 list_counter_map[unique_id] = count + 1 701 702 rn = random.Random() 703 rn.seed(seed + count) 704 new_seed = random.randint(0, 1125899906842624) 705
700 list_counter_map[unique_id] = count + 1 701 702 rn = random.Random() 703 rn.seed(seed + count) 704 new_seed = random.randint(0, 1125899906842624) 705 706 return (signal, new_seed) 707