镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Fooocus ksampler vs kSampler Fooocus conflict #96

Open

Description

@cihangoksu

Hi,

I am using both Fooocus kSampler from both Fooocus_Nodes and from comfyui-art-venture:

Image

As far as i understand, they are both defined as "FooocusKSampler" by ComfyScript:
For example;
"_, img_out = FooocusKSampler(pipe3, "Preview", "ComfyUI", model)["result"]"

How do we choose FooocusKSampler defined from Fooocus_Nodes in our comfyscript output?

Thank you in advance!

Cheers,
Cihan

P.S:
Example workflow:

dream-label-report-API.json

ComfyScript Output:
image = TextImageZho('NEKODU', 'Merienda-ExtraBold', 'center', 0, 150, 'red', 0, 'blue', 0, 100, 1024, 1024, True, False, 100, 180, 360)
PreviewImage(image)
positive_prompt_text_g, negative_prompt_text_g = SDXLPromptStyler('A (wolf:1.2) on the street at night, (NEKODU:1.2), clear background', 'blur', 'base', 'No', '')
positive_prompt_text_g = FooocusPositive(positive_prompt_text_g)
negative_prompt_text_g = FooocusNegative(negative_prompt_text_g)
lora_stack = FooocusLoraStack(True, 1, None, 'None', 1, 'None', 1, 'None', 1, 'None', 1, 'None', 1, 'None', 1, 'None', 1, 'None', 1, 'None', 1, 'None', 1)
pipe = FooocusLoader('dreamshaperXL_lightningDPMSDE.safetensors', 'Baked VAE', 'None', 0.5, 'joint', 2, positive_prompt_text_g, negative_prompt_text_g, '1024 x 1024', 1024, 1024, 1, lora_stack)
fooocus_styles = FooocusStyles('fooocus_styles')
pipe, model, _, _, _, _ = FooocusPreKSampler(pipe, 8, 4, 'dpmpp_sde', 'karras', 569298635963817, 1, 'Simple', 2, 7, 1.5, 0.8, 0.3, 0.25, False, None, None, None, fooocus_styles)
mask = ImageToMask(image, 'red')
image2 = MaskToImage(mask)
pipe, image2 = FooocusControlnet(pipe, image2, 'PyraCanny', 0.8, 1.5, False)
PreviewImage(image2)

_, _ = FooocusKSampler(pipe, 'Preview', 'ComfyUI', model)

Activity

  1. cihangoksu commented on Feb 24, 2025

    @cihangoksu
    Author

    Additional comment:
    I guess it is FooocusKSampler_ node but If I run that I am facing the following error:

    RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper_CUDA__native_group_norm)

  2. Chaoses-Ib commented on Feb 24, 2025

    @Chaoses-Ib
    Owner

    It should be FooocusKSampler_. You can check its type stub. Conflicting names (nodes/types) will be suffixed with underscores. This is sometimes misleading but I havn't found a better way that is also short.

    That error is probably caused by the same problem as in #94?

  3. cihangoksu commented on Feb 24, 2025

    @cihangoksu
    Author

    Although it is the same error, this time it may not be caused because of threading. I get the error sometimes even in the web ui. Also getting the same error by just running at the first execution

  4. Chaoses-Ib commented on Feb 24, 2025

    @Chaoses-Ib
    Owner

    I get the error sometimes even in the web ui.

    Then it's probably the node itself's problem. Maybe you can report to the author? Though it looks a bit unmaintained...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingPending ComfyUI or custom node changes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions