Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,6 @@ import spaces
|
|
| 6 |
from pipeline_flux import FluxPipeline
|
| 7 |
from transformer_flux import FluxTransformer2DModel
|
| 8 |
import torch
|
| 9 |
-
from patch_conv import convert_model
|
| 10 |
|
| 11 |
flux_model = "schnell"
|
| 12 |
bfl_repo = f"black-forest-labs/FLUX.1-{flux_model}"
|
|
@@ -57,8 +56,10 @@ def infer(
|
|
| 57 |
):
|
| 58 |
print("Using model:", model)
|
| 59 |
if model == "2k":
|
|
|
|
| 60 |
pipe.set_adapters("2k")
|
| 61 |
elif model == "4k":
|
|
|
|
| 62 |
pipe.set_adapters(f"4k_{flux_model}")
|
| 63 |
|
| 64 |
if randomize_seed:
|
|
|
|
| 6 |
from pipeline_flux import FluxPipeline
|
| 7 |
from transformer_flux import FluxTransformer2DModel
|
| 8 |
import torch
|
|
|
|
| 9 |
|
| 10 |
flux_model = "schnell"
|
| 11 |
bfl_repo = f"black-forest-labs/FLUX.1-{flux_model}"
|
|
|
|
| 56 |
):
|
| 57 |
print("Using model:", model)
|
| 58 |
if model == "2k":
|
| 59 |
+
pipe.vae.enable_tiling(False)
|
| 60 |
pipe.set_adapters("2k")
|
| 61 |
elif model == "4k":
|
| 62 |
+
pipe.vae.enable_tiling(True)
|
| 63 |
pipe.set_adapters(f"4k_{flux_model}")
|
| 64 |
|
| 65 |
if randomize_seed:
|