mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-28 18:08:54 +01:00
Add ControlNet model and filter to metadata (#1454)
This commit is contained in:
parent
53b5ce6e2c
commit
7d496f4ad0
@ -21,6 +21,8 @@ TASK_TEXT_MAPPING = {
|
|||||||
"seed": "Seed",
|
"seed": "Seed",
|
||||||
"use_stable_diffusion_model": "Stable Diffusion model",
|
"use_stable_diffusion_model": "Stable Diffusion model",
|
||||||
"clip_skip": "Clip Skip",
|
"clip_skip": "Clip Skip",
|
||||||
|
"use_controlnet_model": "ControlNet model",
|
||||||
|
"control_filter_to_apply": "ControlNet Filter",
|
||||||
"use_vae_model": "VAE model",
|
"use_vae_model": "VAE model",
|
||||||
"sampler_name": "Sampler",
|
"sampler_name": "Sampler",
|
||||||
"width": "Width",
|
"width": "Width",
|
||||||
@ -260,10 +262,12 @@ def get_printable_request(req: GenerateImageRequest, task_data: TaskData, output
|
|||||||
del metadata["lora_alpha"]
|
del metadata["lora_alpha"]
|
||||||
if task_data.use_upscale != "latent_upscaler" and "latent_upscaler_steps" in metadata:
|
if task_data.use_upscale != "latent_upscaler" and "latent_upscaler_steps" in metadata:
|
||||||
del metadata["latent_upscaler_steps"]
|
del metadata["latent_upscaler_steps"]
|
||||||
|
if task_data.use_controlnet_model is None and "control_filter_to_apply" in metadata:
|
||||||
|
del metadata["control_filter_to_apply"]
|
||||||
|
|
||||||
if not using_diffusers:
|
if not using_diffusers:
|
||||||
for key in (
|
for key in (
|
||||||
x for x in ["use_lora_model", "lora_alpha", "clip_skip", "tiling", "latent_upscaler_steps"] if x in metadata
|
x for x in ["use_lora_model", "lora_alpha", "clip_skip", "tiling", "latent_upscaler_steps", "use_controlnet_model", "control_filter_to_apply"] if x in metadata
|
||||||
):
|
):
|
||||||
del metadata[key]
|
del metadata[key]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user