mrhan1993 / Fooocus-API

FastAPI powered API for Fooocus
GNU General Public License v3.0
505 stars 132 forks source link

Inpainting base model #314

Closed kexul closed 2 months ago

kexul commented 2 months ago

Hi, Can I choose different base model from the default one? I'd like to use some turo or lightning model for speedup. Thanks!

mrhan1993 commented 2 months ago

of caurse

kexul commented 2 months ago

Hi @mrhan1993, I do not find one in the V1 and V2 parameters, would you mind point me out what parameter name I should use? Many thanks!

mrhan1993 commented 2 months ago

example for TurboVisionXL

{
  "prompt": "",
  "negative_prompt": "",
  "base_model_name": "dreamshaperXL_v21TurboDPMSDE.safetensors",
  "advanced_params": {
    "adaptive_cfg": 2,
    ...
    "overwrite_step": 8,
    ...
    "sampler_name": "dpmpp_sde_gpu",
    "scheduler_name": "karras",
    "skipping_cn_preprocessor": false
  },
...
}

change base_model_name, cfg, step, sampler_name, scheduler_name

a list for sampler and scheduler

KSAMPLER = {
    "euler": "Euler",
    "euler_ancestral": "Euler a",
    "heun": "Heun",
    "heunpp2": "",
    "dpm_2": "DPM2",
    "dpm_2_ancestral": "DPM2 a",
    "lms": "LMS",
    "dpm_fast": "DPM fast",
    "dpm_adaptive": "DPM adaptive",
    "dpmpp_2s_ancestral": "DPM++ 2S a",
    "dpmpp_sde": "DPM++ SDE",
    "dpmpp_sde_gpu": "DPM++ SDE",
    "dpmpp_2m": "DPM++ 2M",
    "dpmpp_2m_sde": "DPM++ 2M SDE",
    "dpmpp_2m_sde_gpu": "DPM++ 2M SDE",
    "dpmpp_3m_sde": "",
    "dpmpp_3m_sde_gpu": "",
    "ddpm": "",
    "lcm": "LCM"
}

SAMPLER_EXTRA = {
    "ddim": "DDIM",
    "uni_pc": "UniPC",
    "uni_pc_bh2": ""
}

SCHEDULER_NAMES = ["normal", "karras", "exponential", "sgm_uniform", "simple", "ddim_uniform", "lcm", "turbo"]

scheduler 'turbo' seems does not work

kexul commented 2 months ago

Thanks! 🫂