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

Update broke PuLID #5601

Closed
Pantonia4 opened this issue Nov 13, 2024 · 25 comments
Closed

Update broke PuLID #5601

Pantonia4 opened this issue Nov 13, 2024 · 25 comments
Labels
Potential Bug User is reporting a bug. This should be tested.

Comments

@Pantonia4
Copy link

Expected Behavior

It should just work and run i guess

Actual Behavior

Gives an Error and doesnt work.

Steps to Reproduce

Just use PuLID.

Debug Logs

!!! Exception during processing !!! forward_orig() takes from 7 to 9 positional arguments but 10 were given
Traceback (most recent call last):
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy_extras\nodes_custom_sampler.py", line 633, in sample
    samples = guider.sample(noise.generate_noise(latent), latent_image, sampler, sigmas, denoise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=noise.seed)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 740, in sample
    output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 719, in inner_sample
    samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 624, in sample
    samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\venv\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\k_diffusion\sampling.py", line 155, in sample_euler
    denoised = model(x, sigma_hat * s_in, **extra_args)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 299, in __call__
    out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 706, in __call__
    return self.predict_noise(*args, **kwargs)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 709, in predict_noise
    return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 279, in sampling_function
    out = calc_cond_batch(model, conds, x, timestep, model_options)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\samplers.py", line 228, in calc_cond_batch
    output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\model_base.py", line 144, in apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
    return forward_call(*args, **kwargs)
  File "D:\AI\StabilityMatrix\Packages\ComfyUI\comfy\ldm\flux\model.py", line 181, in forward
    out = self.forward_orig(img, img_ids, context, txt_ids, timestep, y, guidance, control, transformer_options)
TypeError: forward_orig() takes from 7 to 9 positional arguments but 10 were given

Other

Going back one version makes it work again.

@Pantonia4 Pantonia4 added the Potential Bug User is reporting a bug. This should be tested. label Nov 13, 2024
@amao2001
Copy link

the same error
forward_orig() takes from 7 to 9 positional arguments but 10 were given

@ltdrdata
Copy link
Collaborator

This is a backward compatibility issue.
This should be handled in the PuLID custom node repo.
Please move this issue to the repo.

@adydeejay
Copy link

adydeejay commented Nov 13, 2024

It seems that the problem comes from this line. I modified it back to this and now image generation works with PuLID.

Please note that this is a temporary workaround for simple workflows with PuLID and is not a permanent fix; it may also impact the functionality of other nodes.

@Madushan996
Copy link

It seems that the problem comes from this line. I modified it back to this and now image generation works with PuLID.

Thank you

@Malie73
Copy link

Malie73 commented Nov 13, 2024

It seems that the problem comes from this line. I modified it back to this and now image generation works with PuLID.

Great, thank you!

@fogostudio
Copy link

It seems that the problem comes from this line. I modified it back to this and now image generation works with PuLID.

Please note that this is a temporary workaround for simple workflows with PuLID and is not a permanent fix; it may also impact the functionality of other nodes.

That worked, thanks!

@prog-ape
Copy link

prog-ape commented Nov 14, 2024

After updating to the latest version, several plugins have this problem.
ComfyUI-Advanced-ControlNet This plug-in will also affect

@ialhabbal
Copy link

It seems that the problem comes from this line. I modified it back to this and now image generation works with PuLID.
Please note that this is a temporary workaround for simple workflows with PuLID and is not a permanent fix; it may also impact the functionality of other nodes.

That worked, thanks!

The file was updated with your fix with the latest update, but still I get the same error.

File "L:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\ldm\flux\model.py", line 181, in forward
out = self.forward_orig(img, img_ids, context, txt_ids, timestep, y, guidance, control, transformer_options)

I removed the transformer_options from the line, and it solved the problem. But the generation seems pretty slow.

@songkangfeng
Copy link

update to the latest version ,it doesn't work

@chenpipi0807
Copy link

不管事啊老师

@2129518511
Copy link

删除transformer_options使pulid完全失效了

以上问题是影响了大模型导致,更换大模型可以解决

@Fipu-merged
Copy link

For some reason code change in model.py resultet in Boolean value of Tensor with more than one value is ambiguous

@stoutimon
Copy link

It seems that the problem comes from this line. I modified it back to this and now image generation works with PuLID.

Please note that this is a temporary workaround for simple workflows with PuLID and is not a permanent fix; it may also impact the functionality of other nodes.

this has worked for me too

@sorc1900
Copy link

Does this fix work with portable?

@trai78
Copy link

trai78 commented Nov 20, 2024

Go into your comfyui folder > cmd > git reset --hard cc9cf6d1bd957d764ad418258b61d7e08187573b

@yropbv
Copy link

yropbv commented Nov 20, 2024

It seems that the problem comes from this line. I modified it back to this and now image generation works with PuLID.

Please note that this is a temporary workaround for simple workflows with PuLID and is not a permanent fix; it may also impact the functionality of other nodes.

SamplerCustomAdvanced
Boolean value of Tensor with more than one value is ambiguous

I get this after changing this

@adydeejay
Copy link

adydeejay commented Nov 20, 2024

@aprisma2008
Copy link

Go into your comfyui folder > cmd > git reset --hard cc9cf6d1bd957d764ad418258b61d7e08187573b

This works of course because it sets back to an older version. But then all the good new things like LTX Video aso. do not work any more. So till this is solved we have to switch between the version case to case. I hope they fix it with the new desktop model :-)

@swdvb
Copy link

swdvb commented Nov 24, 2024

Go into your comfyui folder > cmd > git reset --hard cc9cf6d

Then start your comfy, it should help.

@chenpipi0807
Copy link

git reset --hard a72d152

看起来我回退到了远古版本

@CaptailTyler
Copy link

CaptailTyler commented Nov 29, 2024

The issue has now been fixed. Just update your FLUX PULID vis ComfyUI Manager.

Edit: Was still getting "Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!"

Please follow the fix from adydeejay below, as it has solved all issues for me now. No more speed issues too.

@cgl13207205048
Copy link

此问题现已修复。只需使用 ComfyUI Manager 更新您的 FLUX PULID 即可。

编辑:仍然收到“预期所有张量都在同一设备上,但发​​现至少两个设备,cuda:0 和 cpu!”

请按照下面 adydeejay 的修复方法操作,因为它现在已经为我解决了所有问题。也不再有速度问题。

我试过更新comfyui和flux_pulid都不行

@nzmajid77
Copy link

I got the same problem. But today after I have updated my ComfyUI, the error is gone.

@chenpipi0807
Copy link

微信截图_20241204192057
forward_orig() takes from 7 to 9 positional arguments but 10 were given
这个问题依然存在
pulid插件也是最新版

@faizzed
Copy link

faizzed commented Dec 24, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug User is reporting a bug. This should be tested.
Projects
None yet
Development

No branches or pull requests