Spaces:
Runtime error
Runtime error
zhiweili
commited on
Commit
·
fa61b07
1
Parent(s):
2a3a686
change base model
Browse files- app_text2img.py +3 -3
app_text2img.py
CHANGED
|
@@ -20,7 +20,7 @@ from controlnet_aux import (
|
|
| 20 |
CannyDetector,
|
| 21 |
)
|
| 22 |
|
| 23 |
-
BASE_MODEL = "
|
| 24 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
| 25 |
|
| 26 |
DEFAULT_EDIT_PROMPT = "a woman, blue hair, high detailed"
|
|
@@ -88,12 +88,12 @@ def image_to_image(
|
|
| 88 |
generator=generator,
|
| 89 |
prompt=edit_prompt,
|
| 90 |
negative_prompt=DEFAULT_NEGATIVE_PROMPT,
|
| 91 |
-
image=cond_image,
|
| 92 |
height=generate_size,
|
| 93 |
width=generate_size,
|
| 94 |
guidance_scale=guidance_scale,
|
| 95 |
num_inference_steps=num_steps,
|
| 96 |
-
|
| 97 |
adapter_conditioning_scale=cond_scale,
|
| 98 |
).images[0]
|
| 99 |
|
|
|
|
| 20 |
CannyDetector,
|
| 21 |
)
|
| 22 |
|
| 23 |
+
BASE_MODEL = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 24 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
| 25 |
|
| 26 |
DEFAULT_EDIT_PROMPT = "a woman, blue hair, high detailed"
|
|
|
|
| 88 |
generator=generator,
|
| 89 |
prompt=edit_prompt,
|
| 90 |
negative_prompt=DEFAULT_NEGATIVE_PROMPT,
|
| 91 |
+
# image=cond_image,
|
| 92 |
height=generate_size,
|
| 93 |
width=generate_size,
|
| 94 |
guidance_scale=guidance_scale,
|
| 95 |
num_inference_steps=num_steps,
|
| 96 |
+
adapter_image=cond_image,
|
| 97 |
adapter_conditioning_scale=cond_scale,
|
| 98 |
).images[0]
|
| 99 |
|