waterplayfire commited on
Commit
a008657
·
1 Parent(s): c9bda1f

Update app_old.py

Browse files
Files changed (1) hide show
  1. app_old.py +1 -3
app_old.py CHANGED
@@ -7,11 +7,9 @@ from gradio.components import Image
7
  from gradio.components import Textbox
8
 
9
 
10
- token = "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"
11
 
12
  model_id = "CompVis/stable-diffusion-v1-4"
13
  my_model = "waterplayfire/MyModel"
14
- local = "/Users/qiaoxunlei/Desktop/AI/TestModel/MyModel"
15
  device = "cuda"
16
 
17
  cuda_support = torch.cuda.is_available()
@@ -20,7 +18,7 @@ pipeline = None
20
 
21
  if cuda_support:
22
  title = "Txt to Image by GPU"
23
- pipeline = StableDiffusionPipeline.from_pretrained(my_model, use_auth_token=token, torch_dtype=torch.float16, revision="fp16")
24
  pipeline = pipeline.to(device)
25
  torch.backends.cudnn.enabled = True
26
  else:
 
7
  from gradio.components import Textbox
8
 
9
 
 
10
 
11
  model_id = "CompVis/stable-diffusion-v1-4"
12
  my_model = "waterplayfire/MyModel"
 
13
  device = "cuda"
14
 
15
  cuda_support = torch.cuda.is_available()
 
18
 
19
  if cuda_support:
20
  title = "Txt to Image by GPU"
21
+ pipeline = StableDiffusionPipeline.from_pretrained(my_model, torch_dtype=torch.float16, revision="fp16")
22
  pipeline = pipeline.to(device)
23
  torch.backends.cudnn.enabled = True
24
  else: