lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.1k stars 792 forks source link

get black image using SD text2img API with flux model #1977

Open zzy7517 opened 2 weeks ago

zzy7517 commented 2 weeks ago

it works fine in the webui but failed for the API call

GPU-server commented 1 week ago

can you share your code please @zzy7517 ?

michael-wise commented 1 week ago

Try passing this additional key value along with your API call.

"scheduler": "Simple",
zzy7517 commented 4 days ago

@michael-wise now i get a picture showing a gradient of purple. I think what it missing the vae and the text encoder, but just don't figure out how to put them in the API call

perk11 commented 1 day ago

@zzy7517 The following parameters worked for me:

      "width": 1024,
      "height": 1024,
      "steps": 20,
      "scheduler": "Simple",
      "cfg_scale": 1,
      "sampler_name": "[Forge] Flux Realistic",
      "override_settings": {
        "sd_model_checkpoint":"flux1-dev.safetensors",
        "forge_preset":"flux",
        "forge_additional_modules":
        ["/opt/stable-diffusion-webui-forge/models/text_encoder/clip_l.safetensors","/opt/stable-diffusion-webui-forge/models/text_encoder/t5xxl_fp16.safetensors",
          "/opt/stable-diffusion-webui-forge/models/VAE/ae.safetensors"
        ]
      }