Run this model with HF Jobs

Run zecloud/mechas on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/zecloud/mechas. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/zecloud/mechas on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

model based on https://civitai.com/models/108124/realisticmechv1

converted to use it with animatediff with diffusers on hugging face

A code sample :

import torch from diffusers import AnimateDiffPipeline, DDIMScheduler, MotionAdapter from diffusers.utils import export_to_gif

Load the motion adapter

adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-2", torch_dtype=torch.float16)

Load SD 1.5 based finetuned model

model_id = "zecloud/mechas" 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 savings

pipe.enable_vae_slicing() pipe.enable_model_cpu_offload()

Define the input prompts and generate the output

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), )

Extract frames and export to GIF

frames = output.frames[0] export_to_gif(frames, "animation.gif")

Downloads last month
5
Safetensors
Model size
0.9B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support