mirror of https://github.com/Leodotpy/sd-pixel.git
fix formatting
parent
2fbbefd6d7
commit
7237a76d59
|
|
@ -2,7 +2,7 @@
|
||||||
Adds various useful tools for pixel art to the Extras tab.
|
Adds various useful tools for pixel art to the Extras tab.
|
||||||
|
|
||||||
### Purpose
|
### Purpose
|
||||||
This extension is used to fix non symmetrical pixels in ai pixel art through downscaling.
|
This extension is used to fix asymmetrical pixels in AI-generated pixel art through downscaling.
|
||||||
It also can be used to limit color palette and clamp grayscale values to get more stylized results. You can also use the rescale feature to get a higher resolution image (best for preview on the webui canvas).
|
It also can be used to limit color palette and clamp grayscale values to get more stylized results. You can also use the rescale feature to get a higher resolution image (best for preview on the webui canvas).
|
||||||
|
|
||||||
For use with this [webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
|
For use with this [webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
|
||||||
|
|
@ -21,6 +21,5 @@ Extensions > Install from URL > Paste `https://github.com/Leodotpy/sd-pixel` > I
|
||||||
| Gray Limit |  |  |
|
| Gray Limit |  |  |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Credits
|
# Credits
|
||||||
* Thanks AUTOMATIC1111 for an awesome sd webui
|
* Thanks AUTOMATIC1111 for an awesome sd webui
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import launch
|
import launch
|
||||||
|
|
||||||
|
# This extension uses cv2 for image effects
|
||||||
if not launch.is_installed("opencv-python"):
|
if not launch.is_installed("opencv-python"):
|
||||||
launch.run_pip("install opencv-python", "opencv-python")
|
launch.run_pip("install opencv-python", "opencv-python")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import numpy as np
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from modules import scripts_postprocessing
|
from modules import scripts_postprocessing
|
||||||
import gradio as gr
|
import gradio as gr
|
||||||
|
|
||||||
from modules.ui_components import FormRow, FormColumn, FormGroup, ToolButton, FormHTML
|
from modules.ui_components import FormRow, FormColumn, FormGroup, ToolButton, FormHTML
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -69,7 +68,7 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing):
|
||||||
self.graylimit.enabled = value
|
self.graylimit.enabled = value
|
||||||
|
|
||||||
def ui(self):
|
def ui(self):
|
||||||
with FormGroup() as form_group:
|
with FormGroup():
|
||||||
# Pixelate and rescale
|
# Pixelate and rescale
|
||||||
with FormRow():
|
with FormRow():
|
||||||
pixelate_cb = gr.Checkbox(label="Pixelate", value=False, on_change=self.on_pixelate_change,
|
pixelate_cb = gr.Checkbox(label="Pixelate", value=False, on_change=self.on_pixelate_change,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue