Skip to content
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

Connecting the sampler_name, scheduler_name and model_name nodes to KSampler throws errors. #20

Open
sawasy opened this issue Mar 11, 2024 · 1 comment

Comments

@sawasy
Copy link

sawasy commented Mar 11, 2024

Return type mismatch between linked nodes: sampler_name, ['euler', 'euler_ancestral', 'heun', 'heunpp2', 'dpm_2', 'dpm_2_ancestral', 'lms', 'dpm_fast', 'dpm_adaptive', 'dpmpp_2s_ancestral', 'dpmpp_sde', 'dpmpp_sde_gpu', 'dpmpp_2m', 'dpmpp_2m_sde', 'dpmpp_2m_sde_gpu', 'dpmpp_3m_sde', 'dpmpp_3m_sde_gpu', 'ddpm', 'lcm', 'ddim', 'uni_pc', 'uni_pc_bh2'] != COMBO

This is the same with scheduler_name and model_name nodes.

m!

@water2891
Copy link

water2891 commented Apr 20, 2024

Referring to my code below, modify the nodes.py file. sampler_name, scheduler_name can be modified like this

class SamplerSelector:
    CATEGORY = 'ImageSaver/utils'
    RETURN_TYPES = ("COMBO",)    # <--fix here
    RETURN_NAMES = ("sampler_name",)
    FUNCTION = "get_names"

    @classmethod
    def INPUT_TYPES(cls):
        return {"required": {"sampler_name": (comfy.samplers.KSampler.SAMPLERS,)}}

    def get_names(self, sampler_name):
        return ([sampler_name],)    # <--and here: return an array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants