Instructions to use DeepFloyd/IF-I-XL-v1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use DeepFloyd/IF-I-XL-v1.0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("DeepFloyd/IF-I-XL-v1.0", 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
Something error
#27
by primerL - opened
Hi,
Thanks for offering the amazing model, while running it i got the following error:
Traceback (most recent call last):
File "/vhome/libo/aigc/IF-XL/generated_image.py", line 40, in <module>
image = stage_3(prompt=prompt, image=image, generator=generator, noise_level=100).images
File "/vhome/libo/anaconda3/envs/aigc/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/vhome/libo/anaconda3/envs/aigc/lib/python3.9/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py", line 739, in __call__
image, has_nsfw_concept, _ = self.run_safety_checker(image, device, prompt_embeds.dtype)
File "/vhome/libo/anaconda3/envs/aigc/lib/python3.9/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py", line 170, in run_safety_checker
safety_checker_input = self.feature_extractor(self.numpy_to_pil(image), return_tensors="pt").to(device)
File "/vhome/libo/anaconda3/envs/aigc/lib/python3.9/site-packages/diffusers/pipelines/pipeline_utils.py", line 1607, in numpy_to_pil
return numpy_to_pil(images)
File "/vhome/libo/anaconda3/envs/aigc/lib/python3.9/site-packages/diffusers/utils/pil_utils.py", line 43, in numpy_to_pil
images = (images * 255).round().astype("uint8")
AttributeError: 'Tensor' object has no attribute 'astype'
Looking forward to your early reply