Spaces:
Running
on
Zero
Running
on
Zero
adaface-neurips
commited on
Commit
•
9453f0b
1
Parent(s):
519fd8f
Change default guidance_scale to 6 from 8
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ parser.add_argument('--adaface_ckpt_path', type=str,
|
|
27 |
default='models/adaface/VGGface2_HQ_masks2024-10-13T11-21-07_zero3-ada-9000.pt')
|
28 |
parser.add_argument('--model_style_type', type=str, default='realistic',
|
29 |
choices=["realistic", "anime", "photorealistic"], help="Type of the base model")
|
30 |
-
parser.add_argument("--guidance_scale", type=float, default=
|
31 |
help="The guidance scale for the diffusion model. Default: 8.0")
|
32 |
parser.add_argument("--do_neg_id_prompt_weight", type=float, default=0,
|
33 |
help="The weight of added ID prompt embeddings into the negative prompt. Default: 0, disabled.")
|
@@ -79,7 +79,7 @@ def get_clicked_image(data: gr.SelectData):
|
|
79 |
return data.index
|
80 |
|
81 |
@spaces.GPU
|
82 |
-
def gen_init_images(uploaded_image_paths, prompt, guidance_scale, do_neg_id_prompt_weight, out_image_count=
|
83 |
global adaface, id_animator
|
84 |
if uploaded_image_paths is None:
|
85 |
print("No image uploaded")
|
@@ -270,7 +270,7 @@ with gr.Blocks(css=css, theme=gr.themes.Origin()) as demo:
|
|
270 |
remove_and_reupload = gr.ClearButton(value="Remove and upload subject images", components=files, size="sm")
|
271 |
|
272 |
init_img_files = gr.File(
|
273 |
-
label="[Optional] Generate
|
274 |
file_types=["image"],
|
275 |
file_count="multiple"
|
276 |
)
|
|
|
27 |
default='models/adaface/VGGface2_HQ_masks2024-10-13T11-21-07_zero3-ada-9000.pt')
|
28 |
parser.add_argument('--model_style_type', type=str, default='realistic',
|
29 |
choices=["realistic", "anime", "photorealistic"], help="Type of the base model")
|
30 |
+
parser.add_argument("--guidance_scale", type=float, default=6.0,
|
31 |
help="The guidance scale for the diffusion model. Default: 8.0")
|
32 |
parser.add_argument("--do_neg_id_prompt_weight", type=float, default=0,
|
33 |
help="The weight of added ID prompt embeddings into the negative prompt. Default: 0, disabled.")
|
|
|
79 |
return data.index
|
80 |
|
81 |
@spaces.GPU
|
82 |
+
def gen_init_images(uploaded_image_paths, prompt, guidance_scale, do_neg_id_prompt_weight, out_image_count=4):
|
83 |
global adaface, id_animator
|
84 |
if uploaded_image_paths is None:
|
85 |
print("No image uploaded")
|
|
|
270 |
remove_and_reupload = gr.ClearButton(value="Remove and upload subject images", components=files, size="sm")
|
271 |
|
272 |
init_img_files = gr.File(
|
273 |
+
label="[Optional] Generate 4 images and select 1 image",
|
274 |
file_types=["image"],
|
275 |
file_count="multiple"
|
276 |
)
|