-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKSampler_ExtraDenoiseOptions.py
More file actions
37 lines (31 loc) · 1.64 KB
/
KSampler_ExtraDenoiseOptions.py
File metadata and controls
37 lines (31 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from custom_sampling import common_ksampler_extra_denoise, KSampler
class KSampler_ExtraDenoiseOptions:
@classmethod
def INPUT_TYPES(s):
return {"required":
{"model": ("MODEL",),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
"steps": ("INT", {"default": 20, "min": 1, "max": 10000}),
"cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
"sampler_name": (KSampler.SAMPLERS, ),
"scheduler": (KSampler.SCHEDULERS, ),
"positive": ("CONDITIONING", ),
"negative": ("CONDITIONING", ),
"latent_image": ("LATENT", ),
"denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
}
}
RETURN_TYPES = ("LATENT",)
FUNCTION = "sample"
CATEGORY = "sampling"
def sample(self, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=1.0):
return common_ksampler_extra_denoise(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
# A dictionary that contains all nodes you want to export with their names
# NOTE: names should be globally unique
NODE_CLASS_MAPPINGS = {
"KSampler_ExtraDenoiseOptions": KSampler_ExtraDenoiseOptions
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"KSampler_ExtraDenoiseOptions": "KSampler_ExtraDenoiseOptions Node"
}