Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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.
|
186 |
-
pipe.text_encoder_2=CLIPTextModelWithProjection.
|
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.
|
228 |
-
pipe.text_encoder_2=CLIPTextModelWithProjection.
|
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.
|
270 |
-
pipe.text_encoder_2=CLIPTextModelWithProjection.
|
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],
|