Skip to content

Support Gradio's theme API#8945

Merged
AUTOMATIC1111 merged 2 commits into
AUTOMATIC1111:devfrom
space-nuko:gradio-theme-support
Apr 29, 2023
Merged

Support Gradio's theme API#8945
AUTOMATIC1111 merged 2 commits into
AUTOMATIC1111:devfrom
space-nuko:gradio-theme-support

Conversation

@space-nuko

@space-nuko space-nuko commented Mar 25, 2023

Copy link
Copy Markdown
Contributor

Describe what this pull request is trying to achieve.

Adds support for loading Gradio themes. Adds a "Gradio theme" config option

Additional notes and description of your changes

The list of available themes is taken from Hugging Face Hub

Environment this was tested in

List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.

  • OS: Windows
  • Browser: Chrome
  • Graphics card: NVIDIA RTX 3090

Screenshots or videos of your changes

Monochrome theme
2023-03-21 20_35_30-Stable Diffusion - Chromium

Darcula theme
2023-03-25 16_14_29-Stable Diffusion - Chromium

@Hosiokaa

Copy link
Copy Markdown

Where do I look to find such themes? could you also tell me what font you've used here

@space-nuko

Copy link
Copy Markdown
Contributor Author

In this PR it's the Gradio theme (requires restart) option under User Interface in the settings

The font is called Poppins

@AUTOMATIC1111

Copy link
Copy Markdown
Owner

This one is a touch to make decision on. Its small and nice, but I think the main tool for the developer of the theme should be css, not gradio theme stuff. Any non-default gradio theme then would mess up the chosen css for user.

@vladmandic

Copy link
Copy Markdown
Collaborator

This one is a touch to make decision on. Its small and nice, but I think the main tool for the developer of the theme should be css, not gradio theme stuff. Any non-default gradio theme then would mess up the chosen css for user.

yes but... ;)

new gradio finally uses well-formatted css, so its much easier to override variables in user.css than to target specific elements or classes)

example of built-in theme css:

.dark {
  --body-text-color: var(--neutral-100);
  --color-accent-soft: var(--neutral-700);
...

@catboxanon

catboxanon commented Apr 16, 2023

Copy link
Copy Markdown
Collaborator

Looks like some merge was done on the branch for this PR

@vladmandic

vladmandic commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

Looks like some merge was done on the branch for this PR

I've merged the PR into different fork, but WTF is github doing listing all totally unrelated items here.
update: phew, i've managed to clean it up. this pr remains as-is for original a1111 while modified/extented version is in different fork.

@vladmandic vladmandic force-pushed the gradio-theme-support branch from 26034bf to c9647c8 Compare April 18, 2023 01:20
@papuSpartan papuSpartan mentioned this pull request Apr 18, 2023
27 tasks
@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev April 29, 2023 09:45
@AUTOMATIC1111 AUTOMATIC1111 merged commit e018c8a into AUTOMATIC1111:dev Apr 29, 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

Successfully merging this pull request may close these issues.

5 participants