Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,10 +66,9 @@ def enable_lora(lora_scale, lora_in, lora_add):
|
|
66 |
lora_add = lora_in
|
67 |
url = f'https://huggingface.co/{lora_add}/tree/main'
|
68 |
lora_name = scrape_lora_link(url)
|
69 |
-
pipe.
|
70 |
pipe.fuse_lora(lora_scale=lora_scale)
|
71 |
|
72 |
-
@spaces.GPU()
|
73 |
def generate_image(
|
74 |
prompt:str,
|
75 |
width:int=768,
|
@@ -104,7 +103,7 @@ def generate_image(
|
|
104 |
|
105 |
return image, seed
|
106 |
|
107 |
-
|
108 |
def gen(
|
109 |
prompt:str,
|
110 |
width:int=768,
|
@@ -210,10 +209,10 @@ with gr.Blocks(css=CSS, js=JS, theme="Nymbo/Nymbo_Theme") as demo:
|
|
210 |
value=1.0,
|
211 |
)
|
212 |
lora_in = gr.Dropdown(
|
213 |
-
choices=["Shakker-Labs/FLUX.1-dev-LoRA-blended-realistic-illustration", "Shakker-Labs/AWPortrait-FL"
|
214 |
label="LoRA Model",
|
215 |
info="Load the LoRA",
|
216 |
-
value="
|
217 |
)
|
218 |
lora_add = gr.Textbox(
|
219 |
label="Add Flux LoRA",
|
|
|
66 |
lora_add = lora_in
|
67 |
url = f'https://huggingface.co/{lora_add}/tree/main'
|
68 |
lora_name = scrape_lora_link(url)
|
69 |
+
pipe.load_lora_weights(lora_add, weight_name=lora_name)
|
70 |
pipe.fuse_lora(lora_scale=lora_scale)
|
71 |
|
|
|
72 |
def generate_image(
|
73 |
prompt:str,
|
74 |
width:int=768,
|
|
|
103 |
|
104 |
return image, seed
|
105 |
|
106 |
+
@spaces.GPU()
|
107 |
def gen(
|
108 |
prompt:str,
|
109 |
width:int=768,
|
|
|
209 |
value=1.0,
|
210 |
)
|
211 |
lora_in = gr.Dropdown(
|
212 |
+
choices=["Shakker-Labs/FLUX.1-dev-LoRA-blended-realistic-illustration", "Shakker-Labs/AWPortrait-FL"],
|
213 |
label="LoRA Model",
|
214 |
info="Load the LoRA",
|
215 |
+
value="",
|
216 |
)
|
217 |
lora_add = gr.Textbox(
|
218 |
label="Add Flux LoRA",
|