Spaces:
Running
on
Zero
Running
on
Zero
Upload genimage.py
Browse files- genimage.py +3 -3
genimage.py
CHANGED
@@ -6,7 +6,7 @@ def load_pipeline():
|
|
6 |
import torch
|
7 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
8 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
9 |
-
"John6666/
|
10 |
torch_dtype=torch.float16,
|
11 |
)
|
12 |
pipe.to(device)
|
@@ -38,7 +38,7 @@ def generate_image(prompt, neg_prompt):
|
|
38 |
"negative_prompt": neg_prompt,
|
39 |
"resolution": f"{1024} x {1024}",
|
40 |
"guidance_scale": 7.5,
|
41 |
-
"num_inference_steps":
|
42 |
"sampler": "Euler",
|
43 |
}
|
44 |
try:
|
@@ -48,7 +48,7 @@ def generate_image(prompt, neg_prompt):
|
|
48 |
width=1024,
|
49 |
height=1024,
|
50 |
guidance_scale=7.5,
|
51 |
-
num_inference_steps=
|
52 |
output_type="pil",
|
53 |
clip_skip=1,
|
54 |
).images
|
|
|
6 |
import torch
|
7 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
8 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
9 |
+
"John6666/rae-diffusion-xl-v2-sdxl-spo-pcm",
|
10 |
torch_dtype=torch.float16,
|
11 |
)
|
12 |
pipe.to(device)
|
|
|
38 |
"negative_prompt": neg_prompt,
|
39 |
"resolution": f"{1024} x {1024}",
|
40 |
"guidance_scale": 7.5,
|
41 |
+
"num_inference_steps": 16,
|
42 |
"sampler": "Euler",
|
43 |
}
|
44 |
try:
|
|
|
48 |
width=1024,
|
49 |
height=1024,
|
50 |
guidance_scale=7.5,
|
51 |
+
num_inference_steps=16,
|
52 |
output_type="pil",
|
53 |
clip_skip=1,
|
54 |
).images
|