refactor: ruff formatting

master
jaydrennan 4 months ago committed by Bryce Drennan
parent 964dd4ead7
commit cc79cac5fc

@ -355,9 +355,7 @@ When writing strength modifiers keep in mind that pixel values are between 0 and
## Image Upscaling
Upscale images easily.
You can view available models with "aimg upscale --list-models". Try a different model by using --upscale-model with the name or a url.
Upscale images easily.
=== "CLI"
```bash
@ -375,6 +373,10 @@ You can view available models with "aimg upscale --list-models". Try a different
<img src="docs/assets/000206_856637805_PLMS40_PS7.5_colorful_smoke.jpg" width="25%" height="auto"> ➡️
<img src="docs/assets/000206_856637805_PLMS40_PS7.5_colorful_smoke_upscaled.jpg" width="50%" height="auto">
Upscaling uses [Spandrel](https://github.com/chaiNNer-org/spandrel) to make it easy to use different upscaling models.
You can view different integrated models by running `aimg upscale --list-models`, and then use it with `--upscale-model <model-name>`.
Also accepts url's if you want to upscale an image with a different model. Control the new file format/location with --format.
```python
from imaginairy.enhancers.upscale_realesrgan import upscale_image
from PIL import Image

@ -315,14 +315,11 @@ allow the tool to generate one for you.
</p>
## Image Upscaling
Upscale images easily.
You can view available models with "aimg upscale --list-models". Try a different model by using --upscale-model with the name or a url.
Control the new file format/location with --format.
Upscale images easily.
=== "CLI"
```bash
aimg upscale assets/000206_856637805_PLMS40_PS7.5_colorful_smoke.jpg --upscale-model realesrgan-x2-plus
aimg upscale assets/000206_856637805_PLMS40_PS7.5_colorful_smoke.jpg --upscale-model real-hat
```
=== "Python"
@ -333,9 +330,12 @@ Control the new file format/location with --format.
img.save("colorful_smoke.upscaled.jpg")
```
<img src="assets/000206_856637805_PLMS40_PS7.5_colorful_smoke.jpg" width="25%" height="auto"> ➡️
<img src="assets/000206_856637805_PLMS40_PS7.5_colorful_smoke_upscaled.jpg" width="50%" height="auto">
<img src="docs/assets/000206_856637805_PLMS40_PS7.5_colorful_smoke.jpg" width="25%" height="auto"> ➡️
<img src="docs/assets/000206_856637805_PLMS40_PS7.5_colorful_smoke_upscaled.jpg" width="50%" height="auto">
Upscaling uses [Spandrel](https://github.com/chaiNNer-org/spandrel) to make it easy to use different upscaling models.
You can view different integrated models by running `aimg upscale --list-models`, and then use it with `--upscale-model <model-name>`.
Also accepts url's if you want to upscale an image with a different model. Control the new file format/location with --format.
## Video Generation

@ -8,7 +8,7 @@ if TYPE_CHECKING:
from imaginairy.schema import LazyLoadingImage
def upscale_img(
def upscale_image(
img: "Union[LazyLoadingImage, Image.Image, str]",
upscale_model: str = DEFAULT_UPSCALE_MODEL,
tile_size: int = 512,

Loading…
Cancel
Save