Update app.py
Browse files
app.py
CHANGED
@@ -21,14 +21,13 @@ def model_load():
|
|
21 |
|
22 |
def sdxl_process(seed, prompt, additional_prompt, negative_prompt, num_steps, guidance_scale):
|
23 |
pipe = model_load()
|
24 |
-
|
25 |
# generator.manual_seed(seed)
|
26 |
|
27 |
special_prompt = 'jjj, scratch art style'
|
28 |
prompt = f'{special_prompt}, {prompt}, with a black background'
|
29 |
output = pipe(prompt, additional_prompt, negative_prompt=negative_prompt, num_inference_steps=num_steps, guidance_scale=guidance_scale,
|
30 |
-
|
31 |
-
).images[0]
|
32 |
|
33 |
return output
|
34 |
|
|
|
21 |
|
22 |
def sdxl_process(seed, prompt, additional_prompt, negative_prompt, num_steps, guidance_scale):
|
23 |
pipe = model_load()
|
24 |
+
generator = torch.Generator("cuda")
|
25 |
# generator.manual_seed(seed)
|
26 |
|
27 |
special_prompt = 'jjj, scratch art style'
|
28 |
prompt = f'{special_prompt}, {prompt}, with a black background'
|
29 |
output = pipe(prompt, additional_prompt, negative_prompt=negative_prompt, num_inference_steps=num_steps, guidance_scale=guidance_scale,
|
30 |
+
generator=generator).images[0]
|
|
|
31 |
|
32 |
return output
|
33 |
|