Spaces:
Runtime error
Runtime error
Commit
•
3cfc613
1
Parent(s):
28b9547
Update app.py
Browse files
app.py
CHANGED
@@ -40,6 +40,8 @@ css = '''
|
|
40 |
|
41 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16)
|
42 |
original_pipe = copy.deepcopy(pipe)
|
|
|
|
|
43 |
def merge_and_run(prompt, negative_prompt, shuffled_items, lora_1_scale=0.5, lora_2_scale=0.5, progress=gr.Progress(track_tqdm=True)):
|
44 |
pipe = copy.deepcopy(original_pipe)
|
45 |
pipe.load_lora_weights(shuffled_items[0]['repo'], weight_name=shuffled_items[0]['weights'])
|
|
|
40 |
|
41 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16)
|
42 |
original_pipe = copy.deepcopy(pipe)
|
43 |
+
|
44 |
+
@spaces.GPU
|
45 |
def merge_and_run(prompt, negative_prompt, shuffled_items, lora_1_scale=0.5, lora_2_scale=0.5, progress=gr.Progress(track_tqdm=True)):
|
46 |
pipe = copy.deepcopy(original_pipe)
|
47 |
pipe.load_lora_weights(shuffled_items[0]['repo'], weight_name=shuffled_items[0]['weights'])
|