defaultMagical mushroom forest
typetext
{
"output_format": "webp",
"prompt": "Magical pizza kingdom"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1oI**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run pearsonkyle/360-panorama using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pearsonkyle/360-panorama:bfd2e4035cea655e508dd0c4a07addd1976e3223771d1a318a8dc698ccc2f3a0",
{
input: {
output_format: "webp",
prompt: "Magical pizza kingdom"
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1oI**********************************
This is your API token. Keep it to yourself.
import replicate
Run pearsonkyle/360-panorama using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pearsonkyle/360-panorama:bfd2e4035cea655e508dd0c4a07addd1976e3223771d1a318a8dc698ccc2f3a0",
input={
"output_format": "webp",
"prompt": "Magical pizza kingdom"
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1oI**********************************
This is your API token. Keep it to yourself.
Run pearsonkyle/360-panorama using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "pearsonkyle/360-panorama:bfd2e4035cea655e508dd0c4a07addd1976e3223771d1a318a8dc698ccc2f3a0",
"input": {
"output_format": "webp",
"prompt": "Magical pizza kingdom"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "p8afcwrcc1rgj0cgqtv9crgdjg",
"model": "pearsonkyle/360-panorama",
"version": "bfd2e4035cea655e508dd0c4a07addd1976e3223771d1a318a8dc698ccc2f3a0",
"input": {
"output_format": "webp",
"prompt": "Magical pizza kingdom"
},
"logs": "Checking inputs\n====================================\nChecking weights\n✅ 360RedmondResized.safetensors exists in ComfyUI/models/loras\n✅ sdxl_vae.safetensors exists in ComfyUI/models/vae\n✅ dreamshaperXL_v21TurboDPMSDE.safetensors exists in ComfyUI/models/checkpoints\n====================================\nRandomising seed to 1141233642\nRunning workflow\ngot prompt\nExecuting node 4, title: Load Checkpoint, class type: CheckpointLoaderSimple\nmodel_type EPS\nUsing pytorch attention in VAE\nUsing pytorch attention in VAE\nloaded straight to GPU\nRequested to load SDXL\nLoading 1 new model\nExecuting node 10, title: Load LoRA, class type: LoraLoader\nExecuting node 6, title: CLIP Text Encode (Prompt), class type: CLIPTextEncode\nRequested to load SDXLClipModel\nLoading 1 new model\nExecuting node 7, title: CLIP Text Encode (Prompt), class type: CLIPTextEncode\nExecuting node 5, title: Empty Latent Image, class type: EmptyLatentImage\nExecuting node 11, title: Jags-XY_tile sampler, class type: xy_Tiling_KSampler\nRequested to load SDXL\nLoading 1 new model\n 0%| | 0/9 [00:00<?, ?it/s]\n 11%|█ | 1/9 [00:01<00:08, 1.01s/it]\n 22%|██▏ | 2/9 [00:01<00:06, 1.11it/s]\n 33%|███▎ | 3/9 [00:02<00:05, 1.15it/s]\n 44%|████▍ | 4/9 [00:03<00:05, 1.03s/it]\n 56%|█████▌ | 5/9 [00:04<00:03, 1.05it/s]\n 67%|██████▋ | 6/9 [00:05<00:02, 1.10it/s]\n 78%|███████▊ | 7/9 [00:06<00:01, 1.13it/s]\n 89%|████████▉ | 8/9 [00:07<00:00, 1.16it/s]\n100%|██████████| 9/9 [00:07<00:00, 1.39it/s]\n100%|██████████| 9/9 [00:07<00:00, 1.18it/s]\nExecuting node 22, title: Load VAE, class type: VAELoader\nUsing pytorch attention in VAE\nUsing pytorch attention in VAE\nRequested to load AutoencoderKL\nLoading 1 new model\nExecuting node 15, title: Jags-CircularVAEDecode, class type: CircularVAEDecode\nExecuting node 9, title: Save Image, class type: SaveImage\nPrompt executed in 13.15 seconds\noutputs: {'9': {'images': [{'filename': 'Image_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\nImage_00001_.png",
"output": [
"https://replicate.delivery/pbxt/e1ZroQ11yq2DbStr510hatE5UULkbleU4A7Enl6npf6DxdSmA/Image_00001_.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-07-17T03:22:00.16Z",
"started_at": "2024-07-17T03:35:47.339862Z",
"completed_at": "2024-07-17T03:36:02.699879Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/p8afcwrcc1rgj0cgqtv9crgdjg/cancel",
"get": "https://api.replicate.com/v1/predictions/p8afcwrcc1rgj0cgqtv9crgdjg",
"web": "https://replicate.com/p/p8afcwrcc1rgj0cgqtv9crgdjg"
},
"metrics": {
"predict_time": 15.360016253,
"total_time": 842.539879
}
}