Spaces:
Paused
Paused
uuu
Browse files
app.py
CHANGED
@@ -67,18 +67,17 @@ pipe.init_ipadapter(
|
|
67 |
def gui_generation(prompt, ref_img, guidance_scale, ipadapter_scale):
|
68 |
|
69 |
# Ensure the pipeline runs with correct dtype and device
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
).images[0]
|
82 |
|
83 |
return image
|
84 |
|
|
|
67 |
def gui_generation(prompt, ref_img, guidance_scale, ipadapter_scale):
|
68 |
|
69 |
# Ensure the pipeline runs with correct dtype and device
|
70 |
+
image = pipe(
|
71 |
+
width=1024,
|
72 |
+
height=1024,
|
73 |
+
prompt=prompt,
|
74 |
+
negative_prompt="lowres, low quality, worst quality",
|
75 |
+
num_inference_steps=24,
|
76 |
+
guidance_scale=guidance_scale,
|
77 |
+
generator=torch.Generator("cuda").manual_seed(42),
|
78 |
+
clip_image=ref_img.convert('RGB'),
|
79 |
+
ipadapter_scale=ipadapter_scale,
|
80 |
+
).images[0]
|
|
|
81 |
|
82 |
return image
|
83 |
|