ford442 commited on
Commit
785b633
·
verified ·
1 Parent(s): 3bbe93c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -182,8 +182,8 @@ def generate_30(
182
  ):
183
  seed = random.randint(0, MAX_SEED)
184
  generator = torch.Generator(device='cuda').manual_seed(seed)
185
- pipe.text_encoder=CLIPTextModel.from_config(pipe.config)
186
- pipe.text_encoder_2=CLIPTextModelWithProjection.from_config(pipe.config)
187
  options = {
188
  "prompt": [prompt],
189
  "negative_prompt": [negative_prompt],
@@ -224,8 +224,8 @@ def generate_60(
224
  ):
225
  seed = random.randint(0, MAX_SEED)
226
  generator = torch.Generator(device='cuda').manual_seed(seed)
227
- pipe.text_encoder=CLIPTextModel.from_config(pipe.config)
228
- pipe.text_encoder_2=CLIPTextModelWithProjection.from_config(pipe.config)
229
  options = {
230
  "prompt": [prompt],
231
  "negative_prompt": [negative_prompt],
@@ -266,8 +266,8 @@ def generate_90(
266
  ):
267
  seed = random.randint(0, MAX_SEED)
268
  generator = torch.Generator(device='cuda').manual_seed(seed)
269
- pipe.text_encoder=CLIPTextModel.from_config(pipe.config)
270
- pipe.text_encoder_2=CLIPTextModelWithProjection.from_config(pipe.config)
271
  options = {
272
  "prompt": [prompt],
273
  "negative_prompt": [negative_prompt],
 
182
  ):
183
  seed = random.randint(0, MAX_SEED)
184
  generator = torch.Generator(device='cuda').manual_seed(seed)
185
+ pipe.text_encoder=CLIPTextModel.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='text_encoder',token=True).to(device=device, dtype=torch.bfloat16)
186
+ pipe.text_encoder_2=CLIPTextModelWithProjection.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='text_encoder_2',token=True).to(device=device, dtype=torch.bfloat16)
187
  options = {
188
  "prompt": [prompt],
189
  "negative_prompt": [negative_prompt],
 
224
  ):
225
  seed = random.randint(0, MAX_SEED)
226
  generator = torch.Generator(device='cuda').manual_seed(seed)
227
+ pipe.text_encoder=CLIPTextModel.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='text_encoder',token=True).to(device=device, dtype=torch.bfloat16)
228
+ pipe.text_encoder_2=CLIPTextModelWithProjection.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='text_encoder_2',token=True).to(device=device, dtype=torch.bfloat16)
229
  options = {
230
  "prompt": [prompt],
231
  "negative_prompt": [negative_prompt],
 
266
  ):
267
  seed = random.randint(0, MAX_SEED)
268
  generator = torch.Generator(device='cuda').manual_seed(seed)
269
+ pipe.text_encoder=CLIPTextModel.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='text_encoder',token=True).to(device=device, dtype=torch.bfloat16)
270
+ pipe.text_encoder_2=CLIPTextModelWithProjection.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='text_encoder_2',token=True).to(device=device, dtype=torch.bfloat16)
271
  options = {
272
  "prompt": [prompt],
273
  "negative_prompt": [negative_prompt],