Spaces:
Runtime error
Runtime error
sliders added
Browse files
app.py
CHANGED
|
@@ -28,9 +28,8 @@ model_llm = AutoModelForCausalLM.from_pretrained(
|
|
| 28 |
device_map="cuda",
|
| 29 |
torch_dtype="auto",
|
| 30 |
trust_remote_code=True,
|
| 31 |
-
device="cuda"
|
| 32 |
)
|
| 33 |
-
tokenizer_llm = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct"
|
| 34 |
|
| 35 |
pipe = AnimateDiffPipeline.from_pretrained(model_id, motion_adapter=adapter, torch_dtype=torch.float16).to(device)
|
| 36 |
scheduler = DDIMScheduler.from_pretrained(
|
|
@@ -56,9 +55,8 @@ def generate_video(prompt,negative_prompt, guidance_scale, num_inference_steps,
|
|
| 56 |
"text-generation",
|
| 57 |
model=model_llm,
|
| 58 |
tokenizer=tokenizer_llm,
|
| 59 |
-
device="cuda"
|
| 60 |
)
|
| 61 |
-
|
| 62 |
generation_args = {
|
| 63 |
"max_new_tokens": 500,
|
| 64 |
"return_full_text": False,
|
|
|
|
| 28 |
device_map="cuda",
|
| 29 |
torch_dtype="auto",
|
| 30 |
trust_remote_code=True,
|
|
|
|
| 31 |
)
|
| 32 |
+
tokenizer_llm = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
|
| 33 |
|
| 34 |
pipe = AnimateDiffPipeline.from_pretrained(model_id, motion_adapter=adapter, torch_dtype=torch.float16).to(device)
|
| 35 |
scheduler = DDIMScheduler.from_pretrained(
|
|
|
|
| 55 |
"text-generation",
|
| 56 |
model=model_llm,
|
| 57 |
tokenizer=tokenizer_llm,
|
|
|
|
| 58 |
)
|
| 59 |
+
pipe_llm.to(device)
|
| 60 |
generation_args = {
|
| 61 |
"max_new_tokens": 500,
|
| 62 |
"return_full_text": False,
|