Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ JS = """function () {
|
|
33 |
}"""
|
34 |
|
35 |
if torch.cuda.is_available():
|
36 |
-
pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16)
|
37 |
pipe.load_lora_weights(default_lora, weight_name = default_weight_name) # default load lora
|
38 |
pipe.fuse_lora(lora_scale=0.9)
|
39 |
|
@@ -95,7 +95,7 @@ def generate_image(
|
|
95 |
nums:int=1,
|
96 |
progress=gr.Progress(track_tqdm=True)):
|
97 |
|
98 |
-
pipe.to(
|
99 |
|
100 |
if seed == -1:
|
101 |
seed = random.randint(0, MAX_SEED)
|
|
|
33 |
}"""
|
34 |
|
35 |
if torch.cuda.is_available():
|
36 |
+
pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16).to(0)
|
37 |
pipe.load_lora_weights(default_lora, weight_name = default_weight_name) # default load lora
|
38 |
pipe.fuse_lora(lora_scale=0.9)
|
39 |
|
|
|
95 |
nums:int=1,
|
96 |
progress=gr.Progress(track_tqdm=True)):
|
97 |
|
98 |
+
pipe.to("cuda")
|
99 |
|
100 |
if seed == -1:
|
101 |
seed = random.randint(0, MAX_SEED)
|