Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -98,21 +98,14 @@ tokenizer.tokenizer_legacy=False
|
|
98 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map='balanced')
|
99 |
#model = torch.compile(model)
|
100 |
|
101 |
-
|
102 |
-
|
103 |
pipe.init_ipadapter(
|
104 |
ip_adapter_path=ipadapter_path,
|
105 |
image_encoder_path=image_encoder_path,
|
106 |
nb_token=64,
|
107 |
)
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device("cuda:0"))
|
113 |
|
114 |
-
|
115 |
-
|
116 |
def filter_text(text,phraseC):
|
117 |
"""Filters out the text up to and including 'Rewritten Prompt:'."""
|
118 |
phrase = "Rewritten Prompt:"
|
|
|
98 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map='balanced')
|
99 |
#model = torch.compile(model)
|
100 |
|
|
|
|
|
101 |
pipe.init_ipadapter(
|
102 |
ip_adapter_path=ipadapter_path,
|
103 |
image_encoder_path=image_encoder_path,
|
104 |
nb_token=64,
|
105 |
)
|
106 |
|
|
|
|
|
|
|
107 |
upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device("cuda:0"))
|
108 |
|
|
|
|
|
109 |
def filter_text(text,phraseC):
|
110 |
"""Filters out the text up to and including 'Rewritten Prompt:'."""
|
111 |
phrase = "Rewritten Prompt:"
|