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

Inpaint with Fooocus, request sdxl model every time at KSampler. Cost extra time #64

Open
jarheadjoe opened this issue Jun 27, 2024 · 4 comments

Comments

@jarheadjoe
Copy link

No description provided.

@Acly
Copy link
Owner

Acly commented Jun 27, 2024

It doesn't, unless you change the inputs like image/mask.

@jarheadjoe
Copy link
Author

jarheadjoe commented Jun 28, 2024

It doesn't, unless you change the inputs like image/mask.

Yes, when change input image, it requests to load new model. But in normal i2i or inpaint workflow, changing inputs will not request new model. I think the problem is in applyFoocusInpaint node: when changing input image, the node calculate the image feature and add to the model directly and return the new model, which makes comfyui think it should load a new model. I think the node ought to split to AssembleFoocusModel Node where it adds patch block to base model and ApplyFoocusInpaint Node where it feeds image and mask to the new model.

@Acly
Copy link
Owner

Acly commented Jun 28, 2024

Feeding the image/mask to the new model also changes the model. Attaching the image/mask to the model is the source of the problem, it would make more sense if they were passed in while sampling. I don't see a way to implement it that way without changes in base ComfyUI though, as it doesn't pass the latent to the patch function.

@jarheadjoe
Copy link
Author

Maybe write a custom load node to load patch() and lora() as model and add it to base model to become a inpaint model

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