Skip to main content

Upscale

BETA

Low-res input

upscale-input

Low-res input
Low-res input

upscale-input

Low-res input

See example prompts in the gallery

Overview

Upscaling uses model and text guidance to add details to original image. Depending on the denoising_strength the model can hallucinate more details shifting away from the original image.

Usage

  1. In the prompts generate page - Set an input image in the Controlnet/img2img section.
  2. Add a text prompt ending with --only_upscale
  3. Select a model from the dropdown that matches the style and content of the input image.

Example

Example prompt for the result above

very detailed, masterpiece, intricate details, UHD, 8K --only_upscale <lora:add_detail:1>
num_images=1
negative_prompt=lowres, medium quality, lack of details, bad quality, worst quality, blur, blurry, pixelated, jpeg artifacts
seed=
steps=30
cfg_scale=
controlnet=
input_image_url=https://sdbooth2-production.s3.amazonaws.com/cvrx6g5wx5tbiuz9ivoah1j19why
mask_image_url=
denoising_strength=0.6
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=false
inpaint_faces=false
face_correct=false
film_grain=false
face_swap=false
hires_fix=false
ar=1:1
scheduler=dpm++sde_karras
color_grading=
use_lpw=true
w=
h=

POST /tunes/:id/prompts

# Note the hard-coded 690204 which is the tune_id of Realistic Vision v5.1 from the gallery
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/690204/prompts \
-F prompt[text]=very detailed, masterpiece, intricate details, UHD, 8K --only_upscale <lora:add_detail:1>" \
-F prompt[negative_prompt]="lowres, medium quality, lack of details, bad quality, worst quality, blur, blurry, pixelated, jpeg artifacts" \
-F prompt[callback]="https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1"
const fetch = require('node-fetch');
const FormData = require('form-data');

// Note the hard-coded 690204 which is the tune_id of Realistic Vision v5.1 from the gallery
const API_URL = 'https://api.astria.ai/tunes/690204/prompts';
const API_KEY = 'YOUR_API_KEY'; // Replace with your actual API key
const headers = { Authorization: `Bearer ${API_KEY}` }

const form = new FormData();
form.append('prompt[text]', 'very detailed, masterpiece, intricate details, UHD, 8K --only_upscale <lora:add_detail:1>');
form.append('prompt[negative_prompt]', 'lowres, medium quality, lack of details, bad quality, worst quality, blur, blurry, pixelated, jpeg artifacts');
form.append('prompt[callback]', 'https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1');

fetch(API_URL, {
method: 'POST',
headers: headers,
body: form
}).then(response => response.json())


import requests

# Note the hard-coded 690204 which is the tune_id of Realistic Vision v5.1 from the gallery
API_URL = 'https://api.astria.ai/tunes/690204/prompts'
API_KEY = 'YOUR_API_KEY' # Replace with your actual API key

headers = {
'Authorization': f'Bearer {API_KEY}'
}

data = {
'prompt[text]': 'very detailed, masterpiece, intricate details, UHD, 8K --only_upscale <lora:add_detail:1>',
'prompt[negative_prompt]': 'lowres, medium quality, lack of details, bad quality, worst quality, blur, blurry, pixelated, jpeg artifacts',
'prompt[callback]': 'https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1'
}
files = []
files.append((f"tune[prompts_attributes][{i}][input_image]", load_image(prompt['input_image'])))


response = requests.post(API_URL, headers=headers, data=data)