Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -77,6 +77,7 @@ styles = {k["name"]: (k["prompt"], k["negative_prompt"]) for k in style_list}
|
|
77 |
DEFAULT_STYLE_NAME = "Style Zero"
|
78 |
STYLE_NAMES = list(styles.keys())
|
79 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
|
|
80 |
|
81 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
82 |
|
@@ -198,7 +199,7 @@ def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
|
|
198 |
f.write(f"Model Scheduler: Euler_a all_custom before cuda \n")
|
199 |
f.write(f"Model VAE: sdxl-vae-bf16\n")
|
200 |
f.write(f"To cuda and bfloat \n")
|
201 |
-
|
202 |
'''
|
203 |
|
204 |
pyx = cyper.inline(code)
|
@@ -234,7 +235,8 @@ def generate_30(
|
|
234 |
options["use_resolution_binning"] = True
|
235 |
images = []
|
236 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
237 |
-
pyx.func(prompt,num_inference_steps,guidance_scale,timestamp)
|
|
|
238 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
239 |
batch_options = options.copy()
|
240 |
rv_image = pipe(**batch_options).images[0]
|
|
|
77 |
DEFAULT_STYLE_NAME = "Style Zero"
|
78 |
STYLE_NAMES = list(styles.keys())
|
79 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
80 |
+
os.putenv('TORCH_LINALG_PREFER_CUSOLVER','1')
|
81 |
|
82 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
83 |
|
|
|
199 |
f.write(f"Model Scheduler: Euler_a all_custom before cuda \n")
|
200 |
f.write(f"Model VAE: sdxl-vae-bf16\n")
|
201 |
f.write(f"To cuda and bfloat \n")
|
202 |
+
return filename
|
203 |
'''
|
204 |
|
205 |
pyx = cyper.inline(code)
|
|
|
235 |
options["use_resolution_binning"] = True
|
236 |
images = []
|
237 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
238 |
+
filename = pyx.func(prompt,num_inference_steps,guidance_scale,timestamp)
|
239 |
+
upload_to_ftp(filename)
|
240 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
241 |
batch_options = options.copy()
|
242 |
rv_image = pipe(**batch_options).images[0]
|