Instructions to use zecloud/mechas with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use zecloud/mechas with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("zecloud/mechas", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files123model originally from https://civitai.com/models/108124/realisticmechv1converted to use it with animatediff with diffusers on hugging face1234567891011121314151617181920212223242526272829303132333435363738394041model based on https://civitai.com/models/108124/realisticmechv1converted to use it with animatediff with diffusers on hugging faceA code sample :import torchfrom diffusers import AnimateDiffPipeline, DDIMScheduler, MotionAdapterfrom diffusers.utils import export_to_gif# Load the motion adapteradapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-2", torch_dtype=torch.float16)# load SD 1.5 based finetuned modelmodel_id = "SG161222/Realistic_Vision_V5.1_noVAE"pipe = AnimateDiffPipeline.from_pretrained(model_id, motion_adapter=adapter, torch_dtype=torch.float16)scheduler = DDIMScheduler.from_pretrained(model_id,subfolder="scheduler",clip_sample=False,timestep_spacing="linspace",beta_schedule="linear",steps_offset=1,)pipe.scheduler = scheduler# enable memory savingspipe.enable_vae_slicing()pipe.enable_model_cpu_offload()output = pipe(prompt=("half body portrait of man smiling with a mysterious gaze, mecha, science_fiction, city, realistic,mecha, a futuristic eiffel tower in the background "),negative_prompt="(worst quality, low quality:1.4), (bad_prompt_version2:0.8), EasyNegative, badhandv4, text, name, letters, watermark, two tower",num_frames=16,guidance_scale=7.0,num_inference_steps=32,generator=torch.Generator("cpu").manual_seed(42),)frames = output.frames[0]export_to_gif(frames, "animation.gif")
README.md+40-2