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

[Feature Request]: Use Refiner, if given #164

Closed
ElPrudi opened this issue Oct 1, 2023 · 6 comments
Closed

[Feature Request]: Use Refiner, if given #164

ElPrudi opened this issue Oct 1, 2023 · 6 comments

Comments

@ElPrudi
Copy link

ElPrudi commented Oct 1, 2023

It came to my attention that this extension does not use the refiner, if I specified one. Since it's a inpaint extension, I would love the option to use the refiner instead of the base model for the whole process.

@ototadana
Copy link
Owner

This extension uses the refiner. If you specify both the base model and the refiner in the Web UI, it will use both for face modification as well as for source image generation, and if you specify the refiner model instead of the base model, it will use the refiner model for face modification.

@ElPrudi
Copy link
Author

ElPrudi commented Oct 1, 2023

I can't quite follow you. I want to use both the base model and the refiner in the image generation, but only the refiner in the extension. I don't see any option to only use the refiner, so the extension makes the face worse as my base model is worse than the refiner. That is my problem.

@ototadana
Copy link
Owner

Okay, I understand. You want to use only the refiner. In that case, I think it would be effective to specify refiner instead of base model in img2img, set denoising strength to 0, and use Face Editor to modify the face. Have you tried this?

@ElPrudi
Copy link
Author

ElPrudi commented Oct 2, 2023

The only reason why I want this is to automatically inpaint after generation not to extra send it from text2img to img2img.

@ototadana
Copy link
Owner

@ElPrudi
I have added a use_refiner_model_only option to Img2ImgFaceProcessor to fulfill your request.

It can be used in the following workflow:.

{
    "face_detector": "RetinaFace",
    "rules": {
        "then": {
            "face_processor": {
              "name": "img2img",
              "params": {
                "use_refiner_model_only": true
              }
            },
            "mask_generator": {
                "name": "BiSeNet",
                "params": {
                    "fallback_ratio": 0.1
                }
            }
        }
    }
}

Please try it out.

@ElPrudi
Copy link
Author

ElPrudi commented Oct 5, 2023

Thank you! The faces look much better now!

@ElPrudi ElPrudi closed this as completed Oct 5, 2023
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