JingyeChen22 commited on
Commit
99f5897
1 Parent(s): 57d04bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,7 +35,7 @@ text_encoder = CLIPTextModel.from_pretrained(
35
  'JingyeChen22/textdiffuser2-full-ft-inpainting', subfolder="text_encoder"
36
  ).cuda().half()
37
  tokenizer = CLIPTokenizer.from_pretrained(
38
- 'runwayml/stable-diffusion-v1-5', subfolder="tokenizer"
39
  )
40
 
41
  #### additional tokens are introduced, including coordinate tokens and character tokens
@@ -51,7 +51,7 @@ for c in alphabet:
51
  print(len(tokenizer))
52
  print('***************')
53
 
54
- vae = AutoencoderKL.from_pretrained('runwayml/stable-diffusion-v1-5', subfolder="vae").half().cuda()
55
  unet = UNet2DConditionModel.from_pretrained(
56
  'JingyeChen22/textdiffuser2-full-ft-inpainting', subfolder="unet"
57
  ).half().cuda()
@@ -515,7 +515,7 @@ def text_to_image(guest_id, i, orig_i, prompt,keywords,positive_prompt,radio,sli
515
  prompts_cond = torch.Tensor(prompts_cond).long().cuda()
516
  prompts_nocond = torch.Tensor(prompts_nocond).long().cuda()
517
 
518
- scheduler = DDPMScheduler.from_pretrained('runwayml/stable-diffusion-v1-5', subfolder="scheduler")
519
  scheduler.set_timesteps(slider_step)
520
  noise = torch.randn((slider_batch, 4, 64, 64)).to("cuda").half()
521
  input = noise
 
35
  'JingyeChen22/textdiffuser2-full-ft-inpainting', subfolder="text_encoder"
36
  ).cuda().half()
37
  tokenizer = CLIPTokenizer.from_pretrained(
38
+ 'botp/stable-diffusion-v1-5', subfolder="tokenizer"
39
  )
40
 
41
  #### additional tokens are introduced, including coordinate tokens and character tokens
 
51
  print(len(tokenizer))
52
  print('***************')
53
 
54
+ vae = AutoencoderKL.from_pretrained('botp/stable-diffusion-v1-5', subfolder="vae").half().cuda()
55
  unet = UNet2DConditionModel.from_pretrained(
56
  'JingyeChen22/textdiffuser2-full-ft-inpainting', subfolder="unet"
57
  ).half().cuda()
 
515
  prompts_cond = torch.Tensor(prompts_cond).long().cuda()
516
  prompts_nocond = torch.Tensor(prompts_nocond).long().cuda()
517
 
518
+ scheduler = DDPMScheduler.from_pretrained('botp/stable-diffusion-v1-5', subfolder="scheduler")
519
  scheduler.set_timesteps(slider_step)
520
  noise = torch.randn((slider_batch, 4, 64, 64)).to("cuda").half()
521
  input = noise