Spaces:
Paused
Paused
sdxl turbo -> dreamshaper
Browse files- app/core/schemas.py +2 -2
- app/main.py +4 -3
- sql_app.db +0 -0
app/core/schemas.py
CHANGED
@@ -55,8 +55,8 @@ class Generate(BaseModel):
|
|
55 |
|
56 |
class TextImage(Generate):
|
57 |
prompt: str
|
58 |
-
num_inference_steps: int =
|
59 |
-
guidance_scale: float =
|
60 |
|
61 |
|
62 |
class ImageImage(Generate):
|
|
|
55 |
|
56 |
class TextImage(Generate):
|
57 |
prompt: str
|
58 |
+
num_inference_steps: int = 4
|
59 |
+
guidance_scale: float = 2.0
|
60 |
|
61 |
|
62 |
class ImageImage(Generate):
|
app/main.py
CHANGED
@@ -24,10 +24,11 @@ async def lifespan(app: FastAPI):
|
|
24 |
image_encoder_path = "sdxl_models/image_encoder"
|
25 |
ip_ckpt = "sdxl_models/ip-adapter_sdxl.bin"
|
26 |
|
27 |
-
ti_pipe = AutoPipelineForText2Image.from_pretrained(
|
|
|
28 |
ti_pipe.to(DEVICE)
|
29 |
-
|
30 |
-
|
31 |
|
32 |
ii_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
33 |
"timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None)
|
|
|
24 |
image_encoder_path = "sdxl_models/image_encoder"
|
25 |
ip_ckpt = "sdxl_models/ip-adapter_sdxl.bin"
|
26 |
|
27 |
+
ti_pipe = AutoPipelineForText2Image.from_pretrained(
|
28 |
+
'lykon/dreamshaper-xl-v2-turbo', torch_dtype=torch.float16, variant="fp16")
|
29 |
ti_pipe.to(DEVICE)
|
30 |
+
ti_pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
31 |
+
ti_pipe.scheduler.config)
|
32 |
|
33 |
ii_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
34 |
"timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None)
|
sql_app.db
ADDED
Binary file (24.6 kB). View file
|
|