Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
7a30042
1
Parent(s):
2ca84f7
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def run_xlc(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pag
|
|
41 |
seed = random.randint(0, 9007199254740991)
|
42 |
|
43 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
44 |
-
image = pipe_xlc(prompt, negative_prompt=negative_prompt, guidance_scale=guidance_scale, pag_scale=pag_scale, pag_applied_layers=pag_layers, generator=generator, num_inference_steps=25).images[0]
|
45 |
|
46 |
return image, seed
|
47 |
|
@@ -51,7 +51,7 @@ def run_xlnc(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pa
|
|
51 |
seed = random.randint(0, 9007199254740991)
|
52 |
|
53 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
54 |
-
image = pipe_xlnc(prompt, negative_prompt=negative_prompt, guidance_scale=guidance_scale, pag_scale=pag_scale, pag_applied_layers=pag_layers, generator=generator, num_inference_steps=25).images[0]
|
55 |
|
56 |
return image, seed
|
57 |
|
@@ -65,6 +65,7 @@ def run_sc(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pag_
|
|
65 |
|
66 |
return image, seed
|
67 |
|
|
|
68 |
def run_snc(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pag_layers=["mid"], randomize_seed=True, seed=42, progress=gr.Progress(track_tqdm=True)):
|
69 |
if(randomize_seed):
|
70 |
seed = random.randint(0, 9007199254740991)
|
|
|
41 |
seed = random.randint(0, 9007199254740991)
|
42 |
|
43 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
44 |
+
image = pipe_xlc(prompt, width=512, height=512, negative_prompt=negative_prompt, guidance_scale=guidance_scale, pag_scale=pag_scale, pag_applied_layers=pag_layers, generator=generator, num_inference_steps=25).images[0]
|
45 |
|
46 |
return image, seed
|
47 |
|
|
|
51 |
seed = random.randint(0, 9007199254740991)
|
52 |
|
53 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
54 |
+
image = pipe_xlnc(prompt, width=512, height=512, negative_prompt=negative_prompt, guidance_scale=guidance_scale, pag_scale=pag_scale, pag_applied_layers=pag_layers, generator=generator, num_inference_steps=25).images[0]
|
55 |
|
56 |
return image, seed
|
57 |
|
|
|
65 |
|
66 |
return image, seed
|
67 |
|
68 |
+
@spaces.GPU
|
69 |
def run_snc(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pag_layers=["mid"], randomize_seed=True, seed=42, progress=gr.Progress(track_tqdm=True)):
|
70 |
if(randomize_seed):
|
71 |
seed = random.randint(0, 9007199254740991)
|