You're looking at a specific version of this model. Jump to the model overview.
konieshadow /fooocus-api:c2253ee9
Input
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run konieshadow/fooocus-api using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"konieshadow/fooocus-api:c2253ee93d6e6619b4aa576e60ee613e8f9ea09d802c3680b34fe6ec8b60489a",
{
input: {
prompt: "",
cn_type1: "ImagePrompt",
cn_type2: "ImagePrompt",
cn_type3: "ImagePrompt",
cn_type4: "ImagePrompt",
sharpness: 2,
image_seed: -1,
uov_method: "Disabled",
image_number: 1,
guidance_scale: 4,
refiner_switch: 0.5,
negative_prompt: "",
style_selections: "Fooocus V2,Fooocus Enhance,Fooocus Sharp",
uov_upscale_value: 0,
outpaint_selections: "",
outpaint_distance_top: 0,
performance_selection: "Speed",
outpaint_distance_left: 0,
aspect_ratios_selection: "1152*896",
outpaint_distance_right: 0,
outpaint_distance_bottom: 0,
inpaint_additional_prompt: ""
}
}
);
console.log(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 konieshadow/fooocus-api using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"konieshadow/fooocus-api:c2253ee93d6e6619b4aa576e60ee613e8f9ea09d802c3680b34fe6ec8b60489a",
input={
"prompt": "",
"cn_type1": "ImagePrompt",
"cn_type2": "ImagePrompt",
"cn_type3": "ImagePrompt",
"cn_type4": "ImagePrompt",
"sharpness": 2,
"image_seed": -1,
"uov_method": "Disabled",
"image_number": 1,
"guidance_scale": 4,
"refiner_switch": 0.5,
"negative_prompt": "",
"style_selections": "Fooocus V2,Fooocus Enhance,Fooocus Sharp",
"uov_upscale_value": 0,
"outpaint_selections": "",
"outpaint_distance_top": 0,
"performance_selection": "Speed",
"outpaint_distance_left": 0,
"aspect_ratios_selection": "1152*896",
"outpaint_distance_right": 0,
"outpaint_distance_bottom": 0,
"inpaint_additional_prompt": ""
}
)
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 konieshadow/fooocus-api 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": "c2253ee93d6e6619b4aa576e60ee613e8f9ea09d802c3680b34fe6ec8b60489a",
"input": {
"prompt": "",
"cn_type1": "ImagePrompt",
"cn_type2": "ImagePrompt",
"cn_type3": "ImagePrompt",
"cn_type4": "ImagePrompt",
"sharpness": 2,
"image_seed": -1,
"uov_method": "Disabled",
"image_number": 1,
"guidance_scale": 4,
"refiner_switch": 0.5,
"negative_prompt": "",
"style_selections": "Fooocus V2,Fooocus Enhance,Fooocus Sharp",
"uov_upscale_value": 0,
"outpaint_selections": "",
"outpaint_distance_top": 0,
"performance_selection": "Speed",
"outpaint_distance_left": 0,
"aspect_ratios_selection": "1152*896",
"outpaint_distance_right": 0,
"outpaint_distance_bottom": 0,
"inpaint_additional_prompt": ""
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/konieshadow/fooocus-api@sha256:c2253ee93d6e6619b4aa576e60ee613e8f9ea09d802c3680b34fe6ec8b60489a \
-i 'prompt=""' \
-i 'cn_type1="ImagePrompt"' \
-i 'cn_type2="ImagePrompt"' \
-i 'cn_type3="ImagePrompt"' \
-i 'cn_type4="ImagePrompt"' \
-i 'sharpness=2' \
-i 'image_seed=-1' \
-i 'uov_method="Disabled"' \
-i 'image_number=1' \
-i 'guidance_scale=4' \
-i 'refiner_switch=0.5' \
-i 'negative_prompt=""' \
-i 'style_selections="Fooocus V2,Fooocus Enhance,Fooocus Sharp"' \
-i 'uov_upscale_value=0' \
-i 'outpaint_selections=""' \
-i 'outpaint_distance_top=0' \
-i 'performance_selection="Speed"' \
-i 'outpaint_distance_left=0' \
-i 'aspect_ratios_selection="1152*896"' \
-i 'outpaint_distance_right=0' \
-i 'outpaint_distance_bottom=0' \
-i 'inpaint_additional_prompt=""'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/konieshadow/fooocus-api@sha256:c2253ee93d6e6619b4aa576e60ee613e8f9ea09d802c3680b34fe6ec8b60489a
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "prompt": "", "cn_type1": "ImagePrompt", "cn_type2": "ImagePrompt", "cn_type3": "ImagePrompt", "cn_type4": "ImagePrompt", "sharpness": 2, "image_seed": -1, "uov_method": "Disabled", "image_number": 1, "guidance_scale": 4, "refiner_switch": 0.5, "negative_prompt": "", "style_selections": "Fooocus V2,Fooocus Enhance,Fooocus Sharp", "uov_upscale_value": 0, "outpaint_selections": "", "outpaint_distance_top": 0, "performance_selection": "Speed", "outpaint_distance_left": 0, "aspect_ratios_selection": "1152*896", "outpaint_distance_right": 0, "outpaint_distance_bottom": 0, "inpaint_additional_prompt": "" } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.027. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
No output yet! Press "Submit" to start a prediction.