Skip to content

add option to disable common styles#833

Open
Nandaka wants to merge 1 commit intoBing-su:devfrom
Nandaka:main
Open

add option to disable common styles#833
Nandaka wants to merge 1 commit intoBing-su:devfrom
Nandaka:main

Conversation

@Nandaka
Copy link

@Nandaka Nandaka commented Feb 15, 2026

Add option to enable/disable common styles for the adetailer prompt.

image

This is useful when performing batch and we don't want to include the common styles into specific adetailer prompt.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 15, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @Nandaka, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new feature that provides granular control over the application of common styles within the ADetailer prompt. By adding an explicit option to enable or disable styles, users can prevent unwanted style inheritance, particularly beneficial for scenarios like batch processing where specific ADetailer operations might require a clean slate without global styles.

Highlights

  • UI Enhancement: Added a new checkbox in the ADetailer UI to allow users to explicitly enable or disable common styles for each ADetailer instance.
  • Configuration Option: Introduced a new boolean argument, ad_tab_enable_styles, in the ADetailer arguments schema to store the state of the style enabling option.
  • Conditional Style Application: Implemented logic to conditionally clear common styles from the processing pipeline if the ad_tab_enable_styles option is set to false, ensuring styles are only applied when desired.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • aaaaaa/ui.py
    • Added a gr.Checkbox for ad_tab_enable_styles to the ADetailer UI group.
  • adetailer/args.py
    • Added ad_tab_enable_styles: bool = True to the ADetailerArgs class.
    • Registered ("ad_tab_enable_styles", "ADetailer tab enable styles") in the argument list.
  • scripts/!adetailer.py
    • Introduced logic to check the args.ad_tab_enable_styles flag.
    • Conditionally set temp_styles = [] if common styles are disabled.
    • Modified the StableDiffusionProcessingImg2Img initialization to use temp_styles instead of p.styles.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sonarqubecloud
Copy link

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new option to enable or disable common styles for the ADetailer prompt, which is a useful feature, especially for batch processing. The implementation is straightforward, adding a checkbox in the UI, a corresponding argument, and logic to apply the styles conditionally.

I've found one minor issue regarding the handling of the new parameter in the image's infotext. Please see my comment for details. Otherwise, the changes look good.

ad_model: str = "None"
ad_model_classes: str = ""
ad_tab_enable: bool = True
ad_tab_enable_styles: bool = True

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new ad_tab_enable_styles argument is not handled in the extra_params method. To keep the generated image's infotext clean, parameters with default values are usually not included. Please consider adding logic to the extra_params method to remove ADetailer tab enable styles from the output when it has its default value of True. This would be consistent with how other boolean flags and default-valued parameters are handled in this method.

@Bing-su Bing-su changed the base branch from main to dev February 17, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant