paralleldomain.data_lab.config.reactor¶
- class ReactorConfig(reactor_object, number_of_inference_steps=20, guidance_scale=7.5, noise_scheduler='dpm++', use_color_matching=False, use_camera_noise=False, clip_score_threshold=18, cameras_to_use=<factory>, random_seed=42, negative_prompt='comic style, drawing, motion blur, gray cube, white sign, warped, artifacts', inference_resolution=512, context_scale=2.0, color_matching_strength=0.5, undistort_input=True, undistort_context_scale_pad_factor=1.5, noise_strength=0.5, distortion_lookups=None)¶
Parameters for Reactor.
- Parameters:
reactor_object (ReactorObject) –
number_of_inference_steps (int) –
guidance_scale (float) –
noise_scheduler (str) –
use_color_matching (bool) –
use_camera_noise (bool) –
clip_score_threshold (float) –
cameras_to_use (List) –
random_seed (int) –
negative_prompt (str) –
inference_resolution (int) –
context_scale (float) –
color_matching_strength (float) –
undistort_input (bool) –
undistort_context_scale_pad_factor (float) –
noise_strength (float | None) –
distortion_lookups (Dict[str, DistortionLookupTable] | None) –
- reactor_object¶
defines the object to be modified using a prompt
- number_of_inference_steps¶
diffusion steps of the image generation model
- guidance_scale¶
controls how much the image generation process follows the text prompt
- noise_scheduler¶
noise scheduler of the image generation model
- use_color_matching¶
applies hue color transform on the generated object
- use_camera_noise¶
applies camera noise on the generated object
- clip_score_threshold¶
rejects generated samples with a clip score below threshold. Good range between 18-26.
- cameras_to_use¶
which cameras to use for Reactor
- random_seed¶
is passed to the Reactor model
- negative_prompt¶
helps guide the Reactor diffusion process.
- inference_resolution¶
image crop will be scaled to this resolution before the image generation process
- context_scale¶
amount of context to add around the object instance mask.
- context_scale = 1 no additional context.
- context_scale 2 = add padding such that resulting crop is twice as large as the original mask.
- color_matching_strength¶
strength of color matching. 0.0 = no strength, 1.0 = full strength.
- undistort_input¶
whether to undistort fisheye inputs
- undistort_context_scale_pad_factor¶
how much padding to add before undistorting
- noise_strength¶
strength of noise applied to the image generation model, only used when change_shape = False
- distortion_lookups¶
maps cameras_to_use to DistortionLookupTable. Required for sensor rigs with pd_fisheye cameras. Helper function: extract_distortion_lookup_tables
- class ReactorObject(prompts, new_class_id=None, asset_name=None, change_shape=True, replacement_probability=1.0, registry_class_name=None, registry_class_id=None)¶
- Parameters:
- prompts¶
prompts are guiding the Reactor process towards which objects to generate
- new_class_id¶
class_id to assign to generated object
- asset_name¶
target asset name that provides object mask for Reactor
- change_shape¶
True: mode to convert primitive shapes (e.g. a cube) into a new object with different texture and shape. False: mode to texturize an existing object, while maintaining the same shape.
- replacement_probability¶
When set to 1.0 all object instances will be replaced. only used when change_shape = False
- registry_class_name¶
object instances of this class name will be texturized by Reactor.
- registry_class_id¶
class_id stored in the asset registry, will be retrieved automatically