Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
MMqd committed Aug 20, 2023
1 parent 99f74da commit 384b1bf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scripts/__pycache__/
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,16 @@ Result:

## Features
* Kandinsky 2.1
* Kandinsky 2.2 with VRAM optimizations
* Text to image
* Batching
* Img2img
* Inpainting
* Image mixing
* vram optimizations (16 bit float and attention slicing)
* Text to image
* Batching
* Img2img
* Inpainting
* Image mixing
* VRAM optimizations (16 bit float and attention slicing)
* Kandinsky 2.2
* Text to image
* Batching
* VRAM optimizations (16 bit float and attention slicing)

## Supported Settings
* prompt
Expand Down
11 changes: 6 additions & 5 deletions scripts/kandinsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
move_to_cuda=False

class KandinskyModel(AbstractModel):
image_encoder = None
pipe_prior = None
pipe = None
unet = None
low_vram = True

def __init__(self, cache_dir="", version="2.1"):
AbstractModel.__init__(self, cache_dir="kandinsky22", version=version)
self.image_encoder = None
self.pipe_prior = None
self.pipe = None
self.unet = None
self.low_vram = True

def mix_images(self, p, generation_parameters, b, result_images):
if p.extra_image != [] and p.extra_image is not None:
Expand Down
2 changes: 1 addition & 1 deletion scripts/kandinsky_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def ui(self, is_img2img):
prior_cfg_scale = gr.inputs.Slider(minimum=1, maximum=20, step=0.5, label="Prior CFG Scale", default=4)

model_version = gr.inputs.Dropdown(["2.1", "2.2"], label="Kandinsky Version", default="2.2")
gr.Markdown("Kandinsky 2.2 requires much more RAM")
gr.Markdown("Kandinsky 2.2 requires much more RAM, and only txt2img is currently supported")
low_vram = gr.inputs.Checkbox(label="Kandinsky 2.2 Low VRAM", default=True)

with gr.Accordion("Image Mixing", open=False):
Expand Down

0 comments on commit 384b1bf

Please sign in to comment.