Spaces:
Running
Running
Commit
•
d857e4f
1
Parent(s):
5b82e60
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def update_selection(evt: gr.SelectData):
|
|
49 |
)
|
50 |
|
51 |
@spaces.GPU(duration=80)
|
52 |
-
def generate_image(prompt, trigger_word, steps, seed, cfg_scale, width, height,
|
53 |
|
54 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
55 |
|
@@ -86,7 +86,7 @@ def run_lora(prompt, cfg_scale, steps, selected_index, randomize_seed, seed, wid
|
|
86 |
if randomize_seed:
|
87 |
seed = random.randint(0, MAX_SEED)
|
88 |
|
89 |
-
image = generate_image(prompt, trigger_word, steps, seed, cfg_scale, width, height,
|
90 |
|
91 |
pipe.unload_lora_weights()
|
92 |
return image, seed
|
|
|
49 |
)
|
50 |
|
51 |
@spaces.GPU(duration=80)
|
52 |
+
def generate_image(prompt, trigger_word, steps, seed, cfg_scale, width, height, lora_scale, progress):
|
53 |
|
54 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
55 |
|
|
|
86 |
if randomize_seed:
|
87 |
seed = random.randint(0, MAX_SEED)
|
88 |
|
89 |
+
image = generate_image(prompt, trigger_word, steps, seed, cfg_scale, width, height, lora_scale, progress)
|
90 |
|
91 |
pipe.unload_lora_weights()
|
92 |
return image, seed
|