Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
import json
|
@@ -14,6 +15,7 @@ import random
|
|
14 |
import time
|
15 |
import requests
|
16 |
import pandas as pd
|
|
|
17 |
|
18 |
#Load prompts for randomization
|
19 |
df = pd.read_csv('prompts.csv', header=None)
|
@@ -41,7 +43,7 @@ pipe_i2i = AutoPipelineForImage2Image.from_pretrained(
|
|
41 |
tokenizer_2=pipe.tokenizer_2,
|
42 |
torch_dtype=dtype
|
43 |
)
|
44 |
-
|
45 |
MAX_SEED = 2**32 - 1
|
46 |
|
47 |
pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
|
@@ -81,7 +83,17 @@ def download_file(url, directory=None):
|
|
81 |
file.write(response.content)
|
82 |
|
83 |
return filepath
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
def update_selection(evt: gr.SelectData, selected_indices, loras_state, width, height):
|
86 |
selected_index = evt.index
|
87 |
selected_indices = selected_indices or []
|
|
|
1 |
+
#multimodalart/flux-lora-lab - do not edit
|
2 |
import os
|
3 |
import gradio as gr
|
4 |
import json
|
|
|
15 |
import time
|
16 |
import requests
|
17 |
import pandas as pd
|
18 |
+
#multimodalart/flux-lora-lab - do not edit
|
19 |
|
20 |
#Load prompts for randomization
|
21 |
df = pd.read_csv('prompts.csv', header=None)
|
|
|
43 |
tokenizer_2=pipe.tokenizer_2,
|
44 |
torch_dtype=dtype
|
45 |
)
|
46 |
+
#multimodalart/flux-lora-lab - do not edit
|
47 |
MAX_SEED = 2**32 - 1
|
48 |
|
49 |
pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
|
|
|
83 |
file.write(response.content)
|
84 |
|
85 |
return filepath
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
+
|
90 |
+
|
91 |
+
#multimodalart/flux-lora-lab - do not edit
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
def update_selection(evt: gr.SelectData, selected_indices, loras_state, width, height):
|
98 |
selected_index = evt.index
|
99 |
selected_indices = selected_indices or []
|