Giter Club home page Giter Club logo

Comments (3)

dosubot avatar dosubot commented on August 21, 2024 3

Hello @Zimtschock! I'm here to help you with any bugs, questions, or contributions you might have. Let's squash those bugs together! 🐞

The issue with the [SEP] separator causing all faces to be rendered at the same time and only the first face to be chosen for all characters is likely due to the way prompts are being processed. The _get_prompt method in the Adetailer script splits the prompt using the [SEP] separator and replaces blank prompts with a default value or a replacement prompt. If the replacement logic is not correctly handling multiple faces, it could result in the behavior you are experiencing.

To address this issue, you can review and adjust the _get_prompt method to ensure it correctly processes each face individually. Here is the relevant part of the code:

def _get_prompt(
    self,
    ad_prompt: str,
    all_prompts: list[str],
    i: int,
    default: str,
    replacements: list[PromptSR],
) -> list[str]:
    prompts = re.split(r"\s*\[SEP\]\s*", ad_prompt)
    blank_replacement = self.prompt_blank_replacement(all_prompts, i, default)
    for n in range(len(prompts)):
        if not prompts[n]:
            prompts[n] = blank_replacement
        elif "[PROMPT]" in prompts[n]:
            prompts[n] = prompts[n].replace("[PROMPT]", blank_replacement)

        for pair in replacements:
            prompts[n] = prompts[n].replace(pair.s, pair.r)
    return prompts

Ensure that the ad_prompt string is correctly formatted and that the replacements are applied as intended. Additionally, verify that the prompt_blank_replacement method is providing the correct default values for each face [1].

If the issue persists, you may need to further debug the prompt processing logic to identify any other potential causes.

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

from adetailer.

warrockmill avatar warrockmill commented on August 21, 2024

I also have encountered this issue @dosu . It's very recent and not sure what is causing it. I've gone through the !adetailer script and found the code you mentioned to compare it with mine and the two are identical.

Just to add some extra detail. It seems to mostly not work when I try to use the person yolov8n-seg/person yolov8s-seg models.

Some extra, extra detail. Checking on huggingface for Bing - https://huggingface.co/Bingsu/adetailer/tree/main - the 'Person_' files have been marked as unsafe so could this be having an effect?

from adetailer.

Bing-su avatar Bing-su commented on August 21, 2024

When making a report like this, could you please also upload screenshots and prompts?

from adetailer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.