Downloads · 30 days
0
L1v1ngLegend/dfvdfv
dfvdfv is a machine learning model from L1v1ngLegend. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
!pip install --upgrade diffusers transformers scipy & /dev/null
Downloads · 30 days
0
Access
Public
Updated Jan 10, 2023
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 58%
From the Hugging Face model README
!pip install --upgrade diffusers transformers scipy &> /dev/null
import matplotlib.pyplot as plt import torch from torch import autocast from diffusers import StableDiffusionPipeline from diffusers import StableDiffusionImg2ImgPipeline
hub_token = 'YOUR_TOKEN_GOES_HERE' img2img = True # Set to False if you don't want to do img2img
if img2img: pipe = StableDiffusionImg2ImgPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=hub_token) else: pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=hub_token) def safety_checker(images, clip_input): return images, False pipe.safety_checker = safety_checker