Spaces:
vilarin
/
Running on Zero

vilarin commited on
Commit
e66f6d6
1 Parent(s): 5805e23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(device="cuda")
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)