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

Class Processed

modules/processing.py:472–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470 self.cfg_scale = p.cfg_scale
471 self.image_cfg_scale = getattr(p, 'image_cfg_scale', None)
472 self.steps = p.steps
473 self.batch_size = p.batch_size
474 self.face_restoration_model = opts.face_restoration_model
475 self.sd_model_name = p.sd_model_name
476 self.sd_model_hash = p.sd_model_hash
477 self.seed_resize_from_w = p.seed_resize_from_w
478 self.seed_resize_from_h = p.seed_resize_from_h
479 self.denoising_strength = getattr(p, 'denoising_strength', None)
480 self.extra_generation_params = p.extra_generation_params
481 self.index_of_first_image = index_of_first_image
482 self.styles = p.styles
483 self.job_timestamp = state.job_timestamp
484 self.clip_skip = int(opts.CLIP_stop_at_last_layers)
485
486 self.eta = p.eta
487 self.ddim_discretize = p.ddim_discretize
488 self.s_churn = p.s_churn
489 self.s_tmin = p.s_tmin
490 self.s_tmax = p.s_tmax
491 self.s_noise = p.s_noise
492 self.s_min_uncond = p.s_min_uncond
493 self.sampler_noise_scheduler_override = p.sampler_noise_scheduler_override
494 self.prompt = self.prompt if not isinstance(self.prompt, list) else self.prompt[0]
495 self.negative_prompt = self.negative_prompt if not isinstance(self.negative_prompt, list) else self.negative_prompt[0]
496 self.seed = int(self.seed if not isinstance(self.seed, list) else self.seed[0]) if self.seed is not None else -1
497 self.subseed = int(self.subseed if not isinstance(self.subseed, list) else self.subseed[0]) if self.subseed is not None else -1
498 self.is_using_inpainting_conditioning = p.is_using_inpainting_conditioning
499
500 self.all_prompts = all_prompts or p.all_prompts or [self.prompt]
501 self.all_negative_prompts = all_negative_prompts or p.all_negative_prompts or [self.negative_prompt]
502 self.all_seeds = all_seeds or p.all_seeds or [self.seed]
503 self.all_subseeds = all_subseeds or p.all_subseeds or [self.subseed]
504 self.infotexts = infotexts or [info] * len(images_list)
505
506 def js(self):
507 obj = {
508 "prompt": self.all_prompts[0],
509 "all_prompts": self.all_prompts,
510 "negative_prompt": self.all_negative_prompts[0],
511 "all_negative_prompts": self.all_negative_prompts,
512 "seed": self.seed,
513 "all_seeds": self.all_seeds,
514 "subseed": self.subseed,
515 "all_subseeds": self.all_subseeds,
516 "subseed_strength": self.subseed_strength,
517 "width": self.width,
518 "height": self.height,
519 "sampler_name": self.sampler_name,
520 "cfg_scale": self.cfg_scale,
521 "steps": self.steps,
522 "batch_size": self.batch_size,
523 "face_restoration_model": self.face_restoration_model if self.face_restoration_model not in ["None", None] else None,
524 "sd_model_name": self.sd_model_name,
525 "sd_model_hash": self.sd_model_hash,
526 "seed_resize_from_w": self.seed_resize_from_w,
527 "seed_resize_from_h": self.seed_resize_from_h,
528 "denoising_strength": self.denoising_strength,
529 "extra_generation_params": self.extra_generation_params,

Callers 9

img2img_functionFunction · 0.90
runMethod · 0.90
runMethod · 0.90
runMethod · 0.90
draw_xyz_gridFunction · 0.90
cellMethod · 0.90
runMethod · 0.90
runMethod · 0.90
process_images_innerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected