Spaces:
Running
on
Zero
Running
on
Zero
Remove unnecessary functionality
Browse files
app.py
CHANGED
@@ -31,9 +31,6 @@ gender_dict = {"ID_1": "male", "ID_5": "male", "ID_16": "female", "ID_20": "male
|
|
31 |
MAX_SEED = 10000
|
32 |
image_size = 512
|
33 |
|
34 |
-
global previous_id
|
35 |
-
previous_id = ""
|
36 |
-
|
37 |
|
38 |
@spaces.GPU # Uncomment if using ZeroGPU
|
39 |
def infer(
|
@@ -48,10 +45,8 @@ def infer(
|
|
48 |
num_images=1
|
49 |
):
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
pipe.load_lora_weights(full_lora_weights_path)
|
54 |
-
previous_id = identity
|
55 |
|
56 |
if randomize_seed:
|
57 |
seed = random.randint(0, MAX_SEED)
|
@@ -86,8 +81,6 @@ css = """
|
|
86 |
}
|
87 |
"""
|
88 |
|
89 |
-
|
90 |
-
|
91 |
with gr.Blocks(css=css) as demo:
|
92 |
with gr.Column(elem_id="col-container"):
|
93 |
gr.Markdown(" # ID-Booth Demo")
|
|
|
31 |
MAX_SEED = 10000
|
32 |
image_size = 512
|
33 |
|
|
|
|
|
|
|
34 |
|
35 |
@spaces.GPU # Uncomment if using ZeroGPU
|
36 |
def infer(
|
|
|
45 |
num_images=1
|
46 |
):
|
47 |
|
48 |
+
full_lora_weights_path = f"{folder_of_lora_weights}/{identity}/{which_checkpoint}/{lora_name}"
|
49 |
+
pipe.load_lora_weights(full_lora_weights_path)
|
|
|
|
|
50 |
|
51 |
if randomize_seed:
|
52 |
seed = random.randint(0, MAX_SEED)
|
|
|
81 |
}
|
82 |
"""
|
83 |
|
|
|
|
|
84 |
with gr.Blocks(css=css) as demo:
|
85 |
with gr.Column(elem_id="col-container"):
|
86 |
gr.Markdown(" # ID-Booth Demo")
|