Text-to-Image
Diffusers
Safetensors
PRXPipeline
diffusion
photoroom
prx
open-source
image-generation
flow-matching
Instructions to use Photoroom/prx-1024-t2i-beta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Photoroom/prx-1024-t2i-beta with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Photoroom/prx-1024-t2i-beta", dtype=torch.bfloat16, device_map="cuda") prompt = "A close-up portrait in a photography studio, multiple soft light sources creating gradients of shadow on her face, minimal background, cinematic 4 K realism, artistic focus on light and emotion rather than glamour." image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Doesn't Work
#6
by qpqpqpqpqpqp - opened
Failed to import diffusers.pipelines.prx.pipeline_prx because of the following error (look up to see its traceback):
Could not import module 'AutoTokenizer'. Are this object's requirements defined correctly?
I just tried with the last version of diffusers (0.36) on Google colab and it worked.
I did need to install ftfy but I don't think it's related with PRX.
Do you have the last version of diffusers and transformers installed?
Here is a minimal code that worked on colab:
!pip install diffusers --upgrade
!pip install ftfy
from diffusers.pipelines.prx import PRXPipeline
import torch
# Load pipeline - VAE and text encoder will be loaded from HuggingFace
pipe = PRXPipeline.from_pretrained("Photoroom/prx-512-t2i-sft", torch_dtype=torch.bfloat16)
pipe.to("cuda")
prompt = "A front-facing portrait of a lion the golden savanna at sunset."
image = pipe(prompt, num_inference_steps=28, guidance_scale=5.0).images[0]
image.save("prx_output.png")
+uv pip install huggingface-hub==0.24.0 NumPy==1.26.4
Solved
qpqpqpqpqpqp changed discussion status to closed