mrhan1993/fooocus-api 📝🖼️🔢❓✓ → ❓

▶️ 1.4M runs 📅 Mar 2024 ⚙️ Cog 0.9.5 🔗 GitHub ⚖️ License
image-inpainting image-outpainting image-to-image image-upscaling text-to-image

About

Example Output

Output

Performance Metrics

22.03s Prediction Time
112.13s Total Time
All Input Parameters
{
  "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": 7,
  "refiner_switch": 0.5,
  "negative_prompt": "",
  "style_selections": "Fooocus V2,Fooocus Enhance,Fooocus Sharp",
  "loras_custom_urls": "",
  "uov_upscale_value": 0,
  "use_default_loras": true,
  "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": ""
}
Input Parameters
prompt Type: stringDefault:
Prompt for image generation
cn_img1 Type: string
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
cn_img2 Type: string
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
cn_img3 Type: string
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
cn_img4 Type: string
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
cn_stop1 Type: numberRange: 0 - 1
Stop at for image prompt, None for default value
cn_stop2 Type: numberRange: 0 - 1
Stop at for image prompt, None for default value
cn_stop3 Type: numberRange: 0 - 1
Stop at for image prompt, None for default value
cn_stop4 Type: numberRange: 0 - 1
Stop at for image prompt, None for default value
cn_type1 Default: ImagePrompt
ControlNet type for image prompt
cn_type2 Default: ImagePrompt
ControlNet type for image prompt
cn_type3 Default: ImagePrompt
ControlNet type for image prompt
cn_type4 Default: ImagePrompt
ControlNet type for image prompt
sharpness Type: numberDefault: 2Range: 0 - 30
cn_weight1 Type: numberRange: 0 - 2
Weight for image prompt, None for default value
cn_weight2 Type: numberRange: 0 - 2
Weight for image prompt, None for default value
cn_weight3 Type: numberRange: 0 - 2
Weight for image prompt, None for default value
cn_weight4 Type: numberRange: 0 - 2
Weight for image prompt, None for default value
image_seed Type: integerDefault: -1
Seed to generate image, -1 for random
uov_method Default: Disabled
image_number Type: integerDefault: 1Range: 1 - 8
How many image to generate
guidance_scale Type: numberDefault: 7Range: 1 - 30
refiner_switch Type: numberDefault: 0.5Range: 0.1 - 1
negative_prompt Type: stringDefault:
Negative prompt for image generation
uov_input_image Type: string
Input image for upscale or variation, keep None for not upscale or variation
style_selections Type: stringDefault: Fooocus V2,Fooocus Enhance,Fooocus Sharp
Fooocus styles applied for image generation, separated by comma
loras_custom_urls Type: stringDefault:
Custom LoRAs URLs in the format 'url,weight' provide multiple seperated by ; (example 'url1,0.3;url2,0.1')
uov_upscale_value Type: numberDefault: 0
Only when Upscale (Custom)
use_default_loras Type: booleanDefault: true
Use default LoRAs
inpaint_input_mask Type: string
Input mask for inpaint
inpaint_input_image Type: string
Input image for inpaint or outpaint, keep None for not inpaint or outpaint. Please noticed, `uov_input_image` has bigger priority is not None.
outpaint_selections Type: stringDefault:
Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' separated by comma
outpaint_distance_top Type: integerDefault: 0
Outpaint expansion distance from Top of the image
performance_selection Default: Speed
Performance selection
outpaint_distance_left Type: integerDefault: 0
Outpaint expansion distance from Left of the image
aspect_ratios_selection Default: 1152*896
The generated image's size
outpaint_distance_right Type: integerDefault: 0
Outpaint expansion distance from Right of the image
outpaint_distance_bottom Type: integerDefault: 0
Outpaint expansion distance from Bottom of the image
inpaint_additional_prompt Type: stringDefault:
Prompt for image generation
Output Schema
paths Type: arrayItems: string
Paths
seeds Type: arrayItems: string
Seeds
Example Execution Logs
[Predictor Predict] Params: {'prompt': '', 'negative_prompt': '', 'style_selections': ['Fooocus V2', 'Fooocus Enhance', 'Fooocus Sharp'], 'performance_selection': 'Speed', 'aspect_ratios_selection': '1152*896', 'image_number': 1, 'image_seed': -1, 'sharpness': 2.0, 'guidance_scale': 7.0, 'base_model_name': 'juggernautXL_v8Rundiffusion.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': [], 'save_extension': 'png', 'require_base64': False, 'advanced_params': AdvancedParams(disable_preview=False, disable_intermediate_results=False, disable_seed_increment=False, adm_scaler_positive=1.5, adm_scaler_negative=0.8, adm_scaler_end=0.3, adaptive_cfg=7.0, sampler_name='dpmpp_2m_sde_gpu', scheduler_name='karras', overwrite_step=-1, overwrite_switch=-1, overwrite_width=-1, overwrite_height=-1, overwrite_vary_strength=-1, overwrite_upscale_strength=-1, mixing_image_prompt_and_vary_upscale=False, mixing_image_prompt_and_inpaint=False, debugging_cn_preprocessor=False, skipping_cn_preprocessor=False, canny_low_threshold=64, canny_high_threshold=128, refiner_swap_method='joint', controlnet_softness=0.25, freeu_enabled=False, freeu_b1=1.01, freeu_b2=1.02, freeu_s1=0.99, freeu_s2=0.95, debugging_inpaint_preprocessor=False, inpaint_disable_initial_latent=False, inpaint_engine='v2.6', inpaint_strength=1.0, inpaint_respective_field=1.0, inpaint_mask_upload_checkbox=False, invert_mask_checkbox=False, inpaint_erode_or_dilate=0)}
[2024-04-08 07:46:48] INFO     [Task Queue] Waiting for task finished, job_id=d527d7d3-afb3-41a0-b25e-bf481833b707
Refiner unloaded.
model_type EPS
UNet ADM Dimension 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.logit_scale'}
Base model loaded: /src/repositories/Fooocus/models/checkpoints/juggernautXL_v8Rundiffusion.safetensors
Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/src/repositories/Fooocus/models/checkpoints/juggernautXL_v8Rundiffusion.safetensors].
Loaded LoRA [/src/repositories/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/src/repositories/Fooocus/models/checkpoints/juggernautXL_v8Rundiffusion.safetensors] with 788 keys at weight 0.1.
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 0.32 seconds
[2024-04-08 07:46:56] INFO     [Task Queue] Task queue start task, job_id=d527d7d3-afb3-41a0-b25e-bf481833b707
[2024-04-08 07:46:56] INFO     [Parameters] Adaptive CFG = 7.0
[2024-04-08 07:46:56] INFO     [Parameters] Sharpness = 2.0
[2024-04-08 07:46:56] INFO     [Parameters] ControlNet Softness = 0.25
[2024-04-08 07:46:56] INFO     [Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[2024-04-08 07:46:56] INFO     [Parameters] CFG = 7.0
[2024-04-08 07:46:56] INFO     [Parameters] Seed = 7287935539341182038
[2024-04-08 07:46:56] INFO     [Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[2024-04-08 07:46:56] INFO     [Parameters] Steps = 30 - 15
[2024-04-08 07:46:56] INFO     [Fooocus] Initializing ...
[2024-04-08 07:46:56] INFO     [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_v8Rundiffusion.safetensors].
Loaded LoRA [/src/repositories/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/src/repositories/Fooocus/models/checkpoints/juggernautXL_v8Rundiffusion.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.52 seconds
[2024-04-08 07:46:57] INFO     [Fooocus] Processing prompts ...
[2024-04-08 07:46:57] INFO     [Fooocus] Encoding positive #1 ...
[2024-04-08 07:46:57] INFO     [Fooocus] Encoding negative #1 ...
[2024-04-08 07:46:57] INFO     [Parameters] Denoising Strength = 1.0
[2024-04-08 07:46:57] INFO     [Parameters] Initial Latent shape: Image Space (896, 1152)
[2024-04-08 07:46:57] INFO     [Fooocus] Preparation time: 1.80 seconds
[Sampler] refiner_swap_method = joint
[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828
Requested to load SDXL
Loading 1 new model
[2024-04-08 07:46:58] INFO     [Task Queue] Already waiting for 10.4 seconds, job_id=d527d7d3-afb3-41a0-b25e-bf481833b707
[Fooocus Model Management] Moving model(s) has taken 0.75 seconds
  0%|          | 0/30 [00:00<?, ?it/s]
  3%|▎         | 1/30 [00:00<00:20,  1.44it/s]
  7%|▋         | 2/30 [00:00<00:11,  2.42it/s]
 10%|█         | 3/30 [00:01<00:08,  3.09it/s]
 13%|█▎        | 4/30 [00:01<00:07,  3.51it/s]
 17%|█▋        | 5/30 [00:01<00:06,  3.81it/s]
 20%|██        | 6/30 [00:01<00:05,  4.01it/s]
 23%|██▎       | 7/30 [00:02<00:05,  4.14it/s]
 27%|██▋       | 8/30 [00:02<00:05,  4.24it/s]
 30%|███       | 9/30 [00:02<00:04,  4.30it/s]
 33%|███▎      | 10/30 [00:02<00:04,  4.33it/s]
 37%|███▋      | 11/30 [00:02<00:04,  4.36it/s]
 40%|████      | 12/30 [00:03<00:04,  4.37it/s]
 43%|████▎     | 13/30 [00:03<00:03,  4.38it/s]
 47%|████▋     | 14/30 [00:03<00:03,  4.38it/s]
 50%|█████     | 15/30 [00:03<00:03,  4.38it/s]
 53%|█████▎    | 16/30 [00:04<00:03,  4.39it/s]
 57%|█████▋    | 17/30 [00:04<00:02,  4.37it/s]
 60%|██████    | 18/30 [00:04<00:02,  4.38it/s]
 63%|██████▎   | 19/30 [00:04<00:02,  4.38it/s]
 67%|██████▋   | 20/30 [00:04<00:02,  4.38it/s]
 70%|███████   | 21/30 [00:05<00:02,  4.38it/s]
 73%|███████▎  | 22/30 [00:05<00:01,  4.37it/s]
 77%|███████▋  | 23/30 [00:05<00:01,  4.37it/s]
 80%|████████  | 24/30 [00:05<00:01,  4.38it/s]
 83%|████████▎ | 25/30 [00:06<00:01,  4.38it/s]
 87%|████████▋ | 26/30 [00:06<00:00,  4.39it/s]
 90%|█████████ | 27/30 [00:06<00:00,  4.39it/s]
 93%|█████████▎| 28/30 [00:06<00:00,  4.39it/s]
 97%|█████████▋| 29/30 [00:07<00:00,  4.37it/s]
100%|██████████| 30/30 [00:07<00:00,  4.31it/s]
100%|██████████| 30/30 [00:07<00:00,  4.12it/s]
Requested to load AutoencoderKL
Loading 1 new model
[2024-04-08 07:47:06] INFO     [Fooocus] Generating and saving time: 8.38 seconds
[2024-04-08 07:47:08] INFO     [Task Queue] Already waiting for 20.4 seconds, job_id=d527d7d3-afb3-41a0-b25e-bf481833b707
[2024-04-08 07:47:08] INFO     [Task Queue] Finish task, job_id=d527d7d3-afb3-41a0-b25e-bf481833b707
[Predictor Predict] Finished with 1 images
Version Details
Version ID
bd7d45104209dc3e1e2765d364697f1393a92a210a0e47fdf943afbd2271a48c
Version Created
April 8, 2024
Run on Replicate →