Run this model with HF Jobs
Run Froggypan/ML3Dtutorial 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/Froggypan/ML3Dtutorial. 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/Froggypan/ML3Dtutorial 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.
Instructions to use Froggypan/ML3Dtutorial with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Froggypan/ML3Dtutorial with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Froggypan/ML3Dtutorial", 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
dylanebert commited on
Commit ·
a283418
1
Parent(s): a3fbb44
isort
Browse files12145678910111213141516171819202122234567827282930319101112351314151617181920212223242526import torchimport torch.nn.functional as Fimport inspectimport numpy as npfrom typing import Callable, List, Optional, Union, Anyfrom transformers import ( CLIPTextModel, CLIPTokenizer, CLIPVisionModel, CLIPImageProcessor,)from diffusers import AutoencoderKL, DiffusionPipelinefrom diffusers.utils import ( deprecate, is_accelerate_available, is_accelerate_version, logging,)from diffusers.configuration_utils import FrozenDictfrom diffusers.schedulers import DDIMSchedulerfrom diffusers.utils.torch_utils import randn_tensor
import mathfrom inspect import isfunctionfrom typing import Any, Callable, List, Optional, Union
import numpy as npimport torchimport torch.nn as nnfrom einops import rearrange, repeat
from diffusers.configuration_utils import ConfigMixinfrom diffusers.models.modeling_utils import ModelMixin
import torch.nn.functional as F# require xformers!import xformersimport xformers.ops
from diffusers import AutoencoderKL, DiffusionPipelinefrom diffusers.configuration_utils import ConfigMixin, FrozenDictfrom diffusers.models.modeling_utils import ModelMixinfrom diffusers.schedulers import DDIMSchedulerfrom diffusers.utils import (deprecate, is_accelerate_available, is_accelerate_version, logging)from diffusers.utils.torch_utils import randn_tensorfrom einops import rearrange, repeatfrom kiui.cam import orbit_camerafrom transformers import (CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModel)
def get_camera(pipeline.py+14-27