sd-forge-layerdiffuse icon indicating copy to clipboard operation
sd-forge-layerdiffuse copied to clipboard

How to use layerdiffuse IN webui API , thank you!

Open qq404388339 opened this issue 1 year ago • 3 comments

Error running process before every sampling: c: webuiforgelwebui\extensions sd-forge-layerdiffuselscripts forge layerdiffusion.py script.process before every sampling(p,*script args, **kwargs)fg additional prompt =fg additional prompt +',TypeError: unsupported operand type(s)for +:'NoneType' and 'str File "c:\webuiforge\webui\modules\scripts.py",line 892, in process before every sampling else None File "c: webuiforgelwebuilextensionsisd-forge-laverdiffuselscriptslforge laverdiffusion.py", line 197, in process before every sampling '+ original prompt if fg_additional_prompt

qq404388339 avatar Sep 04 '24 04:09 qq404388339

LAYERDIFFFUSE_PARAMS = list(OrderedDict([
    ("enabled", True),
    ("method", "(SDXL) Only Generate Transparent Image (Attention Injection)"),
    ("weight", 1),
    ("ending_step", 1),
    ("fg_image", None),
    ("bg_image", None),
    ("blend_image", None),
    ("resize_mode", "Crop and Resize",),
    ("output_origin", False,),
    ("fg_additional_prompt", "" ),
    ("bg_additional_prompt",  ""),
    ("blend_additional_promp",  ""),
]).values())

params = {
    "prompt": "",
    # ...,
    "alwayson_scripts": {
         "layerdiffuse": {"args": LAYERDIFFFUSE_PARAMS}
     }
}

YAtOff avatar Sep 19 '24 13:09 YAtOff

LAYERDIFFFUSE_PARAMS = list(OrderedDict([
    ("enabled", True),
    ("method", "(SDXL) Only Generate Transparent Image (Attention Injection)"),
    ("weight", 1),
    ("ending_step", 1),
    ("fg_image", None),
    ("bg_image", None),
    ("blend_image", None),
    ("resize_mode", "Crop and Resize",),
    ("output_origin", False,),
    ("fg_additional_prompt", "" ),
    ("bg_additional_prompt",  ""),
    ("blend_additional_promp",  ""),
]).values())

params = {
    "prompt": "",
    # ...,
    "alwayson_scripts": {
         "layerdiffuse": {"args": LAYERDIFFFUSE_PARAMS}
     }
}

Hi, @YAtOff , How can I send images to api? For example, (SDXL) From Foreground to Blending. Looking forward to your reply, thank you.

AngusBB avatar Nov 10 '24 07:11 AngusBB

What's the reason (SD1.5) Only Generate Transparent lmage (Attention Injection)' is not a valid LayerMethod

qq404388339 avatar Apr 01 '25 04:04 qq404388339