- Community
- Model
- stabilityai-upscale
stabilityai-upscale
Image upscaling is an effective way to enlarge both local images and images generated via Stable Diffusion.
Notes
StabilityAI Image Upscaling
Image Upscaling is an effective technique for enlarging both local images and images generated via Stable Diffusion while preserving the original aspect ratio. Using the esrgan-v1-x2plus engine, this method allows for increasing the dimensions of the images to a desired size, such as 1024 pixels in width, while maintaining the original aspect ratio.
It is a valuable approach that avoids generating new images from scratch and instead focuses on scaling up existing images to meet specific requirements.
Run Stabilityai upscale with an API
Running Stabilityai upscale API with Clarifai's Python SDK
You can run the Stabilityai upscale Model API using Clarifai’s Python SDK.
Export your PAT as an environment variable. Then, import and initialize the API Client.
Find your PAT in your security settings.
export CLARIFAI_PAT={your personal access token}
from clarifai.client.model import Model
inference_params = dict(width=1024)
model_url = "https://clarifai.com/stability-ai/Upscale/models/stabilityai-upscale"
image_url = "https://s3.amazonaws.com/samples.clarifai.com/featured-models/image-captioning-statue-of-liberty.jpeg"
model_prediction = Model(model_url).predict_by_url(image_url, input_type="image", inference_params= inference_params)
# Get the output
output_base64 = model_prediction.outputs[0].data.image.base64
image_info = model_prediction.outputs[0].data.image.image_info
with open('image.png', 'wb') as f:
f.write(output_base64)
You can also run upscale API using other Clarifai Client Libraries like Java, cURL, NodeJS, PHP, etc here.
Inference Parameter
Width: Width is the only inference parameter and it can be passed to the upscale the desired output size and height wiil be automatically account to maintain the initial image's aspect ratio.
Disclaimer
Please be advised that this model utilizes wrapped Artificial Intelligence (AI) provided by Stabilityai (the "Vendor"). These AI models may collect, process, and store data as part of their operations. By using our website and accessing these AI models, you hereby consent to the data practices of the Vendor. We do not have control over the data collection, processing, and storage practices of the Vendor. Therefore, we cannot be held responsible or liable for any data handling practices, data loss, or breaches that may occur. It is your responsibility to review the privacy policies and terms of service of the Vendor to understand their data practices. You can access the Vendor's privacy policy and terms of service at https://stability.ai/privacy-policy.
We disclaim all liability with respect to the actions or omissions of the Vendor, and we encourage you to exercise caution and to ensure that you are comfortable with these practices before utilizing the AI models hosted on our site.
- ID
- Namestabilityai-upscale
- Model Type IDImage To Image
- DescriptionImage upscaling is an effective way to enlarge both local images and images generated via Stable Diffusion.
- Last UpdatedOct 17, 2024
- PrivacyPUBLIC
- Use Case
- Toolkit
- License
- Share
- Badge
Concept | Date |
---|