mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-26 08:58:54 +01:00
Merge pull request #831 from ogmaresca/remove-promt-strength-txt2img
Restore VAE model in metadata files and remove prompt strength in txt2img generations
This commit is contained in:
commit
666c2f8771
@ -24,6 +24,7 @@ TASK_TEXT_MAPPING = {
|
|||||||
'sampler_name': 'Sampler',
|
'sampler_name': 'Sampler',
|
||||||
'negative_prompt': 'Negative Prompt',
|
'negative_prompt': 'Negative Prompt',
|
||||||
'use_stable_diffusion_model': 'Stable Diffusion model',
|
'use_stable_diffusion_model': 'Stable Diffusion model',
|
||||||
|
'use_vae_model': 'VAE model',
|
||||||
'use_hypernetwork_model': 'Hypernetwork model',
|
'use_hypernetwork_model': 'Hypernetwork model',
|
||||||
'hypernetwork_strength': 'Hypernetwork Strength'
|
'hypernetwork_strength': 'Hypernetwork Strength'
|
||||||
}
|
}
|
||||||
@ -55,6 +56,8 @@ def get_metadata_entries_for_request(req: GenerateImageRequest, task_data: TaskD
|
|||||||
})
|
})
|
||||||
if metadata['use_upscale'] is not None:
|
if metadata['use_upscale'] is not None:
|
||||||
metadata['upscale_amount'] = task_data.upscale_amount
|
metadata['upscale_amount'] = task_data.upscale_amount
|
||||||
|
if (task_data.use_hypernetwork_model is None):
|
||||||
|
del metadata['hypernetwork_strength']
|
||||||
|
|
||||||
# if text, format it in the text format expected by the UI
|
# if text, format it in the text format expected by the UI
|
||||||
is_txt_format = (task_data.metadata_output_format.lower() == 'txt')
|
is_txt_format = (task_data.metadata_output_format.lower() == 'txt')
|
||||||
@ -71,6 +74,8 @@ def get_printable_request(req: GenerateImageRequest):
|
|||||||
metadata = req.dict()
|
metadata = req.dict()
|
||||||
del metadata['init_image']
|
del metadata['init_image']
|
||||||
del metadata['init_image_mask']
|
del metadata['init_image_mask']
|
||||||
|
if (req.init_image is None):
|
||||||
|
del metadata['prompt_strength']
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
def make_filename_callback(req: GenerateImageRequest, suffix=None, now=None):
|
def make_filename_callback(req: GenerateImageRequest, suffix=None, now=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user