-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional noise_seed to make augmentation deterministic #3275
base: master
Are you sure you want to change the base?
Add optional noise_seed to make augmentation deterministic #3275
Conversation
A more proper way is doing it with a generator like this: https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/sample.py#L13 |
@comfyanonymous changed as requested. This kind of mandates the seed to be a required, not optional, argument, so I changed accordingly. |
@harelc the generator can be None when no seed is supplied and it'll use the "global" RNG. |
@asagi4 ok, did as you suggested. |
RETURN_TYPES = ("CONDITIONING", "CONDITIONING", "LATENT") | ||
RETURN_NAMES = ("positive", "negative", "latent") | ||
|
||
FUNCTION = "encode" | ||
|
||
CATEGORY = "conditioning/video_models" | ||
|
||
def encode(self, clip_vision, init_image, vae, width, height, video_frames, motion_bucket_id, fps, augmentation_level): | ||
def encode(self, clip_vision, init_image, vae, width, height, video_frames, motion_bucket_id, | ||
fps, augmentation_level, noise_seed=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor] this shouldn't have the line break here
}} | ||
"augmentation_level": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 10.0, "step": 0.01}), | ||
}, | ||
"optional": { "noise_seed": ("INT", {"default": 0, "min": 0, "max": 2**32-1}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the seed max value as seen in eg the KSampler node should be set as 0xffffffffffffffff
As currently implemented, SVD_img2vid_Conditioning has an optional augmentation stage with non-deterministic noising of the conditioning image, which prevents one from reproducing exact results in an SVD pipeline if augmentation is used.
I'm suggesting an optional (change widget to input port to ignore) noise_seed for the augmentation stage.