Update Styles
Update Styles
This commit is contained in:
parent
a6ac4604cd
commit
01b1e98d37
@ -1 +1 @@
|
||||
version = '2.1.740'
|
||||
version = '2.1.741'
|
||||
|
@ -9,6 +9,7 @@ from modules.util import get_files_from_folder
|
||||
|
||||
config_path = "user_path_config.txt"
|
||||
config_dict = {}
|
||||
visited_keys = []
|
||||
|
||||
try:
|
||||
if os.path.exists(config_path):
|
||||
@ -37,7 +38,8 @@ if preset is not None:
|
||||
|
||||
|
||||
def get_dir_or_set_default(key, default_value):
|
||||
global config_dict
|
||||
global config_dict, visited_keys
|
||||
visited_keys.append(key)
|
||||
v = config_dict.get(key, None)
|
||||
if isinstance(v, str) and os.path.exists(v) and os.path.isdir(v):
|
||||
return v
|
||||
@ -62,7 +64,8 @@ temp_outputs_path = get_dir_or_set_default('temp_outputs_path', '../outputs/')
|
||||
|
||||
|
||||
def get_config_item_or_set_default(key, default_value, validator, disable_empty_as_none=False):
|
||||
global config_dict
|
||||
global config_dict, visited_keys
|
||||
visited_keys.append(key)
|
||||
if key not in config_dict:
|
||||
config_dict[key] = default_value
|
||||
return default_value
|
||||
@ -115,17 +118,17 @@ default_scheduler = get_config_item_or_set_default(
|
||||
)
|
||||
default_styles = get_config_item_or_set_default(
|
||||
key='default_styles',
|
||||
default_value=['Fooocus V2', 'Default (Slightly Cinematic)'],
|
||||
default_value=['Fooocus V2', 'Fooocus Enhance', 'Fooocus Sharp'],
|
||||
validator=lambda x: isinstance(x, list) and all(y in modules.sdxl_styles.legal_style_names for y in x)
|
||||
)
|
||||
default_negative_prompt = get_config_item_or_set_default(
|
||||
key='default_negative_prompt',
|
||||
default_value='low quality, bad hands, bad eyes, cropped, missing fingers, extra digit',
|
||||
default_prompt_negative = get_config_item_or_set_default(
|
||||
key='default_prompt_negative',
|
||||
default_value='',
|
||||
validator=lambda x: isinstance(x, str),
|
||||
disable_empty_as_none=True
|
||||
)
|
||||
default_positive_prompt = get_config_item_or_set_default(
|
||||
key='default_positive_prompt',
|
||||
default_prompt = get_config_item_or_set_default(
|
||||
key='default_prompt',
|
||||
default_value='',
|
||||
validator=lambda x: isinstance(x, str),
|
||||
disable_empty_as_none=True
|
||||
@ -177,7 +180,7 @@ default_aspect_ratio = get_config_item_or_set_default(
|
||||
if preset is None:
|
||||
# Do not overwrite user config if preset is applied.
|
||||
with open(config_path, "w", encoding="utf-8") as json_file:
|
||||
json.dump(config_dict, json_file, indent=4)
|
||||
json.dump({k: config_dict[k] for k in visited_keys}, json_file, indent=4)
|
||||
|
||||
os.makedirs(temp_outputs_path, exist_ok=True)
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
"SAI Enhance",
|
||||
"SAI Fantasy Art"
|
||||
],
|
||||
"default_negative_prompt": "(embedding:unaestheticXLv31:0.8), low quality, watermark",
|
||||
"default_positive_prompt": "1girl, ",
|
||||
"default_prompt_negative": "(embedding:unaestheticXLv31:0.8), low quality, watermark",
|
||||
"default_prompt": "1girl, ",
|
||||
"checkpoint_downloads": {
|
||||
"bluePencilXL_v050.safetensors": "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/bluePencilXL_v050.safetensors",
|
||||
"DreamShaper_8_pruned.safetensors": "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/DreamShaper_8_pruned.safetensors"
|
||||
|
@ -11,8 +11,8 @@
|
||||
"Fooocus Photograph",
|
||||
"Fooocus Negative"
|
||||
],
|
||||
"default_negative_prompt": "unrealistic, saturated, high contrast, big nose, painting, drawing, sketch, cartoon, anime, manga, render, CG, 3d, watermark, signature, label",
|
||||
"default_positive_prompt": "",
|
||||
"default_prompt_negative": "unrealistic, saturated, high contrast, big nose, painting, drawing, sketch, cartoon, anime, manga, render, CG, 3d, watermark, signature, label",
|
||||
"default_prompt": "",
|
||||
"checkpoint_downloads": {
|
||||
"realisticStockPhoto_v10.safetensors": "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/realisticStockPhoto_v10.safetensors"
|
||||
},
|
||||
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"default_model": "sd_xl_base_1.0_0.9vae.safetensors",
|
||||
"default_refiner": "sd_xl_refiner_1.0_0.9vae.safetensors",
|
||||
"default_lora": "sd_xl_offset_example-lora_1.0.safetensors",
|
||||
"default_lora_weight": 0.5,
|
||||
"default_cfg_scale": 7.0,
|
||||
"default_sampler": "dpmpp_2m_sde_gpu",
|
||||
"default_scheduler": "karras",
|
||||
"default_styles": [
|
||||
"Fooocus V2",
|
||||
"Default (Slightly Cinematic)"
|
||||
],
|
||||
"default_negative_prompt": "low quality, bad hands, bad eyes, cropped, missing fingers, extra digit",
|
||||
"default_positive_prompt": "",
|
||||
"checkpoint_downloads": {
|
||||
"sd_xl_base_1.0_0.9vae.safetensors": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors",
|
||||
"sd_xl_refiner_1.0_0.9vae.safetensors": "https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors"
|
||||
},
|
||||
"embeddings_downloads": {},
|
||||
"default_aspect_ratio": "1152*896",
|
||||
"lora_downloads": {
|
||||
"sd_xl_offset_example-lora_1.0.safetensors": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors"
|
||||
}
|
||||
}
|
@ -1,8 +1,13 @@
|
||||
[
|
||||
{
|
||||
"name": "Default (Slightly Cinematic)",
|
||||
"prompt": "cinematic still {prompt} . emotional, harmonious, vignette, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy",
|
||||
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured"
|
||||
"name": "Fooocus Enhance",
|
||||
"prompt": "{prompt} . (perfect real extremely details), award-winning, breathtaking, amazing fine detail, dramatic lighting, best quality",
|
||||
"negative_prompt": "(worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3)"
|
||||
},
|
||||
{
|
||||
"name": "Fooocus Sharp",
|
||||
"prompt": "cinematic still {prompt} . sharp focus, emotional, harmonious, vignette, 4k epic detailed photograph shot on kodak detailed cinematic hbo dark moody, 35mm photo, high budget, cinemascope, moody, epic, gorgeous, film grain, grainy",
|
||||
"negative_prompt": "blurry, anime, cartoon, blured background, graphic, bokeh, background blur, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured"
|
||||
},
|
||||
{
|
||||
"name": "Fooocus Masterpiece",
|
||||
@ -18,5 +23,10 @@
|
||||
"name": "Fooocus Negative",
|
||||
"prompt": "",
|
||||
"negative_prompt": "deformed, bad anatomy, disfigured, poorly drawn face, mutated, extra limb, ugly, poorly drawn hands, missing limb, floating limbs, disconnected limbs, disconnected head, malformed hands, long neck, mutated hands and fingers, bad hands, missing fingers, cropped, worst quality, low quality, mutation, poorly drawn, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, missing fingers, fused fingers, abnormal eye proportion, Abnormal hands, abnormal legs, abnormal feet, abnormal fingers, drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly, anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch"
|
||||
},
|
||||
{
|
||||
"name": "Fooocus Cinematic",
|
||||
"prompt": "cinematic still {prompt} . emotional, harmonious, vignette, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy",
|
||||
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured"
|
||||
}
|
||||
]
|
||||
|
@ -1,3 +1,16 @@
|
||||
# 2.1.741
|
||||
|
||||
Style Updates:
|
||||
|
||||
* "Default (Slightly Cinematic)" as renamed to "Fooocus Cinematic".
|
||||
* "Default (Slightly Cinematic)" is canceled from default style selections.
|
||||
* Added "Fooocus Sharp". This style combines many CivitAI prompts that reduces SDXL blurry and improves sharpness in a relatively natural way.
|
||||
* Added "Fooocus Enhance". This style mainly use the very popular [default negative prompts from JuggernautXL](https://civitai.com/models/133005) and some other enhancing words. JuggernautXL's negative prompt has been proved to be very effective in many recent image posts on CivitAI to improve JuggernautXL and many other models.
|
||||
* "Fooocus Sharp" and "Fooocus Enhance" and "Fooocus V2" becomes the new default set of styles.
|
||||
* Removed the default text in the "negative prompt" input area since it is not necessary now.
|
||||
* You can reproduce previous results by using "Fooocus Cinematic".
|
||||
* "Fooocus Sharp" and "Fooocus Enhance" may undergo minor revision in future updates.
|
||||
|
||||
# 2.1.739
|
||||
|
||||
* Added support for authentication in --share mode (via auth.json).
|
||||
|
8
webui.py
8
webui.py
@ -68,9 +68,9 @@ with shared.gradio_root:
|
||||
prompt = gr.Textbox(show_label=False, placeholder="Type prompt here.",
|
||||
container=False, autofocus=True, elem_classes='type_row', lines=1024)
|
||||
|
||||
if isinstance(modules.path.default_positive_prompt, str) \
|
||||
and modules.path.default_positive_prompt != '':
|
||||
shared.gradio_root.load(lambda: modules.path.default_positive_prompt, outputs=prompt)
|
||||
default_prompt = modules.path.default_prompt
|
||||
if isinstance(default_prompt, str) and default_prompt != '':
|
||||
shared.gradio_root.load(lambda: default_prompt, outputs=prompt)
|
||||
|
||||
with gr.Column(scale=3, min_width=0):
|
||||
generate_button = gr.Button(label="Generate", value="Generate", elem_classes='type_row', elem_id='generate_button', visible=True)
|
||||
@ -193,7 +193,7 @@ with shared.gradio_root:
|
||||
image_number = gr.Slider(label='Image Number', minimum=1, maximum=32, step=1, value=modules.path.default_image_number)
|
||||
negative_prompt = gr.Textbox(label='Negative Prompt', show_label=True, placeholder="Type prompt here.",
|
||||
info='Describing what you do not want to see.', lines=2,
|
||||
value=modules.path.default_negative_prompt)
|
||||
value=modules.path.default_prompt_negative)
|
||||
seed_random = gr.Checkbox(label='Random', value=True)
|
||||
image_seed = gr.Textbox(label='Seed', value=0, max_lines=1, visible=False) # workaround for https://github.com/gradio-app/gradio/issues/5354
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user