chaowei100 commited on
Commit
5dd8db4
1 Parent(s): a6af015

Update funtional_picture.py

Browse files
Files changed (1) hide show
  1. funtional_picture.py +1 -1
funtional_picture.py CHANGED
@@ -10,7 +10,7 @@ from diffusers import (
10
  device="cuda"
11
  model_id = "IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1"
12
 
13
- pipe_text2img = StableDiffusionPipeline.from_pretrained(model_id)
14
  pipe_img2img = StableDiffusionImg2ImgPipeline(**pipe_text2img.components)
15
  def infer_text2img(prompt, guide, steps, width, height, image_in, strength):
16
  if image_in is not None:
 
10
  device="cuda"
11
  model_id = "IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1"
12
 
13
+ pipe_text2img = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
14
  pipe_img2img = StableDiffusionImg2ImgPipeline(**pipe_text2img.components)
15
  def infer_text2img(prompt, guide, steps, width, height, image_in, strength):
16
  if image_in is not None: