fetch(server_address + "/render", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "a photograph of an astronaut riding a horse",
negative_prompt: "",
width: 128,
height: 128,
seed: Math.floor(Math.random() * 10000000),
sampler: "plms",
use_stable_diffusion_model: "sd-v1-4",
num_inference_steps: 15,
guidance_scale: 7.5,
numOutputsParallel: 1,
stream_image_progress: true,
show_only_filtered_image: true,
output_format: "jpeg",
session_id: JASMINE_SESSION_ID
})
}).then((response) => response.json())