Update app.py
Browse files
app.py
CHANGED
@@ -79,6 +79,8 @@ def generate_image(
|
|
79 |
seed:int=-1,
|
80 |
nums:int=1):
|
81 |
|
|
|
|
|
82 |
if seed == -1:
|
83 |
seed = random.randint(0, MAX_SEED)
|
84 |
seed = int(seed)
|
@@ -117,7 +119,6 @@ def gen(
|
|
117 |
progress=gr.Progress(track_tqdm=True)
|
118 |
):
|
119 |
enable_lora(lora_scale, lora_in, lora_add)
|
120 |
-
pipe.to(device="cuda", dtype=torch.bfloat16)
|
121 |
return generate_image(prompt,width,height,scales,steps,seed,nums)
|
122 |
|
123 |
|
|
|
79 |
seed:int=-1,
|
80 |
nums:int=1):
|
81 |
|
82 |
+
pipe.to(device="cuda")
|
83 |
+
|
84 |
if seed == -1:
|
85 |
seed = random.randint(0, MAX_SEED)
|
86 |
seed = int(seed)
|
|
|
119 |
progress=gr.Progress(track_tqdm=True)
|
120 |
):
|
121 |
enable_lora(lora_scale, lora_in, lora_add)
|
|
|
122 |
return generate_image(prompt,width,height,scales,steps,seed,nums)
|
123 |
|
124 |
|