Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,12 +34,23 @@ def generate_sketch(prompt,style, num_inference_steps, guidance_scale):
|
|
| 34 |
print(prompt)
|
| 35 |
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
|
|
|
| 39 |
pipe.load_lora_weights("Datou1111/shou_xin", weight_name="shou_xin.safetensors")
|
| 40 |
-
|
| 41 |
-
prompt= "sketched style, " + prompt
|
| 42 |
pipe.load_lora_weights("Shakker-Labs/FLUX.1-dev-LoRA-Children-Simple-Sketch", weight_name="FLUX-dev-lora-children-simple-sketch.safetensors")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
pipe.fuse_lora(lora_scale=1.5)
|
| 45 |
|
|
@@ -71,7 +82,7 @@ interface = gr.Interface(
|
|
| 71 |
inputs=[
|
| 72 |
"text", # Prompt input
|
| 73 |
gr.Dropdown(
|
| 74 |
-
["sketched", "shou_xin"],value='sketched', label="Style"
|
| 75 |
),
|
| 76 |
gr.Slider(5, 50, value=24, step=1, label="Number of Inference Steps"), # Slider for num_inference_steps
|
| 77 |
gr.Slider(1.0, 10.0, value=3.5, step=0.1, label="Guidance Scale") # Slider for guidance_scale
|
|
|
|
| 34 |
print(prompt)
|
| 35 |
|
| 36 |
|
| 37 |
+
match style:
|
| 38 |
+
case 'shou_xin':
|
| 39 |
+
prompt = "shou_xin, " + prompt
|
| 40 |
pipe.load_lora_weights("Datou1111/shou_xin", weight_name="shou_xin.safetensors")
|
| 41 |
+
case 'sketched':
|
| 42 |
+
prompt = "sketched style, " + prompt
|
| 43 |
pipe.load_lora_weights("Shakker-Labs/FLUX.1-dev-LoRA-Children-Simple-Sketch", weight_name="FLUX-dev-lora-children-simple-sketch.safetensors")
|
| 44 |
+
case 'sketch_paint':
|
| 45 |
+
prompt = "Sketch paint, " + prompt
|
| 46 |
+
pipe.load_lora_weights("strangerzonehf/Sketch-Paint", weight_name="Sketch-Paint.safetensors")
|
| 47 |
+
case 'sketch_sized':
|
| 48 |
+
prompt = "Sketch Sized, " + prompt
|
| 49 |
+
pipe.load_lora_weights("strangerzonehf/Flux-Sketch-Sized-LoRA", weight_name="Flux-Sketch-Sized-LoRA.safetensors")
|
| 50 |
+
case _:
|
| 51 |
+
prompt = "shou_xin, " + prompt
|
| 52 |
+
pipe.load_lora_weights("Datou1111/shou_xin", weight_name="shou_xin.safetensors")
|
| 53 |
+
|
| 54 |
|
| 55 |
pipe.fuse_lora(lora_scale=1.5)
|
| 56 |
|
|
|
|
| 82 |
inputs=[
|
| 83 |
"text", # Prompt input
|
| 84 |
gr.Dropdown(
|
| 85 |
+
["sketched", "shou_xin","Sketch-Paint","Flux-Sketch-Sized-LoRA"],value='sketched', label="Style"
|
| 86 |
),
|
| 87 |
gr.Slider(5, 50, value=24, step=1, label="Number of Inference Steps"), # Slider for num_inference_steps
|
| 88 |
gr.Slider(1.0, 10.0, value=3.5, step=0.1, label="Guidance Scale") # Slider for guidance_scale
|