Skip to content

Commit

Permalink
Update defaults to SDXL v0.9 (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
pharmapsychotic authored Jun 27, 2023
1 parent a72b5f1 commit 6d19f09
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Copyright (c) Stability.ai, All rights reserved.
Copyright (c) Stability AI Ltd, All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Install the [PyPI](https://pypi.org/project/stability-sdk/) package via:

Then to invoke:

`python3 -m stability_sdk generate -W 512 -H 512 "A stunning house."`
`python3 -m stability_sdk generate -W 1024 -H 1024 "A stunning house."`

It will generate and put PNGs in your current directory.

Expand Down Expand Up @@ -61,9 +61,9 @@ positional arguments:
options:
-h, --help show this help message and exit
--height HEIGHT, -H HEIGHT
[512] height of image
[1024] height of image
--width WIDTH, -W WIDTH
[512] width of image
[1024] width of image
--start_schedule START_SCHEDULE
[0.5] start schedule for init image (must be greater than 0; 1 is full strength
text prompt, no trace of image)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='stability-sdk',
version='0.8.1',
version='0.8.2',
author='Stability AI',
author_email='[email protected]',
maintainer='Stability AI',
Expand Down
2 changes: 1 addition & 1 deletion src/stability_sdk/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class BasicSettings(param.Parameterized):
check_on_set=False, # allow old and new models without raising ValueError
objects=[
"stable-diffusion-v1-5", "stable-diffusion-512-v2-1", "stable-diffusion-768-v2-1",
"stable-diffusion-depth-v2-0", "stable-diffusion-xl-beta-v2-2-2",
"stable-diffusion-depth-v2-0", "stable-diffusion-xl-beta-v2-2-2", "stable-diffusion-xl-1024-v0-9",
"custom"
]
)
Expand Down
6 changes: 3 additions & 3 deletions src/stability_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(
host: str="",
api_key: str=None,
stub: generation_grpc.GenerationServiceStub=None,
generate_engine_id: str="stable-diffusion-xl-beta-v2-2-2",
generate_engine_id: str="stable-diffusion-xl-1024-v0-9",
inpaint_engine_id: str="stable-inpainting-512-v2-0",
interpolate_engine_id: str="interpolation-server-v1",
transform_engine_id: str="transform-server-v1",
Expand Down Expand Up @@ -104,8 +104,8 @@ def generate(
self,
prompts: List[str],
weights: List[float],
width: int = 512,
height: int = 512,
width: int = 1024,
height: int = 1024,
steps: Optional[int] = None,
seed: Union[Sequence[int], int] = 0,
samples: int = 1,
Expand Down
12 changes: 6 additions & 6 deletions src/stability_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(
self,
host: str = "grpc.stability.ai:443",
key: str = "",
engine: str = "stable-diffusion-xl-beta-v2-2-2",
engine: str = "stable-diffusion-xl-1024-v0-9",
upscale_engine: str = "esrgan-v1-x2plus",
verbose: bool = False,
wait_for_ready: bool = True,
Expand Down Expand Up @@ -155,8 +155,8 @@ def generate(
prompt: Union[str, List[str], generation.Prompt, List[generation.Prompt]],
init_image: Optional[Image.Image] = None,
mask_image: Optional[Image.Image] = None,
height: int = 512,
width: int = 512,
height: int = 1024,
width: int = 1024,
start_schedule: float = 1.0,
end_schedule: float = 0.01,
cfg_scale: float = 7.0,
Expand Down Expand Up @@ -493,10 +493,10 @@ def process_cli(logger: logging.Logger = None,

parser_generate = subparsers.add_parser('generate')
parser_generate.add_argument(
"--height", "-H", type=int, default=512, help="[512] height of image"
"--height", "-H", type=int, default=1024, help="[1024] height of image"
)
parser_generate.add_argument(
"--width", "-W", type=int, default=512, help="[512] width of image"
"--width", "-W", type=int, default=1024, help="[1024] width of image"
)
parser_generate.add_argument(
"--start_schedule",
Expand Down Expand Up @@ -550,7 +550,7 @@ def process_cli(logger: logging.Logger = None,
"-e",
type=str,
help="engine to use for inference",
default="stable-diffusion-xl-beta-v2-2-2",
default="stable-diffusion-xl-1024-v0-9",
)
parser_generate.add_argument(
"--init_image",
Expand Down
2 changes: 1 addition & 1 deletion tests/specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ These examples generate and put PNGs in your current directory.

Command line:

`python3 -m stability_sdk generate -W 512 -H 512 "A stunning house."`
`python3 -m stability_sdk generate -W 1024 -H 1024 "A stunning house."`

SDK Usage:

Expand Down

0 comments on commit 6d19f09

Please sign in to comment.