Skip to content

Not really tested WAN Phantom Support.#8321

Merged
comfyanonymous merged 1 commit intomasterfrom
temp_pr
May 29, 2025
Merged

Not really tested WAN Phantom Support.#8321
comfyanonymous merged 1 commit intomasterfrom
temp_pr

Conversation

@comfyanonymous
Copy link
Member

No description provided.

@comfyanonymous comfyanonymous merged commit 5e5e46d into master May 29, 2025
6 checks passed
@comfyanonymous comfyanonymous deleted the temp_pr branch May 29, 2025 03:46
@George0726
Copy link
Contributor

Hello author, I am currently using Phantom models. I found that this kind of model should use two negative conditions for the CFG guidance.
In your node WanPhantomSubjectToVideo, the two negative nodes refer to negative_text and negative_img_text. I am wondering if there are nodes that can be used for multiple CFG calculations, just like the functioning in the Phantom source code below?

self.model.to(self.device)
pos_it = self.model(
                    [torch.cat([latent[:,:-ref_latent.shape[1]], ref_latent], dim=1) for latent, ref_latent in zip(latents, ref_latents)], t=timestep, **arg_c
                    )[0]
pos_i = self.model(
                    [torch.cat([latent[:,:-ref_latent.shape[1]], ref_latent], dim=1) for latent, ref_latent in zip(latents, ref_latents)], t=timestep, **arg_null
                    )[0]
neg = self.model(
                    [torch.cat([latent[:,:-ref_latent_neg.shape[1]], ref_latent_neg], dim=1) for latent, ref_latent_neg in zip(latents, ref_latents_neg)], t=timestep, **arg_null
                    )[0]
noise_pred = neg + guide_scale_img * (pos_i - neg) + guide_scale_text * (pos_it - pos_i)

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

Successfully merging this pull request may close these issues.

2 participants