Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ pipe_no_lora = ZImagePipeline.from_pretrained(
|
|
| 19 |
)
|
| 20 |
pipe.load_lora_weights("Shakker-Labs/AWPortrait-Z", weight_name="AWPortrait-Z.safetensors", adapter_name="lora")
|
| 21 |
pipe.set_adapters(["lora",], adapter_weights=[1.])
|
| 22 |
-
pipe.fuse_lora(adapter_names=["lora"], lora_scale
|
| 23 |
pipe.unload_lora_weights()
|
| 24 |
pipe.to("cuda")
|
| 25 |
pipe_no_lora.to("cuda")
|
|
@@ -74,7 +74,8 @@ with gr.Blocks() as demo:
|
|
| 74 |
"""
|
| 75 |
# Z-Image-Turbo Portrait✨
|
| 76 |
|
| 77 |
-
Generate high-quality portrait images with [Tongyi-MAI/Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo) using [portrait-beauty LoRA by
|
|
|
|
| 78 |
This turbo model generates images in just 8 inference steps!
|
| 79 |
"""
|
| 80 |
)
|
|
|
|
| 19 |
)
|
| 20 |
pipe.load_lora_weights("Shakker-Labs/AWPortrait-Z", weight_name="AWPortrait-Z.safetensors", adapter_name="lora")
|
| 21 |
pipe.set_adapters(["lora",], adapter_weights=[1.])
|
| 22 |
+
pipe.fuse_lora(adapter_names=["lora"], lora_scale=.9)
|
| 23 |
pipe.unload_lora_weights()
|
| 24 |
pipe.to("cuda")
|
| 25 |
pipe_no_lora.to("cuda")
|
|
|
|
| 74 |
"""
|
| 75 |
# Z-Image-Turbo Portrait✨
|
| 76 |
|
| 77 |
+
Generate high-quality portrait images with [Tongyi-MAI/Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo) using [portrait-beauty LoRA by @dynamicwangs
|
| 78 |
+
and Shakker Labs](https://huggingface.co/Shakker-Labs/AWPortrait-Z), for fast inference with enhanced details.
|
| 79 |
This turbo model generates images in just 8 inference steps!
|
| 80 |
"""
|
| 81 |
)
|