Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -349,6 +349,8 @@ def generate_image(
|
|
| 349 |
progress(0.1, desc="Loading LoRA...")
|
| 350 |
|
| 351 |
lora = load_file(lora_file)
|
|
|
|
|
|
|
| 352 |
|
| 353 |
progress(0.3, desc="Generating image...")
|
| 354 |
|
|
@@ -376,7 +378,7 @@ def create_demo():
|
|
| 376 |
with gr.Blocks(
|
| 377 |
title="Z-Image-i2L Demo",
|
| 378 |
theme=gr.themes.Soft(),
|
| 379 |
-
css=".gradio-container { max-width: 1200px !important; }"
|
| 380 |
) as demo:
|
| 381 |
gr.Markdown("""
|
| 382 |
# 🎨 Z-Image-i2L: Image to LoRA Demo
|
|
|
|
| 349 |
progress(0.1, desc="Loading LoRA...")
|
| 350 |
|
| 351 |
lora = load_file(lora_file)
|
| 352 |
+
# Move LoRA tensors to CUDA with correct dtype
|
| 353 |
+
lora = {k: v.to(device="cuda", dtype=torch.bfloat16) for k, v in lora.items()}
|
| 354 |
|
| 355 |
progress(0.3, desc="Generating image...")
|
| 356 |
|
|
|
|
| 378 |
with gr.Blocks(
|
| 379 |
title="Z-Image-i2L Demo",
|
| 380 |
theme=gr.themes.Soft(),
|
| 381 |
+
css=".gradio-container { max-width: 1200px !important; margin: 0 auto}"
|
| 382 |
) as demo:
|
| 383 |
gr.Markdown("""
|
| 384 |
# 🎨 Z-Image-i2L: Image to LoRA Demo
|