Open bugbounted opened 1 year ago
I believe the code you're looking for is in the README.MD
file:
from stable_diffusion_videos import StableDiffusionWalkPipeline, Interface
import torch
pipeline = StableDiffusionWalkPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4",
torch_dtype=torch.float16,
revision="fp16",
).to("cuda")
interface = Interface(pipeline)
interface.launch()
or for MacOS on an M1:
from stable_diffusion_videos import StableDiffusionWalkPipeline, Interface
import torch
pipeline = StableDiffusionWalkPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4",
torch_dtype=torch.float32,
revision="fp16",
).to("mps")
interface = Interface(pipeline)
interface.launch()
This gets you:
~> python3 app.py
Fetching 16 files: 100%|████████████████████████████████████████████████████████████████| 16/16 [00:00<00:00, 17581.57it/s]
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
and then put that http://127.0.0.1:7860
in the browser:
Yea you would need to upgrade your space to have a GPU, though, which you can do in the "settings" tab of the space you created. You can see some options here below:
Hi Nathan Raw, please make python file compatable to run on huggingface spaces gradio sdk. waiting for your response finest regards