Spaces:
Runtime error
Runtime error
yupeng.zhou
commited on
Commit
·
d47f112
1
Parent(s):
5caba55
fix
Browse files
app.py
CHANGED
@@ -526,7 +526,7 @@ def process_generation(_sd_type,_model_type,_upload_images, _num_steps,style_nam
|
|
526 |
pipe = pipe.to(device)
|
527 |
pipe.enable_freeu(s1=0.6, s2=0.4, b1=1.1, b2=1.2)
|
528 |
# pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
|
529 |
-
pipe.scheduler.set_timesteps(50)
|
530 |
set_attention_processor(pipe.unet,id_length_,is_ipadapter = False)
|
531 |
elif _model_type == "Photomaker":
|
532 |
if _sd_type != "RealVision":
|
@@ -666,7 +666,7 @@ with gr.Blocks(css=css) as demo:
|
|
666 |
#sa16_ = gr.Slider(label=" (The degree of Paired Attention at 16 x 16 self-attention layers) ", minimum=0, maximum=1., value=0.3, step=0.1)
|
667 |
sa32_ = gr.Slider(label=" (The degree of Paired Attention at 32 x 32 self-attention layers) ", minimum=0, maximum=1., value=0.7, step=0.1)
|
668 |
sa64_ = gr.Slider(label=" (The degree of Paired Attention at 64 x 64 self-attention layers) ", minimum=0, maximum=1., value=0.7, step=0.1)
|
669 |
-
id_length_ = gr.Slider(label= "Number of id images in total images" , minimum=2, maximum=
|
670 |
# total_length_ = gr.Slider(label= "Number of total images", minimum=1, maximum=20, value=1, step=1)
|
671 |
seed_ = gr.Slider(label="Seed", minimum=-1, maximum=MAX_SEED, value=0, step=1)
|
672 |
num_steps = gr.Slider(
|
@@ -679,16 +679,16 @@ with gr.Blocks(css=css) as demo:
|
|
679 |
G_height = gr.Slider(
|
680 |
label="height",
|
681 |
minimum=256,
|
682 |
-
maximum=
|
683 |
step=32,
|
684 |
-
value=
|
685 |
)
|
686 |
G_width = gr.Slider(
|
687 |
label="width",
|
688 |
minimum=256,
|
689 |
-
maximum=
|
690 |
step=32,
|
691 |
-
value=
|
692 |
)
|
693 |
comic_type = gr.Radio(["No typesetting (default)", "Four Pannel", "Classic Comic Style"], value = "Classic Comic Style", label="Typesetting Style", info="Select the typesetting style ")
|
694 |
guidance_scale = gr.Slider(
|
|
|
526 |
pipe = pipe.to(device)
|
527 |
pipe.enable_freeu(s1=0.6, s2=0.4, b1=1.1, b2=1.2)
|
528 |
# pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
|
529 |
+
# pipe.scheduler.set_timesteps(50)
|
530 |
set_attention_processor(pipe.unet,id_length_,is_ipadapter = False)
|
531 |
elif _model_type == "Photomaker":
|
532 |
if _sd_type != "RealVision":
|
|
|
666 |
#sa16_ = gr.Slider(label=" (The degree of Paired Attention at 16 x 16 self-attention layers) ", minimum=0, maximum=1., value=0.3, step=0.1)
|
667 |
sa32_ = gr.Slider(label=" (The degree of Paired Attention at 32 x 32 self-attention layers) ", minimum=0, maximum=1., value=0.7, step=0.1)
|
668 |
sa64_ = gr.Slider(label=" (The degree of Paired Attention at 64 x 64 self-attention layers) ", minimum=0, maximum=1., value=0.7, step=0.1)
|
669 |
+
id_length_ = gr.Slider(label= "Number of id images in total images" , minimum=2, maximum=2, value=2, step=1)
|
670 |
# total_length_ = gr.Slider(label= "Number of total images", minimum=1, maximum=20, value=1, step=1)
|
671 |
seed_ = gr.Slider(label="Seed", minimum=-1, maximum=MAX_SEED, value=0, step=1)
|
672 |
num_steps = gr.Slider(
|
|
|
679 |
G_height = gr.Slider(
|
680 |
label="height",
|
681 |
minimum=256,
|
682 |
+
maximum=1024,
|
683 |
step=32,
|
684 |
+
value=1024,
|
685 |
)
|
686 |
G_width = gr.Slider(
|
687 |
label="width",
|
688 |
minimum=256,
|
689 |
+
maximum=1024,
|
690 |
step=32,
|
691 |
+
value=1024,
|
692 |
)
|
693 |
comic_type = gr.Radio(["No typesetting (default)", "Four Pannel", "Classic Comic Style"], value = "Classic Comic Style", label="Typesetting Style", info="Select the typesetting style ")
|
694 |
guidance_scale = gr.Slider(
|