1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

add docstrings

This commit is contained in:
BlenderNeko
2023-04-23 20:09:09 +02:00
parent 8d2de420d3
commit 5818539743
2 changed files with 19 additions and 12 deletions

View File

@@ -744,7 +744,11 @@ def common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive,
device = comfy.model_management.get_torch_device()
latent_image = latent["samples"]
noise = comfy.sample.prepare_noise(latent, seed, disable_noise)
if disable_noise:
noise = torch.zeros(latent_image.size(), dtype=latent_image.dtype, layout=latent_image.layout, device="cpu")
else:
noise = comfy.sample.prepare_noise(latent, seed)
noise_mask = comfy.sample.create_mask(latent, noise)
real_model = None