konieshadow / fooocus-api
Third party Fooocus replicate model
Prediction
konieshadow/fooocus-api:a7e8fa2f96b01d02584de2b3029a8452b9bf0c8fa4127a6d1cfd406edfad54fbIDtfksyidb5dfvt26km6lhmaa57yStatusSucceededSourceWebHardwareA40Total durationCreatedInput
- prompt
- forest elf
- cn_type1
- ImagePrompt
- cn_type2
- ImagePrompt
- cn_type3
- ImagePrompt
- cn_type4
- ImagePrompt
- sharpness
- 2
- image_seed
- 50403806253646856
- 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
{ "prompt": "forest elf", "cn_type1": "ImagePrompt", "cn_type2": "ImagePrompt", "cn_type3": "ImagePrompt", "cn_type4": "ImagePrompt", "sharpness": 2, "image_seed": 50403806253646856, "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": "" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client: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:a7e8fa2f96b01d02584de2b3029a8452b9bf0c8fa4127a6d1cfd406edfad54fb", { input: { prompt: "forest elf", cn_type1: "ImagePrompt", cn_type2: "ImagePrompt", cn_type3: "ImagePrompt", cn_type4: "ImagePrompt", sharpness: 2, image_seed: 50403806253646856, 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: "" } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client: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:a7e8fa2f96b01d02584de2b3029a8452b9bf0c8fa4127a6d1cfd406edfad54fb", input={ "prompt": "forest elf", "cn_type1": "ImagePrompt", "cn_type2": "ImagePrompt", "cn_type3": "ImagePrompt", "cn_type4": "ImagePrompt", "sharpness": 2, "image_seed": 50403806253646856, "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.
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": "konieshadow/fooocus-api:a7e8fa2f96b01d02584de2b3029a8452b9bf0c8fa4127a6d1cfd406edfad54fb", "input": { "prompt": "forest elf", "cn_type1": "ImagePrompt", "cn_type2": "ImagePrompt", "cn_type3": "ImagePrompt", "cn_type4": "ImagePrompt", "sharpness": 2, "image_seed": 50403806253646856, "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.
Output
{ "completed_at": "2023-12-26T05:43:04.900623Z", "created_at": "2023-12-26T05:40:38.534817Z", "data_removed": false, "error": null, "id": "tfksyidb5dfvt26km6lhmaa57y", "input": { "prompt": "forest elf", "cn_type1": "ImagePrompt", "cn_type2": "ImagePrompt", "cn_type3": "ImagePrompt", "cn_type4": "ImagePrompt", "sharpness": 2, "image_seed": 50403806253646856, "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": "" }, "logs": "[Predictor Predict] Params: {'prompt': 'forest elf', 'negative_prompt': '', 'style_selections': ['Fooocus V2', 'Fooocus Enhance', 'Fooocus Sharp'], 'performance_selection': 'Speed', 'aspect_ratios_selection': '1152*896', 'image_number': 1, 'image_seed': 50403806253646856, 'sharpness': 2.0, 'guidance_scale': 4.0, 'base_model_name': 'juggernautXL_version6Rundiffusion.safetensors', 'refiner_model_name': 'None', 'refiner_switch': 0.5, 'loras': [['sd_xl_offset_example-lora_1.0.safetensors', 0.1]], 'uov_input_image': None, 'uov_method': 'Disabled', 'upscale_value': 0.0, 'outpaint_selections': [], 'outpaint_distance_left': 0, 'outpaint_distance_right': 0, 'outpaint_distance_top': 0, 'outpaint_distance_bottom': 0, 'inpaint_input_image': None, 'inpaint_additional_prompt': '', 'image_prompts': [], 'advanced_params': [False, 1.5, 0.8, 0.3, 7.0, 'dpmpp_2m_sde_gpu', 'karras', False, -1, -1, -1, -1, -1, -1, False, False, False, False, 0.25, 64, 128, 'joint', False, None, None, None, None, False, False, 'v2.6', 1.0, 0.618]}\n[Task Queue] Task queue is free, start task, seq=1\n[Parameters] Adaptive CFG = 7.0\n[Parameters] Sharpness = 2.0\n[Parameters] ADM Scale = 1.5 : 0.8 : 0.3\n[Parameters] CFG = 4.0\n[Parameters] Seed = 50403806253646856\n[Parameters] Sampler = dpmpp_2m_sde_gpu - karras\n[Parameters] Steps = 30 - 15\n[Fooocus] Initializing ...\n[Fooocus] Loading models ...\nRefiner unloaded.\nRequest to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1]] for model [/src/repositories/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors].\nLoaded LoRA [/src/repositories/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/src/repositories/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors] with 788 keys at weight 0.1.\nRequested to load SDXLClipModel\nLoading 1 new model\nunload clone 1\n[Fooocus Model Management] Moving model(s) has taken 0.65 seconds\n[Fooocus] Processing prompts ...\n[Fooocus] Preparing Fooocus text #1 ...\n[Prompt Expansion] forest elf, sharp focus, intricate, cinematic light, clear, crisp detail, highly detailed, singular background, elegant, complex, magical, coherent, magic, ambient, amazing composition, professional, stunning, beautiful, symmetry, illuminated, gorgeous, pretty, marvelous, aesthetic, color, epic, shiny, wonderful, pure, perfect, focused, incredible, fancy,, artistic\n[Fooocus] Encoding positive #1 ...\n[Fooocus] Encoding negative #1 ...\n[Parameters] Denoising Strength = 1.0\n[Parameters] Initial Latent shape: Image Space (896, 1152)\nPreparation time: 3.22 seconds\n[Sampler] refiner_swap_method = joint\n[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828\nRequested to load SDXL\nLoading 1 new model\n[Fooocus Model Management] Moving model(s) has taken 0.78 seconds\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:15, 1.93it/s]\n 7%|▋ | 2/30 [00:00<00:09, 2.85it/s]\n 10%|█ | 3/30 [00:00<00:07, 3.38it/s]\n 13%|█▎ | 4/30 [00:01<00:07, 3.70it/s]\n 17%|█▋ | 5/30 [00:01<00:06, 3.90it/s]\n 20%|██ | 6/30 [00:01<00:05, 4.04it/s]\n 23%|██▎ | 7/30 [00:01<00:05, 4.11it/s]\n 27%|██▋ | 8/30 [00:02<00:05, 4.17it/s]\n 30%|███ | 9/30 [00:02<00:04, 4.21it/s]\n 33%|███▎ | 10/30 [00:02<00:04, 4.24it/s]\n 37%|███▋ | 11/30 [00:02<00:04, 4.26it/s]\n 40%|████ | 12/30 [00:03<00:04, 4.29it/s]\n 43%|████▎ | 13/30 [00:03<00:03, 4.30it/s]\n 47%|████▋ | 14/30 [00:03<00:03, 4.31it/s]\n 50%|█████ | 15/30 [00:03<00:03, 4.31it/s]\n 53%|█████▎ | 16/30 [00:03<00:03, 4.32it/s]\n 57%|█████▋ | 17/30 [00:04<00:03, 4.32it/s]\n 60%|██████ | 18/30 [00:04<00:02, 4.32it/s]\n 63%|██████▎ | 19/30 [00:04<00:02, 4.32it/s]\n 67%|██████▋ | 20/30 [00:04<00:02, 4.31it/s]\n 70%|███████ | 21/30 [00:05<00:02, 4.32it/s]\n 73%|███████▎ | 22/30 [00:05<00:01, 4.31it/s]\n 77%|███████▋ | 23/30 [00:05<00:01, 4.31it/s]\n 80%|████████ | 24/30 [00:05<00:01, 4.31it/s]\n 83%|████████▎ | 25/30 [00:06<00:01, 4.31it/s]\n 87%|████████▋ | 26/30 [00:06<00:00, 4.29it/s]\n 90%|█████████ | 27/30 [00:06<00:00, 4.29it/s]\n 93%|█████████▎| 28/30 [00:06<00:00, 4.30it/s]\n 97%|█████████▋| 29/30 [00:07<00:00, 4.32it/s]\n100%|██████████| 30/30 [00:07<00:00, 4.34it/s]\n100%|██████████| 30/30 [00:07<00:00, 4.15it/s]\nRequested to load AutoencoderKL\nLoading 1 new model\nImage generated with private log at: /src/repositories/Fooocus/outputs/2023-12-26/log.html\nGenerating and saving time: 8.69 seconds\n[Task Queue] Finish task, seq=1\n[Predictor Predict] Finished with 1 images", "metrics": { "predict_time": 13.431787, "total_time": 146.365806 }, "output": [ "https://replicate.delivery/pbxt/fJldwXLDky3LWSBqlm12yNVTGY7XB4WfwP24Sbfw6uJQPDMkA/e977f103-26f5-409a-b154-23be0fb56060.png" ], "started_at": "2023-12-26T05:42:51.468836Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tfksyidb5dfvt26km6lhmaa57y", "cancel": "https://api.replicate.com/v1/predictions/tfksyidb5dfvt26km6lhmaa57y/cancel" }, "version": "a7e8fa2f96b01d02584de2b3029a8452b9bf0c8fa4127a6d1cfd406edfad54fb" }
Generated in[Predictor Predict] Params: {'prompt': 'forest elf', 'negative_prompt': '', 'style_selections': ['Fooocus V2', 'Fooocus Enhance', 'Fooocus Sharp'], 'performance_selection': 'Speed', 'aspect_ratios_selection': '1152*896', 'image_number': 1, 'image_seed': 50403806253646856, 'sharpness': 2.0, 'guidance_scale': 4.0, 'base_model_name': 'juggernautXL_version6Rundiffusion.safetensors', 'refiner_model_name': 'None', 'refiner_switch': 0.5, 'loras': [['sd_xl_offset_example-lora_1.0.safetensors', 0.1]], 'uov_input_image': None, 'uov_method': 'Disabled', 'upscale_value': 0.0, 'outpaint_selections': [], 'outpaint_distance_left': 0, 'outpaint_distance_right': 0, 'outpaint_distance_top': 0, 'outpaint_distance_bottom': 0, 'inpaint_input_image': None, 'inpaint_additional_prompt': '', 'image_prompts': [], 'advanced_params': [False, 1.5, 0.8, 0.3, 7.0, 'dpmpp_2m_sde_gpu', 'karras', False, -1, -1, -1, -1, -1, -1, False, False, False, False, 0.25, 64, 128, 'joint', False, None, None, None, None, False, False, 'v2.6', 1.0, 0.618]} [Task Queue] Task queue is free, start task, seq=1 [Parameters] Adaptive CFG = 7.0 [Parameters] Sharpness = 2.0 [Parameters] ADM Scale = 1.5 : 0.8 : 0.3 [Parameters] CFG = 4.0 [Parameters] Seed = 50403806253646856 [Parameters] Sampler = dpmpp_2m_sde_gpu - karras [Parameters] Steps = 30 - 15 [Fooocus] Initializing ... [Fooocus] Loading models ... Refiner unloaded. Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1]] for model [/src/repositories/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors]. Loaded LoRA [/src/repositories/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/src/repositories/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors] with 788 keys at weight 0.1. Requested to load SDXLClipModel Loading 1 new model unload clone 1 [Fooocus Model Management] Moving model(s) has taken 0.65 seconds [Fooocus] Processing prompts ... [Fooocus] Preparing Fooocus text #1 ... [Prompt Expansion] forest elf, sharp focus, intricate, cinematic light, clear, crisp detail, highly detailed, singular background, elegant, complex, magical, coherent, magic, ambient, amazing composition, professional, stunning, beautiful, symmetry, illuminated, gorgeous, pretty, marvelous, aesthetic, color, epic, shiny, wonderful, pure, perfect, focused, incredible, fancy,, artistic [Fooocus] Encoding positive #1 ... [Fooocus] Encoding negative #1 ... [Parameters] Denoising Strength = 1.0 [Parameters] Initial Latent shape: Image Space (896, 1152) Preparation time: 3.22 seconds [Sampler] refiner_swap_method = joint [Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828 Requested to load SDXL Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 0.78 seconds 0%| | 0/30 [00:00<?, ?it/s] 3%|▎ | 1/30 [00:00<00:15, 1.93it/s] 7%|▋ | 2/30 [00:00<00:09, 2.85it/s] 10%|█ | 3/30 [00:00<00:07, 3.38it/s] 13%|█▎ | 4/30 [00:01<00:07, 3.70it/s] 17%|█▋ | 5/30 [00:01<00:06, 3.90it/s] 20%|██ | 6/30 [00:01<00:05, 4.04it/s] 23%|██▎ | 7/30 [00:01<00:05, 4.11it/s] 27%|██▋ | 8/30 [00:02<00:05, 4.17it/s] 30%|███ | 9/30 [00:02<00:04, 4.21it/s] 33%|███▎ | 10/30 [00:02<00:04, 4.24it/s] 37%|███▋ | 11/30 [00:02<00:04, 4.26it/s] 40%|████ | 12/30 [00:03<00:04, 4.29it/s] 43%|████▎ | 13/30 [00:03<00:03, 4.30it/s] 47%|████▋ | 14/30 [00:03<00:03, 4.31it/s] 50%|█████ | 15/30 [00:03<00:03, 4.31it/s] 53%|█████▎ | 16/30 [00:03<00:03, 4.32it/s] 57%|█████▋ | 17/30 [00:04<00:03, 4.32it/s] 60%|██████ | 18/30 [00:04<00:02, 4.32it/s] 63%|██████▎ | 19/30 [00:04<00:02, 4.32it/s] 67%|██████▋ | 20/30 [00:04<00:02, 4.31it/s] 70%|███████ | 21/30 [00:05<00:02, 4.32it/s] 73%|███████▎ | 22/30 [00:05<00:01, 4.31it/s] 77%|███████▋ | 23/30 [00:05<00:01, 4.31it/s] 80%|████████ | 24/30 [00:05<00:01, 4.31it/s] 83%|████████▎ | 25/30 [00:06<00:01, 4.31it/s] 87%|████████▋ | 26/30 [00:06<00:00, 4.29it/s] 90%|█████████ | 27/30 [00:06<00:00, 4.29it/s] 93%|█████████▎| 28/30 [00:06<00:00, 4.30it/s] 97%|█████████▋| 29/30 [00:07<00:00, 4.32it/s] 100%|██████████| 30/30 [00:07<00:00, 4.34it/s] 100%|██████████| 30/30 [00:07<00:00, 4.15it/s] Requested to load AutoencoderKL Loading 1 new model Image generated with private log at: /src/repositories/Fooocus/outputs/2023-12-26/log.html Generating and saving time: 8.69 seconds [Task Queue] Finish task, seq=1 [Predictor Predict] Finished with 1 images
Want to make some of these yourself?
Run this model