khawir commited on
Commit
4bf5384
1 Parent(s): cd1d27a

dreamshaper --> sdxl turbo

Browse files
Files changed (2) hide show
  1. app/core/schemas.py +2 -2
  2. app/main.py +3 -4
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 = 4
59
- guidance_scale: float = 2.0
60
 
61
 
62
  class ImageImage(Generate):
 
55
 
56
  class TextImage(Generate):
57
  prompt: str
58
+ num_inference_steps: int = 1
59
+ guidance_scale: float = 0.0
60
 
61
 
62
  class ImageImage(Generate):
app/main.py CHANGED
@@ -24,11 +24,10 @@ 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
- '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)
 
24
  image_encoder_path = "sdxl_models/image_encoder"
25
  ip_ckpt = "sdxl_models/ip-adapter_sdxl.bin"
26
 
27
+ ti_pipe = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16")
 
28
  ti_pipe.to(DEVICE)
29
+ # ti_pipe.scheduler = DPMSolverMultistepScheduler.from_config(
30
+ # ti_pipe.scheduler.config)
31
 
32
  ii_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
33
  "timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None)