twn39 commited on
Commit
44247fb
1 Parent(s): fc5c393
Files changed (2) hide show
  1. app.py +9 -2
  2. requirements.txt +0 -1
app.py CHANGED
@@ -6,7 +6,7 @@ from modelscope.outputs import OutputKeys
6
  from modelscope.pipelines import pipeline
7
  from modelscope.utils.constant import Tasks
8
  import cv2
9
- from diffusers import StableDiffusionXLPipeline, StableDiffusionXLImg2ImgPipeline
10
  import torch
11
 
12
 
@@ -78,7 +78,14 @@ def text_to_image(_image, _prompt):
78
  variant="fp16",
79
  use_safetensors=True,
80
  ).to("cuda")
81
- result = t2i_pipeline(prompt=_prompt).images[0]
 
 
 
 
 
 
 
82
  return result
83
 
84
 
 
6
  from modelscope.pipelines import pipeline
7
  from modelscope.utils.constant import Tasks
8
  import cv2
9
+ from diffusers import StableDiffusionXLPipeline
10
  import torch
11
 
12
 
 
78
  variant="fp16",
79
  use_safetensors=True,
80
  ).to("cuda")
81
+ result = t2i_pipeline(
82
+ prompt=_prompt,
83
+ negative_prompt='ugly',
84
+ num_inference_steps=22,
85
+ width=1024,
86
+ height=1024,
87
+ guidance_scale=7,
88
+ ).images[0]
89
  return result
90
 
91
 
requirements.txt CHANGED
@@ -416,7 +416,6 @@ tensorboard-data-server==0.7.2
416
  # via tensorboard
417
  tensorflow==2.17.0
418
  # via aitoolkits-webui
419
- tensorflow-intel==2.17.0
420
  # via tensorflow
421
  tensorflow-io-gcs-filesystem==0.31.0
422
  # via tensorflow-intel
 
416
  # via tensorboard
417
  tensorflow==2.17.0
418
  # via aitoolkits-webui
 
419
  # via tensorflow
420
  tensorflow-io-gcs-filesystem==0.31.0
421
  # via tensorflow-intel