Readme
This model doesn't have a readme.
# Interior Decoration Space Scaling - Second Use Case
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run remodela-ai/scaling-model-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"remodela-ai/scaling-model-v2:b2e76cbec47d36ff759ce05b665a69666674ab0cd2858942f7a2886c45ca901f",
{
input: {
alpha: 0.4,
image: "https://replicate.delivery/pbxt/LxnRpiim9Nhga77C5aqy5SnCMewynyEfS3rnUKU3h4XZiB9b/nitidez.png"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run remodela-ai/scaling-model-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"remodela-ai/scaling-model-v2:b2e76cbec47d36ff759ce05b665a69666674ab0cd2858942f7a2886c45ca901f",
input={
"alpha": 0.4,
"image": "https://replicate.delivery/pbxt/LxnRpiim9Nhga77C5aqy5SnCMewynyEfS3rnUKU3h4XZiB9b/nitidez.png"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run remodela-ai/scaling-model-v2 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": "remodela-ai/scaling-model-v2:b2e76cbec47d36ff759ce05b665a69666674ab0cd2858942f7a2886c45ca901f",
"input": {
"alpha": 0.4,
"image": "https://replicate.delivery/pbxt/LxnRpiim9Nhga77C5aqy5SnCMewynyEfS3rnUKU3h4XZiB9b/nitidez.png"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method or purchase credits to run this model.
By signing in, you agree to our
terms of service and privacy policy
{
"completed_at": "2024-11-13T05:25:53.696086Z",
"created_at": "2024-11-13T05:24:21.728000Z",
"data_removed": false,
"error": null,
"id": "vazphjepc1rj00ck4fxb0cnfwr",
"input": {
"alpha": 0.4,
"image": "https://replicate.delivery/pbxt/LxnRpiim9Nhga77C5aqy5SnCMewynyEfS3rnUKU3h4XZiB9b/nitidez.png",
"api_key": "19333c9a6ec349ec90bd394c9f47ca67"
},
"logs": "2024-11-13 05:25:46.792 | INFO | predict:predict:72 - The image is in PNG format, converting to JPG.\n2024-11-13 05:25:46.844 | INFO | predict:predict:79 - Image successfully converted and saved to 'convert_image.jpg'\n2024-11-13 05:25:46.846 | DEBUG | predict:predict:96 - Image resized and converted to tensor\n2024-11-13 05:25:46.846 | INFO | predict:feed:115 - Starting feed method\n2024-11-13 05:25:47.318 | DEBUG | predict:feed:118 - Model forward pass completed\n2024-11-13 05:25:47.326 | DEBUG | predict:feed:122 - Image labeling completed\n2024-11-13 05:25:47.329 | DEBUG | predict:feed:127 - Image blending completed\n2024-11-13 05:25:47.360 | INFO | predict:feed:133 - Blended image saved to output_image.jpg\n2024-11-13 05:25:47.381 | INFO | predict:feed:140 - Saturation enhanced image saved to output_saturation.jpg\n2024-11-13 05:25:47.382 | INFO | predict:feed:143 - Applying MaskProcessor.filters_colors\n2024-11-13 05:25:47.387 | INFO | predict:feed:147 - Smooth image saved to smooth_output.jpg\n2024-11-13 05:25:47.387 | INFO | predict:feed:150 - Applying SAM model\nimage 1/1 /src/smooth_output.jpg: 1024x1024 1 0, 1 1, 1 2, 1 3, 1 4, 1 5, 1456.7ms\nSpeed: 16.3ms preprocess, 1456.7ms inference, 0.4ms postprocess per image at shape (1, 3, 1024, 1024)\n2024-11-13 05:25:49.089 | INFO | predict:feed:152 - Inference masks of image\n2024-11-13 05:25:49.089 | INFO | predict:feed:156 - Processing 1 inference results and applying MaskProcessor\n2024-11-13 05:25:49.089 | DEBUG | predict:feed:158 - Processing result 1\n2024-11-13 05:25:49.093 | INFO | MaskProcessor:plot_separate_and_joined_masks:50 - Plotting separate and joined masks\n2024-11-13 05:25:49.113 | INFO | MaskProcessor:plot_separate_and_joined_masks:60 - Number of masks: 6\n2024-11-13 05:25:49.113 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges\n2024-11-13 05:25:49.117 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges\n2024-11-13 05:25:49.161 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 1\n2024-11-13 05:25:49.162 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges\n2024-11-13 05:25:49.163 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges\n2024-11-13 05:25:49.202 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 2\n2024-11-13 05:25:49.202 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges\n2024-11-13 05:25:49.204 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges\n2024-11-13 05:25:49.240 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 3\n2024-11-13 05:25:49.240 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges\n2024-11-13 05:25:49.242 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges\n2024-11-13 05:25:49.278 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 4\n2024-11-13 05:25:49.278 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges\n2024-11-13 05:25:49.280 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges\n2024-11-13 05:25:49.315 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 5\n2024-11-13 05:25:49.315 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges\n2024-11-13 05:25:49.317 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges\n2024-11-13 05:25:49.351 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 6\n2024-11-13 05:25:49.391 | INFO | MaskProcessor:save_mask_as_image:44 - Saving mask as image: Joined_Masks_room.png\n2024-11-13 05:25:49.689 | DEBUG | MaskProcessor:save_mask_as_image:47 - Mask saved as Joined_Masks_room.png\n2024-11-13 05:25:49.689 | INFO | MaskProcessor:plot_separate_and_joined_masks:84 - Joined masks plotted successfully\n2024-11-13 05:25:49.692 | INFO | predict:feed:164 - Feed method completed\n2024-11-13 05:25:49.730 | INFO | predict:upload_to_imgbb:19 - Starting the upload process for file: original_pil.jpg\n2024-11-13 05:25:49.731 | DEBUG | predict:upload_to_imgbb:22 - Opened file successfully, sending request to imgBB API.\n2024-11-13 05:25:50.921 | SUCCESS | predict:upload_to_imgbb:34 - Image uploaded successfully to imgBB. URL: https://i.ibb.co/Pjpc5XF/original-pil.jpg\nINFO:httpx:HTTP Request: POST https://api.replicate.com/v1/predictions \"HTTP/1.1 201 Created\"\nINFO:httpx:HTTP Request: GET https://api.replicate.com/v1/models/idea-research/ram-grounded-sam/versions/80a2aede4cf8e3c9f26e96c308d45b23c350dd36f1c381de790715007f1ac0ad \"HTTP/1.1 200 OK\"\n2024-11-13 05:25:53.684 | INFO | predict:predict:108 - Image saved to output_label_image.jpg",
"metrics": {
"predict_time": 7.213804284,
"total_time": 91.968086
},
"output": "https://replicate.delivery/yhqm/ZFUzsXu23Qp2D5HXMpTrYnSNXReho8ZfB4ZDrr6SZc5hpegnA/output_label_image.jpg",
"started_at": "2024-11-13T05:25:46.482282Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/qoxq-c2ffvvyhyn57pnps4t5v7gzkjq32lopavjlorlnjep2egg6ogdaq",
"get": "https://api.replicate.com/v1/predictions/vazphjepc1rj00ck4fxb0cnfwr",
"cancel": "https://api.replicate.com/v1/predictions/vazphjepc1rj00ck4fxb0cnfwr/cancel"
},
"version": "4c520357410cd8fc0bfee3b8688e47f215318d0faa717fdcb9fa5ffbe90602e3"
}
2024-11-13 05:25:46.792 | INFO | predict:predict:72 - The image is in PNG format, converting to JPG.
2024-11-13 05:25:46.844 | INFO | predict:predict:79 - Image successfully converted and saved to 'convert_image.jpg'
2024-11-13 05:25:46.846 | DEBUG | predict:predict:96 - Image resized and converted to tensor
2024-11-13 05:25:46.846 | INFO | predict:feed:115 - Starting feed method
2024-11-13 05:25:47.318 | DEBUG | predict:feed:118 - Model forward pass completed
2024-11-13 05:25:47.326 | DEBUG | predict:feed:122 - Image labeling completed
2024-11-13 05:25:47.329 | DEBUG | predict:feed:127 - Image blending completed
2024-11-13 05:25:47.360 | INFO | predict:feed:133 - Blended image saved to output_image.jpg
2024-11-13 05:25:47.381 | INFO | predict:feed:140 - Saturation enhanced image saved to output_saturation.jpg
2024-11-13 05:25:47.382 | INFO | predict:feed:143 - Applying MaskProcessor.filters_colors
2024-11-13 05:25:47.387 | INFO | predict:feed:147 - Smooth image saved to smooth_output.jpg
2024-11-13 05:25:47.387 | INFO | predict:feed:150 - Applying SAM model
image 1/1 /src/smooth_output.jpg: 1024x1024 1 0, 1 1, 1 2, 1 3, 1 4, 1 5, 1456.7ms
Speed: 16.3ms preprocess, 1456.7ms inference, 0.4ms postprocess per image at shape (1, 3, 1024, 1024)
2024-11-13 05:25:49.089 | INFO | predict:feed:152 - Inference masks of image
2024-11-13 05:25:49.089 | INFO | predict:feed:156 - Processing 1 inference results and applying MaskProcessor
2024-11-13 05:25:49.089 | DEBUG | predict:feed:158 - Processing result 1
2024-11-13 05:25:49.093 | INFO | MaskProcessor:plot_separate_and_joined_masks:50 - Plotting separate and joined masks
2024-11-13 05:25:49.113 | INFO | MaskProcessor:plot_separate_and_joined_masks:60 - Number of masks: 6
2024-11-13 05:25:49.113 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.117 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.161 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 1
2024-11-13 05:25:49.162 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.163 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.202 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 2
2024-11-13 05:25:49.202 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.204 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.240 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 3
2024-11-13 05:25:49.240 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.242 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.278 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 4
2024-11-13 05:25:49.278 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.280 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.315 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 5
2024-11-13 05:25:49.315 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.317 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.351 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 6
2024-11-13 05:25:49.391 | INFO | MaskProcessor:save_mask_as_image:44 - Saving mask as image: Joined_Masks_room.png
2024-11-13 05:25:49.689 | DEBUG | MaskProcessor:save_mask_as_image:47 - Mask saved as Joined_Masks_room.png
2024-11-13 05:25:49.689 | INFO | MaskProcessor:plot_separate_and_joined_masks:84 - Joined masks plotted successfully
2024-11-13 05:25:49.692 | INFO | predict:feed:164 - Feed method completed
2024-11-13 05:25:49.730 | INFO | predict:upload_to_imgbb:19 - Starting the upload process for file: original_pil.jpg
2024-11-13 05:25:49.731 | DEBUG | predict:upload_to_imgbb:22 - Opened file successfully, sending request to imgBB API.
2024-11-13 05:25:50.921 | SUCCESS | predict:upload_to_imgbb:34 - Image uploaded successfully to imgBB. URL: https://i.ibb.co/Pjpc5XF/original-pil.jpg
INFO:httpx:HTTP Request: POST https://api.replicate.com/v1/predictions "HTTP/1.1 201 Created"
INFO:httpx:HTTP Request: GET https://api.replicate.com/v1/models/idea-research/ram-grounded-sam/versions/80a2aede4cf8e3c9f26e96c308d45b23c350dd36f1c381de790715007f1ac0ad "HTTP/1.1 200 OK"
2024-11-13 05:25:53.684 | INFO | predict:predict:108 - Image saved to output_label_image.jpg
This output was created using a different version of the model, remodela-ai/scaling-model-v2:4c520357.
This model runs on Nvidia A100 (80GB) GPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
This model runs on A100 (80GB) hardware which costs $0.0014 per second. View more.
Choose a file from your machine
Hint: you can also drag files onto the input
2024-11-13 05:25:46.792 | INFO | predict:predict:72 - The image is in PNG format, converting to JPG.
2024-11-13 05:25:46.844 | INFO | predict:predict:79 - Image successfully converted and saved to 'convert_image.jpg'
2024-11-13 05:25:46.846 | DEBUG | predict:predict:96 - Image resized and converted to tensor
2024-11-13 05:25:46.846 | INFO | predict:feed:115 - Starting feed method
2024-11-13 05:25:47.318 | DEBUG | predict:feed:118 - Model forward pass completed
2024-11-13 05:25:47.326 | DEBUG | predict:feed:122 - Image labeling completed
2024-11-13 05:25:47.329 | DEBUG | predict:feed:127 - Image blending completed
2024-11-13 05:25:47.360 | INFO | predict:feed:133 - Blended image saved to output_image.jpg
2024-11-13 05:25:47.381 | INFO | predict:feed:140 - Saturation enhanced image saved to output_saturation.jpg
2024-11-13 05:25:47.382 | INFO | predict:feed:143 - Applying MaskProcessor.filters_colors
2024-11-13 05:25:47.387 | INFO | predict:feed:147 - Smooth image saved to smooth_output.jpg
2024-11-13 05:25:47.387 | INFO | predict:feed:150 - Applying SAM model
image 1/1 /src/smooth_output.jpg: 1024x1024 1 0, 1 1, 1 2, 1 3, 1 4, 1 5, 1456.7ms
Speed: 16.3ms preprocess, 1456.7ms inference, 0.4ms postprocess per image at shape (1, 3, 1024, 1024)
2024-11-13 05:25:49.089 | INFO | predict:feed:152 - Inference masks of image
2024-11-13 05:25:49.089 | INFO | predict:feed:156 - Processing 1 inference results and applying MaskProcessor
2024-11-13 05:25:49.089 | DEBUG | predict:feed:158 - Processing result 1
2024-11-13 05:25:49.093 | INFO | MaskProcessor:plot_separate_and_joined_masks:50 - Plotting separate and joined masks
2024-11-13 05:25:49.113 | INFO | MaskProcessor:plot_separate_and_joined_masks:60 - Number of masks: 6
2024-11-13 05:25:49.113 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.117 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.161 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 1
2024-11-13 05:25:49.162 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.163 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.202 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 2
2024-11-13 05:25:49.202 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.204 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.240 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 3
2024-11-13 05:25:49.240 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.242 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.278 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 4
2024-11-13 05:25:49.278 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.280 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.315 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 5
2024-11-13 05:25:49.315 | INFO | MaskProcessor:convert_mask_to_linear_edges:30 - Converting mask to linear edges
2024-11-13 05:25:49.317 | DEBUG | MaskProcessor:convert_mask_to_linear_edges:40 - Mask converted to linear edges
2024-11-13 05:25:49.351 | DEBUG | MaskProcessor:plot_separate_and_joined_masks:79 - Processed mask 6
2024-11-13 05:25:49.391 | INFO | MaskProcessor:save_mask_as_image:44 - Saving mask as image: Joined_Masks_room.png
2024-11-13 05:25:49.689 | DEBUG | MaskProcessor:save_mask_as_image:47 - Mask saved as Joined_Masks_room.png
2024-11-13 05:25:49.689 | INFO | MaskProcessor:plot_separate_and_joined_masks:84 - Joined masks plotted successfully
2024-11-13 05:25:49.692 | INFO | predict:feed:164 - Feed method completed
2024-11-13 05:25:49.730 | INFO | predict:upload_to_imgbb:19 - Starting the upload process for file: original_pil.jpg
2024-11-13 05:25:49.731 | DEBUG | predict:upload_to_imgbb:22 - Opened file successfully, sending request to imgBB API.
2024-11-13 05:25:50.921 | SUCCESS | predict:upload_to_imgbb:34 - Image uploaded successfully to imgBB. URL: https://i.ibb.co/Pjpc5XF/original-pil.jpg
INFO:httpx:HTTP Request: POST https://api.replicate.com/v1/predictions "HTTP/1.1 201 Created"
INFO:httpx:HTTP Request: GET https://api.replicate.com/v1/models/idea-research/ram-grounded-sam/versions/80a2aede4cf8e3c9f26e96c308d45b23c350dd36f1c381de790715007f1ac0ad "HTTP/1.1 200 OK"
2024-11-13 05:25:53.684 | INFO | predict:predict:108 - Image saved to output_label_image.jpg